File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ public static void Init()
4242 {
4343 if ( count == 0 )
4444 {
45+ Native . llama_max_devices ( ) ;
46+
4547#if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
4648 string packagePath = NativeDllPath . GetDirectory ( "llama.dll" ) ;
4749 Native . ggml_backend_load ( Path . Join ( packagePath , "ggml-cpu-x64.dll" ) ) ;
Original file line number Diff line number Diff line change @@ -175,6 +175,10 @@ public unsafe struct llama_token_data_array
175175 [ DllImport ( LlamaDll , CallingConvention = CallingConvention . Cdecl ) ]
176176 public static extern void llama_log_set ( ggml_log_callback log_callback , IntPtr user_data ) ;
177177
178+ [ DllImport ( LlamaDll , CallingConvention = CallingConvention . Cdecl ) ]
179+ public static extern long llama_max_devices ( ) ;
180+
181+
178182 // backend
179183 [ DllImport ( LlamaDll , CallingConvention = CallingConvention . Cdecl ) ]
180184 public static extern void llama_backend_init ( ) ;
You can’t perform that action at this time.
0 commit comments