-
Notifications
You must be signed in to change notification settings - Fork 751
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Links most cuda libs to jnitorch_cuda only.
- Loading branch information
1 parent
81e39b2
commit 1c621b3
Showing
2 changed files
with
24 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,36 +101,20 @@ | |
"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.3/extras/CUPTI/lib64/", | ||
"C:/Program Files/NVIDIA Corporation/NvToolsExt/bin/x64/", | ||
}, | ||
linkpath = { | ||
"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.3/lib/x64/", | ||
"/usr/local/cuda-12.3/lib64/", | ||
"/usr/local/cuda/lib64/", | ||
"/usr/lib64/" | ||
}, | ||
extension = "-gpu" | ||
), | ||
@Platform( | ||
value = {"linux"}, | ||
link = { "c10", "torch", "torch_cpu" } | ||
link = { "c10", "torch_cpu" } | ||
), | ||
@Platform( | ||
value = {"macosx"}, | ||
link = { "c10", "torch", "torch_cpu", "omp" } | ||
link = { "c10", "torch_cpu", "omp" } | ||
), | ||
@Platform( | ||
value = "windows", | ||
link = { "c10", "torch", "torch_cpu", "uv" } | ||
link = { "c10", "torch_cpu", "uv" } | ||
), | ||
@Platform( | ||
value = "linux", | ||
extension = "-gpu", | ||
link = { "c10", "torch", "torch_cpu", "c10_cuda", "torch_cuda", "torch_cuda_linalg", "cudart", "cusparse", "cudnn" } // [email protected] needed ? cuda_linalg built as separate lib on linux only | ||
), | ||
@Platform( | ||
value = "windows", | ||
extension = "-gpu", | ||
link = { "c10", "torch", "torch_cpu", "uv", "c10_cuda", "torch_cuda", "cudart", "cusparse", "cudnn" } | ||
) | ||
}, | ||
target = "org.bytedeco.pytorch", | ||
global = "org.bytedeco.pytorch.global.torch" | ||
|
@@ -180,11 +164,13 @@ public void init(ClassProperties properties) { | |
if (!Loader.isLoadLibraries() || extension == null || !extension.endsWith("-gpu")) { | ||
return; | ||
} | ||
|
||
// when built for CUDA, even torch_cpu links with at least cupti and cudart, for some reason | ||
int i = 0; | ||
if (platform.startsWith("windows")) { | ||
preloads.add(i++, "zlibwapi"); | ||
} | ||
String[] libs = {"cudart", "cublasLt", "cublas", "cufft", "curand", "nvJitLink", "cusparse", "cusolver", | ||
String[] libs = {"cudart", "cublasLt", "cublas", "cufft", "cupti", "curand", "nvJitLink", "cusparse", "cusolver", | ||
"cudnn", "nccl", "nvrtc", "nvrtc-builtins", "myelin", "nvinfer", "cudnn_ops_infer", "cudnn_ops_train", | ||
"cudnn_adv_infer", "cudnn_adv_train", "cudnn_cnn_infer", "cudnn_cnn_train"}; | ||
for (String lib : libs) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters