Skip to content

Commit

Permalink
Revert "Links most cuda libs to jnitorch_cuda only" and preload/link …
Browse files Browse the repository at this point in the history
…cleanup
  • Loading branch information
HGuillemet committed Aug 13, 2024
1 parent d71057a commit 2bc75cb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
21 changes: 16 additions & 5 deletions pytorch/src/main/java/org/bytedeco/pytorch/presets/torch.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@

},
exclude = {"openblas_config.h", "cblas.h", "lapacke_config.h", "lapacke_mangling.h", "lapack.h", "lapacke.h", "lapacke_utils.h"},
preload = { "asmjit", "fbgemm" }
link = { "torch" }
),
@Platform(
value = {"linux", "macosx", "windows"},
Expand All @@ -105,16 +105,27 @@
),
@Platform(
value = {"linux"},
link = { "c10", "torch_cpu" }
preload = { "c10", "torch_cpu" },

),
@Platform(
value = {"macosx"},
link = { "c10", "torch_cpu", "iomp5" }
preload = { "c10", "torch_cpu", "iomp5" }
),
@Platform(
value = "windows",
link = { "c10", "torch_cpu", "uv" }
preload = { "c10", "torch_cpu", "uv" }
),
@Platform(
value = "linux",
extension = "-gpu",
preload = { "c10", "torch_cpu", "c10_cuda", "torch_cuda" }
),
@Platform(
value = "windows",
extension = "-gpu",
preload = { "c10", "torch_cpu", "uv", "c10_cuda", "torch_cuda" }
)
},
target = "org.bytedeco.pytorch",
global = "org.bytedeco.pytorch.global.torch"
Expand Down Expand Up @@ -1959,11 +1970,11 @@ We need either to put an annotation info on each member, or javaName("@NoOffset
"c10::DDPLoggingData::strs_map",
"c10::DDPLoggingData::ints_map",
"torch::dynamo::autograd::TensorArgs::inputs",
"torch::dynamo::autograd::AutogradCompilerCall::tensor_args",
"torch::dynamo::autograd::AutogradCompilerCall::all_size_inputs",
"torch::dynamo::autograd::AutogradCompilerCall::dyn_size_inputs",
"torch::dynamo::autograd::AutogradCompilerCall::node_calls",
"torch::dynamo::autograd::AutogradCompilerCall::default_dyn_type",
"torch::dynamo::autograd::AutogradCompilerCall::tensor_args",
"torch::jit::Object::Property::setter_func",
"torch::jit::Object::Property::getter_func",
"torch::jit::Object::Property::name",
Expand Down
14 changes: 2 additions & 12 deletions pytorch/src/main/java/org/bytedeco/pytorch/presets/torch_cuda.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,12 @@
@Platform(
value = "linux",
extension = "-gpu",
link = { "c10", "torch_cpu", "c10_cuda", "torch_cuda", "torch_cuda_linalg", "cudart", "cupti", "cusparse", "cudnn" }, // cuda_linalg built as separate lib on linux only
linkpath = {
"/usr/local/cuda-12.3/lib64/",
"/usr/local/cuda/lib64/",
"/usr/local/cuda-12.3/extras/CUPTI/lib64/",
"/usr/lib64/"
}
link = { "torch" , "c10_cuda", "torch_cuda_linalg" } // cuda_linalg built as separate lib on linux only
),
@Platform(
value = "windows",
extension = "-gpu",
link = { "c10", "torch_cpu", "uv", "c10_cuda", "torch_cuda", "cudart", "cupti", "cusparse", "cudnn" },
linkpath = {
"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.3/lib/x64/",
"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.3/extras/CUPTI/lib64/"
}
link = { "torch" , "c10_cuda" }
)
},
target = "org.bytedeco.pytorch.cuda",
Expand Down

0 comments on commit 2bc75cb

Please sign in to comment.