-
Notifications
You must be signed in to change notification settings - Fork 743
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
[pytorch] how to train use nvidia gpu in windows system with javacpp pytorch #1397
Comments
What error do you get ? |
I not get any error ,just run on cpu? I don't know how to config gpu javacpp pytorch env. do I need import libraryDependencies += "org.bytedeco" % "cuda-platform" % "12.1-8.9-1.5.9" And by the way ,normal dataloader dataset datareader do we has implement in javacpp pytorch ? |
Please install CUDA 12.1, not 12.0. |
ok,I will install cuda 12.1, and anything else need to do ? |
javacpp cuda redist jar download very slowly from maven repo, oh my god too slow, and them to large |
After I installed cuda 12.1 ,javacpp pytorch could recognize the cuda , console show me but if tensor device change CPU to cuda ,the train process will hang-up, could not running , just for mnist example, I don't know why , the Nvidia gpu can not running for it
|
Hi @HGuillemet @saudet,I write TensorOptions ,but I find only on Tensor or AbstructTensor consctructor create instance has TensorOptions param , the DataSet DataLoader Example ExampleVector no TensorOptions param, so how to declear the javacpp pytorch use GPU? please give me an example on gpu train code if convinient ,thanks
|
Maybe the process is not hanging but is compiling PTX code. See the note at the end of the this post. About DataLoader : I don't use them, and I didn't write the mapping code. I'll have to look closer. |
Maybe ,Now I will rerunning ,I get one warning msg |
Hi, waiting 10 minutes,I got console error ,but I am sure cuda could use,
|
HI, I get success running result, trainning on gpu
|
Is this issue solved and can be closed ? |
yeah ,let me close it |
HI, I want to train mnist example with javacpp pytorch on windows 11 with Nvidia gpu RTX 3060 ,but after I import pytorch-gpu dependency ,but also can not invoke gpu to train only on cpu ,I don't why , is the nvidia driver version or cuda version incompatible with javacpp pytorch,or I need import other jar ? or I need change code ? @HGuillemet @saudet
the mnist example coda just similar as our readme ,cpu as running successfully.
···
/* try to use MKL when available */
System.setProperty("org.bytedeco.openblas.load", "mkl")
// Create a new Net.
val net = new SimpleMNIST.Net
。。。
···
The text was updated successfully, but these errors were encountered: