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

Add CUDA 10.2 support #14

Closed
lazystone opened this issue Jan 5, 2020 · 3 comments
Closed

Add CUDA 10.2 support #14

lazystone opened this issue Jan 5, 2020 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@lazystone
Copy link

Description

I tried to run this demo to get familiar with djl, but could not run training on GPU because I have CUDA 10.2 installed:

Caused by: java.lang.UnsatisfiedLinkError: Unable to load library '/home/andrej/.mxnet/cache/1.6.0-a-20191127cu101mkl-linux-x86_64/libmxnet.so':
libcudart.so.10.1: cannot open shared object file: No such file or directory
libcudart.so.10.1: cannot open shared object file: No such file or directory
Native library (home/andrej/.mxnet/cache/1.6.0-a-20191127cu101mkl-linux-x86_64/libmxnet.so) not found in resource path (/home/andrej/projects/djl-demo/build/classes/java/main:/home/andrej/projects/djl-demo/build/resources/main:/home/andrej/.gradle/caches/modules-2/files-2.1/ai.djl.mxnet/mxnet-model-zoo/0.2.0/355dfb3163430430f25c7e86267fc5c621276179/mxnet-model-zoo-0.2.0.jar:/home/andrej/.gradle/caches/modules-2/files-2.1/ai.djl.mxnet/mxnet-engine/0.2.0/7841bd1c3fc2f44fe76cb2e8a083dfead4de3f9a/mxnet-engine-0.2.0.jar:/home/andrej/.gradle/caches/modules-2/files-2.1/net.java.dev.jna/jna/5.3.0/4654d1da02e4173ba7b64f7166378847db55448a/jna-5.3.0.jar:/home/andrej/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.4.12/21ebaf6d532bc350ba95bd81938fa5f0e511c132/httpcore-4.4.12.jar:/home/andrej/.gradle/caches/modules-2/files-2.1/commons-cli/commons-cli/1.4/c51c00206bb913cd8612b24abd9fa98ae89719b1/commons-cli-1.4.jar:/home/andrej/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-simple/1.7.29/82ae07f95088577987a15d90171de12b00d81847/slf4j-simple-1.7.29.jar:/home/andrej/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-csv/1.7/cb5d05520f8fe1b409aaf29962e47dc5764f8f39/commons-csv-1.7.jar:/home/andrej/.gradle/caches/modules-2/files-2.1/ai.djl/basicdataset/0.2.0/fa73e42fb774b56f23a030a6c95159a1987d8110/basicdataset-0.2.0.jar:/home/andrej/.gradle/caches/modules-2/files-2.1/ai.djl/model-zoo/0.2.0/dbe300ddc19ec809002ed9a6214dac11e39a1055/model-zoo-0.2.0.jar:/home/andrej/.gradle/caches/modules-2/files-2.1/ai.djl/repository/0.2.0/266c3a327e89b82234c03a713f05067567c2e9dd/repository-0.2.0.jar:/home/andrej/.gradle/caches/modules-2/files-2.1/com.google.code.gson/gson/2.8.5/f645ed69d595b24d4cf8b3fbb64cc505bede8829/gson-2.8.5.jar:/home/andrej/.gradle/caches/modules-2/files-2.1/ai.djl/api/0.2.0/c83672c1e7178830ea9c43b98603d5fa7737fd78/api-0.2.0.jar:/home/andrej/.gradle/caches/modules-2/files-2.1/ai.djl.mxnet/mxnet-native-cu101mkl/1.6.0-a/c67432f4f6ba4273a13c3f9efff52e5f2710c888/mxnet-native-cu101mkl-1.6.0-a-linux-x86_64.jar:/home/andrej/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-api/1.7.29/e56bf4473a4c6b71c7dd397a833dce86d1993d9d/slf4j-api-1.7.29.jar)
        at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:302)
        at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:455)
        at com.sun.jna.Library$Handler.<init>(Library.java:192)
        at com.sun.jna.Native.load(Native.java:596)
        at com.sun.jna.Native.load(Native.java:570)
        at ai.djl.mxnet.jna.LibUtils.loadLibrary(LibUtils.java:80)
        at ai.djl.mxnet.jna.JnaUtils.<clinit>(JnaUtils.java:68)
        at ai.djl.mxnet.engine.MxEngine.<init>(MxEngine.java:36)
        at ai.djl.mxnet.engine.MxEngineProvider.<clinit>(MxEngineProvider.java:21)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
        at java.base/java.util.ServiceLoader$ProviderImpl.newInstance(ServiceLoader.java:779)
        ... 9 more
        Suppressed: java.lang.UnsatisfiedLinkError: libcudart.so.10.1: cannot open shared object file: No such file or directory
                at com.sun.jna.Native.open(Native Method)
                at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:191)
                ... 22 more

CUDA 10.2 seems to be mainstream at the moment and it's easier to find installation instructions for this version.

Rolling back to CUDA 10.1 might be troublesome and will repel some users from using this library.

Will this change the current api? How?

No

Who will benefit from this feature?

All potential users of this djl including myself

@stu1130 stu1130 added the enhancement New feature or request label Jan 5, 2020
@frankfliu
Copy link
Contributor

@lazystone Thanks for reaching to us. We are working on 10.2 support. Will add 10.2 support soon.

For the time being, you can build mxnet with cuda102 from source, and export MXNET_LIBRARY_PATH to point to your libmxnet.so file. DJL can pick up libmxnet.so from there.

@lazystone
Copy link
Author

I'll wait until CUDA 10.2 works out of the box :)

@frankfliu
Copy link
Contributor

@lazystone
Now DJL support CUDA 10.2 in master branch. 0.3.0 release will officially support CUDA 10.2

aksrajvanshi added a commit to aksrajvanshi/djl that referenced this issue Mar 18, 2021
Lokiiiiii pushed a commit to Lokiiiiii/djl that referenced this issue Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants