We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb4b0b1 commit 44fe261Copy full SHA for 44fe261
LLama/Native/NativeApi.cs
@@ -41,13 +41,15 @@ private static IntPtr TryLoadLibrary()
41
{
42
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
43
44
+#if NET6_0_OR_GREATER
45
var cuda = LoadLibrary("win-cuda12/libllama.dll");
46
if (cuda != IntPtr.Zero)
47
return cuda;
48
49
cuda = LoadLibrary("win-cuda11/libllama.dll");
50
51
52
+#endif
53
54
#if NET8_0_OR_GREATER
55
if (System.Runtime.Intrinsics.X86.Avx512.IsSupported)
@@ -60,8 +62,8 @@ private static IntPtr TryLoadLibrary()
60
62
61
63
if (System.Runtime.Intrinsics.X86.Avx.IsSupported)
64
return LoadLibrary("win-avx/libllama.dll");
- }
65
#endif
66
+ }
67
68
return IntPtr.Zero;
69
}
0 commit comments