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 a4effd3 commit 309cd3cCopy full SHA for 309cd3c
LLama/Native/NativeApi.cs
@@ -40,13 +40,15 @@ private static IntPtr TryLoadLibrary()
40
{
41
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
42
43
+#if NET6_0_OR_GREATER
44
var cuda = LoadLibrary("win-cuda12/libllama.dll");
45
if (cuda != IntPtr.Zero)
46
return cuda;
47
48
cuda = LoadLibrary("win-cuda11/libllama.dll");
49
50
51
+#endif
52
53
#if NET8_0_OR_GREATER
54
if (System.Runtime.Intrinsics.X86.Avx512.IsSupported)
@@ -59,8 +61,8 @@ private static IntPtr TryLoadLibrary()
59
61
60
62
if (System.Runtime.Intrinsics.X86.Avx.IsSupported)
63
return LoadLibrary("win-avx/libllama.dll");
- }
64
#endif
65
+ }
66
67
return IntPtr.Zero;
68
}
0 commit comments