File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
java/cuvs-java/src/main/java22/com/nvidia/cuvs/internal/common Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -65,15 +65,11 @@ private Util() {}
6565 LINKER .downcallHandle (
6666 cudaMemcpyAsync$address (), cudaMemcpyAsync$descriptor (), Linker .Option .critical (true ));
6767
68- private static final String cudaGetDevicePropertiesSymbolName =
69- "12" .equals (System .getenv ("RAPIDS_CUDA_MAJOR" ))
70- ? "cudaGetDeviceProperties_v2"
71- : "cudaGetDeviceProperties" ;
72-
7368 private static final MethodHandle cudaGetDeviceProperties$mh =
7469 LINKER .downcallHandle (
7570 SYMBOL_LOOKUP
76- .find (cudaGetDevicePropertiesSymbolName )
71+ .find ("cudaGetDeviceProperties" ) // CUDA 13+ symbol name
72+ .or (() -> SYMBOL_LOOKUP .find ("cudaGetDeviceProperties_v2" )) // CUDA 12 symbol name
7773 .orElseThrow (UnsatisfiedLinkError ::new ),
7874 FunctionDescriptor .of (headers_h .C_INT , headers_h .C_POINTER , headers_h .C_INT ));
7975
You can’t perform that action at this time.
0 commit comments