Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnsatisfiedLinkError when running examples #3480

Open
dwctic opened this issue Sep 19, 2024 · 3 comments
Open

UnsatisfiedLinkError when running examples #3480

dwctic opened this issue Sep 19, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@dwctic
Copy link

dwctic commented Sep 19, 2024

Description

When running examples in 0.30.0-SNAPSHOT I receive an UnsatisfiedLinkError.

Expected Behavior

I expect the examples to run.

Error Message

Failed to load PyTorch native library
ai.djl.engine.EngineException: Failed to load PyTorch native library
	at ai.djl.pytorch.engine.PtEngine.newInstance(PtEngine.java:90)
	at ai.djl.pytorch.engine.PtEngineProvider.getEngine(PtEngineProvider.java:41)
	at ai.djl.engine.Engine.getEngine(Engine.java:190)
	at ai.djl.examples.training.TrainTicTacToeTest.testTrainTicTacToe(TrainTicTacToeTest.java:27)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:141)
	at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:686)
	at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:230)
	at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:63)
	at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:992)
	at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:203)
	at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:154)
	at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:134)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at org.testng.TestRunner.privateRun(TestRunner.java:739)
	at org.testng.TestRunner.run(TestRunner.java:614)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:421)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:413)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:373)
	at org.testng.SuiteRunner.run(SuiteRunner.java:312)
	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1274)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:1208)
	at org.testng.TestNG.runSuites(TestNG.java:1112)
	at org.testng.TestNG.run(TestNG.java:1079)
	at org.gradle.api.internal.tasks.testing.testng.TestNGTestClassProcessor.runTests(TestNGTestClassProcessor.java:153)
	at org.gradle.api.internal.tasks.testing.testng.TestNGTestClassProcessor.stop(TestNGTestClassProcessor.java:95)
	at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:63)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
	at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:92)
	at jdk.proxy2/jdk.proxy2.$Proxy6.stop(Unknown Source)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker$3.run(TestWorker.java:200)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:132)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:103)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:63)
	at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56)
	at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:121)
	at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:71)
	at worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)
	at worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)
Caused by: java.lang.UnsatisfiedLinkError: C:\Users\<........>\.djl.ai\pytorch\2.4.0-cu124-win-x86_64\torch_cuda.dll: Can't find dependent libraries
	at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
	at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388)
	at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232)
	at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174)
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2394)
	at java.base/java.lang.Runtime.load0(Runtime.java:755)
	at java.base/java.lang.System.load(System.java:1957)
	at ai.djl.pytorch.jni.LibUtils.loadNativeLibrary(LibUtils.java:379)
	at ai.djl.pytorch.jni.LibUtils.loadLibTorch(LibUtils.java:195)
	at ai.djl.pytorch.jni.LibUtils.loadLibrary(LibUtils.java:82)
	at ai.djl.pytorch.engine.PtEngine.newInstance(PtEngine.java:53)
	... 49 more

Steps to reproduce

Run the ai.djl.examples.training.TrainTicTacToeTest class

What have you tried to solve it?

  • Followed instructions here https://djl.ai/docs/development/troubleshooting.html and installed MSVC 2019 libraries.
  • I checked the dji pytorch directory for the proper libraries and they appear to be downloaded correctly.
  • Cleared the dji pytorch directory and allowed it to re-download,

Environment Info

Please run the command ./gradlew debugEnv from the root directory of DJL (if necessary, clone DJL first). It will output information about your system, environment, and installation that can help us debug your issue. Paste the output of the command below:

PS C:\Users\User1\IdeaProjects\djl> ./gradlew debugEnv
Found C:\Users\User1\IdeaProjects\djl\\gradle\wrapper\gradle-wrapper.jar

> Task :integration:debugEnv
----------- System Properties -----------
java.specification.version: 17
sun.cpu.isalist: amd64
sun.jnu.encoding: Cp1252
java.class.path: C:\Users\User1\IdeaProjects\djl\integration\build\classes\java\main;C:\Users\User1\IdeaProjects\djl\integration\build\resources\main;C:\Users\User1\.gradle\caches\modules-2\files-2.1\commons-cli\commons-cli\1.9.0\e1cdfa8bf40ccbb7440b2d1232f9f45bb20a1844\commons-cli-1.9.0.jar;C:\Users\User1\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-slf4j2-impl\2.24.0\3d550671b19e83591d5e66cc8c77272e7aaac34c\log4j-slf4j2-impl-2.24.0.jar;C:\Users\User1\IdeaProjects\djl\basicdataset\build\libs\basicdataset-0.30.0-SNAPSHOT.jar;C:\Users\User1\IdeaProjects\djl\model-zoo\build\libs\model-zoo-0.30.0-SNAPSHOT.jar;C:\Users\User1\IdeaProjects\djl\testing\build\libs\testing-0.30.0-SNAPSHOT.jar;C:\Users\User1\IdeaProjects\djl\engines\mxnet\mxnet-model-zoo\build\libs\mxnet-model-zoo-0.30.0-SNAPSHOT.jar;C:\Users\User1\IdeaProjects\djl\engines\pytorch\pytorch-model-zoo\build\libs\pytorch-model-zoo-0.30.0-SNAPSHOT.jar;C:\Users\User1\IdeaProjects\djl\engines\pytorch\pytorch-jni\build\libs\pytorch-jni-2.4.0-0.30.0-SNAPSHOT.jar;C:\Users\User1\IdeaProjects\djl\engines\tensorflow\tensorflow-model-zoo\build\libs\tensorflow-model-zoo-0.30.0-SNAPSHOT.jar;
C:\Users\User1\IdeaProjects\djl\engines\ml\xgboost\build\libs\xgboost-0.30.0-SNAPSHOT.jar;C:\Users\User1\IdeaProjects\djl\engines\ml\lightgbm\build\libs\lightgbm-0.30.0-SNAPSHOT.jar;C:\Users\Wat
son\IdeaProjects\djl\engines\onnxruntime\onnxruntime-engine\build\libs\onnxruntime-engine-0.30.0-SNAPSHOT.jar;C:\Users\User1\IdeaProjects\djl\extensions\tokenizers\build\libs\tokenizers-0.30.0-SN
APSHOT.jar;C:\Users\User1\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-core\2.24.0\537543d3b84d78b4d7ad055c98f8af13e5e7f3a8\log4j-core-2.24.0.jar;C:\Users\User1\.gradle\cach
es\modules-2\files-2.1\org.apache.logging.log4j\log4j-api\2.24.0\c6d9bd0c95c9bb6c530f4800da9507b98f018654\log4j-api-2.24.0.jar;C:\Users\User1\IdeaProjects\djl\engines\mxnet\mxnet-engine\build\libs\mxne
t-engine-0.30.0-SNAPSHOT.jar;C:\Users\User1\IdeaProjects\djl\engines\pytorch\pytorch-engine\build\libs\pytorch-engine-0.30.0-SNAPSHOT.jar;C:\Users\User1\IdeaProjects\djl\engines\tensorflow\tenso
rflow-engine\build\libs\tensorflow-engine-0.30.0-SNAPSHOT.jar;C:\Users\User1\IdeaProjects\djl\api\build\libs\api-0.30.0-SNAPSHOT.jar;C:\Users\User1\.gradle\caches\modules-2\files-2.1\org.testng\
testng\7.10.2\30742acada21960d4333a4204039fbdc6a92083a\testng-7.10.2.jar;C:\Users\User1\.gradle\caches\modules-2\files-2.1\org.slf4j\slf4j-api\2.0.16\172931663a09a1fa515567af5fbef00897d3c04\slf4j-api-2
.0.16.jar;C:\Users\User1\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-csv\1.11.0\8f2dc805097da534612128b7cdf491a5a76752bf\commons-csv-1.11.0.jar;C:\Users\User1\.gradle\caches\mo
dules-2\files-2.1\ml.dmlc\xgboost4j_2.12\2.0.3\db511d04d1ca1364cde79a6c8238a2694e31c592\xgboost4j_2.12-2.0.3.jar;C:\Users\User1\.gradle\caches\modules-2\files-2.1\commons-logging\commons-logging\1.3.4\
b9fc14968d63a8b8a8a2c1885fe3e90564239708\commons-logging-1.3.4.jar;C:\Users\User1\.gradle\caches\modules-2\files-2.1\com.microsoft.ml.lightgbm\lightgbmlib\3.2.110\f6c85e5d7cc44d49c4544240ea5c9600468000
7b\lightgbmlib-3.2.110.jar;C:\Users\User1\.gradle\caches\modules-2\files-2.1\com.microsoft.onnxruntime\onnxruntime\1.19.0\52985f239457f0b1f635b9a0e9e5b0b03c76b22b\onnxruntime-1.19.0.jar;C:\Users\User1
\.gradle\caches\modules-2\files-2.1\com.google.code.gson\gson\2.11.0\527175ca6d81050b53bdd4c457a6d6e017626b0e\gson-2.11.0.jar;C:\Users\User1\.gradle\caches\modules-2\files-2.1\net.java.dev.jna\jn
a\5.14.0\67bf3eaea4f0718cb376a181a629e5f88fa1c9dd\jna-5.14.0.jar;C:\Users\User1\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-compress\1.27.1\a19151084758e2fbb6b41eddaa88e7b8ff4e6599\co
mmons-compress-1.27.1.jar;C:\Users\User1\.gradle\caches\modules-2\files-2.1\commons-io\commons-io\2.16.1\377d592e740dc77124e0901291dbfaa6810a200e\commons-io-2.16.1.jar;C:\Users\User1\.gradle\cac
hes\modules-2\files-2.1\commons-codec\commons-codec\1.17.1\973638b7149d333563584137ebf13a691bb60579\commons-codec-1.17.1.jar;C:\Users\User1\.gradle\caches\modules-2\files-2.1\com.beust\jcommander\1.82\
a7c5fef184d238065de38f81bbc6ee50cca2e21\jcommander-1.82.jar;C:\Users\User1\.gradle\caches\modules-2\files-2.1\org.webjars\jquery\3.7.1\42088e652462c40a369b64d87e18e825644acfab\jquery-3.7.1.jar;C:\Users
\User1\IdeaProjects\djl\engines\tensorflow\tensorflow-api\build\libs\tensorflow-api-0.30.0-SNAPSHOT.jar;C:\Users\User1\.gradle\caches\modules-2\files-2.1\org.scala-lang.modules\scala-collection-
compat_2.12\2.10.0\bf81785e892f4185f470bddd205b011237aab553\scala-collection-compat_2.12-2.10.0.jar;C:\Users\User1\.gradle\caches\modules-2\files-2.1\com.google.errorprone\error_prone_annotations\2.27.
0\91b2c29d8a6148b5e2e4930f070d4840e2e48e34\error_prone_annotations-2.27.0.jar;C:\Users\User1\.gradle\caches\modules-2\files-2.1\org.tensorflow\tensorflow-core-api\1.0.0-rc.1\ea1878fb8e289742237e5a0ba6f
15398f3e9b7ef\tensorflow-core-api-1.0.0-rc.1.jar;C:\Users\User1\.gradle\caches\modules-2\files-2.1\org.tensorflow\tensorflow-core-native\1.0.0-rc.1\62b5fa3283865cc696dfbebf073ca2116b18f327\tensorflow-c
ore-native-1.0.0-rc.1.jar;C:\Users\User1\.gradle\caches\modules-2\files-2.1\org.bytedeco\javacpp\1.5.10\afb6ae145e7563c66b677cb4896dd0197d49fce6\javacpp-1.5.10.jar;C:\Users\User1\.gradle\caches\
modules-2\files-2.1\com.google.protobuf\protobuf-java\3.25.4\43fcb86e4a411516c7fc681450f1516de0b862a2\protobuf-java-3.25.4.jar;C:\Users\User1\.gradle\caches\modules-2\files-2.1\org.tensorflow\ndarray\1.0.0-rc.1\4a96a398ad87bec32be9177b1441b9880c04d822\ndarray-1.0.0-rc.1.jar
java.vm.vendor: Eclipse Adoptium
sun.arch.data.model: 64
user.variant:
java.vendor.url: https://adoptium.net/
user.timezone: America/New_York
java.vm.specification.version: 17
os.name: Windows 11
user.country: US
sun.java.launcher: SUN_STANDARD
sun.boot.library.path: C:\Langs\Java\jdk-17.0.10.7-hotspot\bin
sun.java.command: ai.djl.integration.util.DebugEnvironment
jdk.debug: release
sun.cpu.endian: little
user.home: C:\Users\User1
user.language: en
java.specification.vendor: Oracle Corporation
java.version.date: 2024-01-16
java.home: C:\Langs\Java\jdk-17.0.10.7-hotspot
file.separator: \
java.vm.compressedOopsMode: Zero based
line.separator:

java.vm.specification.vendor: Oracle Corporation
java.specification.name: Java Platform API Specification
user.script:
sun.management.compiler: HotSpot 64-Bit Tiered Compilers
java.runtime.version: 17.0.10+7
user.name: User1_lgc5e
path.separator: ;
os.version: 10.0
java.runtime.name: OpenJDK Runtime Environment
file.encoding: windows-1252
java.vm.name: OpenJDK 64-Bit Server VM
java.vendor.version: Temurin-17.0.10+7
java.vendor.url.bug: https://github.com/adoptium/adoptium-support/issues
java.io.tmpdir: C:\Users\User1~1\AppData\Local\Temp\
java.version: 17.0.10
user.dir: C:\Users\User1\IdeaProjects\djl\integration
os.arch: amd64
java.vm.specification.name: Java Virtual Machine Specification
sun.os.patch.level:
native.encoding: Cp1252
java.library.path: C:\Langs\Java\jdk-17.0.10.7-hotspot\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\bin;C:\Program Files\NVIDIA GPU Compu
ting Toolkit\CUDA\v12.6\libnvvp;C:\Langs\Java\jdk-17.0.10.7-hotspot\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Prog
ram Files\dotnet\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Git\cmd;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\NVIDIA Corporation\Nsight
 Compute 2024.3.1\;C:\Users\User1\AppData\Local\Microsoft\WindowsApps;C:\Users\User1\.dotnet\tools;C:\Tools\gradle-8.7\bin;C:\Program Files\CMake\bin;C:\Users\User1\AppData\Local\Programs\Microsoft VS Code\bin;.\native\windows\amd64;;.
java.vm.info: mixed mode, sharing
java.vendor: Eclipse Adoptium
java.vm.version: 17.0.10+7
sun.io.unicode.encoding: UnicodeLittle
java.class.version: 61.0

--------- Environment Variables ---------
USERDOMAIN_ROAMINGPROFILE: AzureAD
PROCESSOR_LEVEL: 6
SESSIONNAME: Console
ALLUSERSPROFILE: C:\ProgramData
PROCESSOR_ARCHITECTURE: AMD64
PSModulePath: C:\Users\User1\OneDrive - Chesapeake Technology International\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
SystemDrive: C:
DIRNAME: C:\Users\User1\IdeaProjects\djl\
USERNAME: User1_lgc5e
CUDA_PATH_V12_6: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6
CMD_LINE_ARGS: debugEnv
ProgramFiles(x86): C:\Program Files (x86)
FPS_BROWSER_USER_PROFILE_STRING: Default
APP_HOME: C:\Users\User1\IdeaProjects\djl\
PATHEXT: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL
DriverData: C:\Windows\System32\Drivers\DriverData
ProgramData: C:\ProgramData
ProgramW6432: C:\Program Files
HOMEPATH: \Users\User1
PROCESSOR_IDENTIFIER: Intel64 Family 6 Model 186 Stepping 2, GenuineIntel
ProgramFiles: C:\Program Files
PUBLIC: C:\Users\Public
windir: C:\Windows
=::: ::\
ZES_ENABLE_SYSMAN: 1
_SKIP: 2
OneDriveCommercial: C:\Users\User1\OneDrive - Chesapeake Technology International
LOCALAPPDATA: C:\Users\User1\AppData\Local
USERDOMAIN: AzureAD
FPS_BROWSER_APP_PROFILE_STRING: Internet Explorer
LOGONSERVER: \\WORKLAPTOP
JAVA_HOME: C:\Langs\Java\jdk-17.0.10.7-hotspot
PROMPT: $P$G
JETBRAINS_INTELLIJ_COMMAND_END_MARKER: pfw61yzYpadIptziNWmOSQG4ldzBm6oyWkokFzaSZw8Wj1VFXATbf9VkPPoZEZpp
OneDrive: C:\Users\User1\OneDrive - Chesapeake Technology International
=C:: C:\Users\User1\IdeaProjects\djl
APPDATA: C:\Users\User1\AppData\Roaming
DOWNLOAD_URL: "https://raw.githubusercontent.com/gradle/gradle/master/gradle/wrapper/gradle-wrapper.jar"
EFC_16820: 1
JAVA_EXE: C:\Langs\Java\jdk-17.0.10.7-hotspot/bin/java.exe
CommonProgramFiles: C:\Program Files\Common Files
Path: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\libnvvp;C:\Langs\Java\jdk-17.0.10.7-hotspot\bin;C:\Windows\system32;C:\Windows;C:\Wi
ndows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Git\cmd;C:\Program
 Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\NVIDIA Corporation\Nsight Compute 2024.3.1\;C:\Users\User1\AppData\Local\Microsoft\WindowsApps;C:\Users\User1\.dotnet\tools;C:\Tools\gradle-8.7\bin;C:\Program Files\CMake\bin;C:\Users\User1\AppData\Local\Programs\Microsoft VS Code\bin;.\native\windows\amd64;
OS: Windows_NT
COMPUTERNAME: WORKLAPTOP
CUDA_PATH: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6
PROCESSOR_REVISION: ba02
CLASSPATH: C:\Users\User1\IdeaProjects\djl\\gradle\wrapper\gradle-wrapper.jar
CommonProgramW6432: C:\Program Files\Common Files
ComSpec: C:\Windows\system32\cmd.exe
APP_BASE_NAME: gradlew
TERMINAL_EMULATOR: JetBrains-JediTerm
PSExecutionPolicyPreference: Bypass
SystemRoot: C:\Windows
TEMP: C:\Users\User1~1\AppData\Local\Temp
HOMEDRIVE: C:
USERPROFILE: C:\Users\User1
TMP: C:\Users\User1~1\AppData\Local\Temp
CommonProgramFiles(x86): C:\Program Files (x86)\Common Files
NUMBER_OF_PROCESSORS: 20
IDEA_INITIAL_DIRECTORY: C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2024.1\bin

-------------- Directories --------------
temp directory: C:\Users\User1~1\AppData\Local\Temp
DJL cache directory: C:\Users\User1\.djl.ai
Engine cache directory: C:\Users\User1\.djl.ai

------------------ CUDA -----------------
GPU Count: 1
CUDA: 126
ARCH: 89
GPU(0) memory used: 1141374976 bytes

----------------- Engines ---------------
DJL version: 0.30.0-SNAPSHOT
[WARN ] - No matching cuda flavor for win found: cu126mkl/sm_89.
[WARN ] - No matching cuda flavor for win found: cu126mkl/sm_89.
Default Engine: MXNet:1.9.0, capabilities: [
        SIGNAL_HANDLER,
        LAPACK,
        BLAS_OPEN,
        OPENMP,
        OPENCV,
        MKLDNN,
]
MXNet Library: C:\Users\User1\.djl.ai\mxnet\1.9.1-mkl-win-x86_64\mxnet.dll
Default Device: cpu()
Rust: 4
PyTorch: 2
MXNet: 0
XGBoost: 10
LightGBM: 10
OnnxRuntime: 10
TensorFlow: 3

--------------- Hardware --------------
Available processors (cores): 20
Byte Order: LITTLE_ENDIAN
Free memory (bytes): 519130328
Maximum memory (bytes): 8480882688
Total memory available to JVM (bytes): 532676608
Heap committed: 532676608
Heap nonCommitted: 29622272

BUILD SUCCESSFUL in 8s
64 actionable tasks: 2 executed, 62 up-to-date
PS C:\Users\User1\IdeaProjects\djl>                                                                                                                                                                      
                                                                                                                                                                                                                
@dwctic dwctic added the bug Something isn't working label Sep 19, 2024
@InAnYan
Copy link

InAnYan commented Oct 1, 2024

Hi, djl! One of our developers actually has the same error with torch_cuda.dll with 0.30.0 version. MSVC 2019 is installed too.

There is no such problem with 0.29.0

@InAnYan
Copy link

InAnYan commented Oct 1, 2024

@dwctic, could you try running the examples with djl 0.29.0? What if we have the same issue 😄

@ThiloteE
Copy link

ThiloteE commented Nov 10, 2024

Please try one of two solutions that worked in my particular case:

  • A) Have no CUDA installed on your system (and have no CUDA paths set in your systems Environment Variables), then it hopefully will automatically detect the correct location of the CUDA path, if it is assume that it is managed by the DeepJavaLibrary and the system will also somehow find all dependencies.

  • B) (If you have multiple CUDA installed on your system) Add C:\Users\USER\.djl.ai\pytorch\CUDA-VERSION (in my case it was C:\Users\USER\.djl.ai\pytorch\2.4.0-cu124-win-x86_64) to "PATH" in Windows 10 Environment Variables. Can be done via searching for environment variables and manually adding the folder path. See https://www.howtogeek.com/787217/how-to-edit-environment-variables-on-windows-10-or-11/

Links and comments that helped me find a solution for myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants