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

support for cuda 121 #2485

Closed
larochef opened this issue Mar 28, 2023 · 4 comments · Fixed by #2486
Closed

support for cuda 121 #2485

larochef opened this issue Mar 28, 2023 · 4 comments · Fixed by #2486
Labels
enhancement New feature or request

Comments

@larochef
Copy link
Contributor

Description

I use pytorch, have cuda 121 installed on my computer and cannot easily downgrade.
My computer is running archlinux x64.

How could I get djl to use the gpu?

Will this change the current api? How?
it shouldn't change the current api

Who will benefit from this enhancement?
everyone running the latest cuda version

References

  • list reference and related literature
  • list known implementations
@larochef larochef added the enhancement New feature or request label Mar 28, 2023
@frankfliu
Copy link
Contributor

I didn't try it myself, but you can try to set environment variable or system properties:

export PYTORCH_FLAVOR=cu117-precxx11

or

System.setProperty("PYTORCH_FLAVOR", "cu117-precxx11");

@larochef
Copy link
Contributor Author

larochef commented Mar 28, 2023

I gave it a try but got:

WARN ai.djl.pytorch.jni.LibUtils - No matching cuda flavor for linux-x86_64 found: cu121.
DEBUG ai.djl.pytorch.jni.LibUtils - Loading native library: ~/.djl.ai/pytorch/1.13.1-cpu-linux-x86_64/libc10.so
DEBUG ai.djl.pytorch.jni.LibUtils - Loading native library: ~/.djl.ai/pytorch/1.13.1-cpu-linux-x86_64/libgomp-52f2fd74.so.1
DEBUG ai.djl.pytorch.jni.LibUtils - Loading native library: ~/.djl.ai/pytorch/1.13.1-cpu-linux-x86_64/libtorch_cpu.so
DEBUG ai.djl.pytorch.jni.LibUtils - Loading native library: ~/.djl.ai/pytorch/1.13.1-cpu-linux-x86_64/libtorch.so
DEBUG ai.djl.pytorch.jni.LibUtils - Loading native library: ~/.djl.ai/pytorch/1.13.1-cpu-linux-x86_64/0.21.0-libdjl_torch.so

@frankfliu
Copy link
Contributor

@larochef
You can try it again with 0.22.0-SNAPSHOT release.

@larochef
Copy link
Contributor Author

larochef commented Mar 30, 2023

@frankfliu I tested it and it worked, thx

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

Successfully merging a pull request may close this issue.

2 participants