jcuda.CudaException: CUDA_ERROR_INVALID_PTX

Hi everyone, im interesting on learning how to program on GPU using jCuda.
After installing Cuda and adding jCuda library to my sample project i was getting some errors that i manage to solve (not sure if propeply)
first one was „Cannot find compiler ‚cl.exe‘“, second one was " nvcc fatal : Microsoft Visual Studio configuration file ‚vcvars64.bat‘ could not be found".
Now i have error that i wasn’t find any solution for: „jcuda.CudaException: CUDA_ERROR_INVALID_PTX“

full error:
Exception in thread „main“ jcuda.CudaException: CUDA_ERROR_INVALID_PTX
at jcuda.driver.JCudaDriver.checkResult(JCudaDriver.java:359)
at jcuda.driver.JCudaDriver.cuModuleLoadDataEx(JCudaDriver.java:2438)
at jcuda.utils.KernelLauncher.initModule(KernelLauncher.java:688)
at jcuda.utils.KernelLauncher.create(KernelLauncher.java:395)
at jcuda.utils.KernelLauncher.create(KernelLauncher.java:321)
at jcuda.utils.KernelLauncher.compile(KernelLauncher.java:270)
at Kernal.main(Kernal.java:20)

I didn’t build the code itself, its just this code that i lunch: http://www.jcuda.org/utilities/KernelLauncherSample.java

Using Cuda 11.3, and Eclipse IDE

Hello,

First of all: When you’re using CUDA 11.3, then there is no matching JCuda version available yet. The latest version of CUDA that is supported via JCuda is 11.2. (The update for 11.3 will come soon…)

Beyond that: The KernelLauncher class (as part of the „utilities“ that I once created) has not been updated for a while, and it’s not clear which PTX file you are trying to use there.

One sample to get started with may be jcuda-samples/JNvrtcVectorAdd.java at master · jcuda/jcuda-samples · GitHub (which should work with CUDA 11.2 and JCuda 11.2)

1 „Gefällt mir“

Thank you for the help, I will try different version of Cuda :smiley: