Skip to content

Commit 68b3eb7

Browse files
cm4kerCopilot
andauthored
Update src/TorchSharp/Torch.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent de6d26f commit 68b3eb7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/TorchSharp/Torch.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ private static void LoadNativeBackend(bool useCudaBackend, out StringBuilder? tr
127127

128128
if (useCudaBackend) {
129129
var isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
130-
if (isWindows && RuntimeInformation.OSArchitecture != Architecture.Arm64) {
130+
// CUDA is not supported on Windows ARM64. Only attempt to load CUDA components on Windows x64.
131+
if (isWindows && RuntimeInformation.OSArchitecture == Architecture.X64) {
131132
trace.AppendLine($" Try loading Windows cuda native components");
132133
// Preloading these DLLs on windows seems to iron out problems where one native DLL
133134
// requests a load of another through dynamic linking techniques.

0 commit comments

Comments
 (0)