Cuda Error Unknown


#21

Hi There,

Run some tests… machine 2(GTX280) passed all the test while the machine I usually work(GT640M) with failed … exact same code…
So maybe it something with drivers or some other problem.

Sorry for the fuzz, I should have tested in a second machine first.

Thanks for the help.


#22

Well, it should work on all machines supporting CUDA. Although it’s good to hear that it does not seem to be a general problem (with JCuda), I wonder what might have caused the error. As far as I know, the “Modility-Cards” (like “GT640M”) tend to be a little bit more picky concerning drivers and feature support, but if it does not work with the latest drivers, this is certainly a bug.


#23

Although this error seemed to be resolved and be related to the drivers/setup of the target machine, I should definitively have examined this further :frowning:

It IS related to a bug in JCuda: It is currently not possible to launch a kernel twice using the same pointer instance of the ‘kernel parameters’. So for example, when using code like this

Pointer kernelParameters = Pointer.to(...);
for (int i=0; i<n; i++)
{
    cuLaunchKernel(...,kernelParameters,...);
}

then the second kernel launch will cause a CUDA_ERROR_UNKNOWN.

A simple workaround is to create a new pointer instance for the kernel parameters for each call:

for (int i=0; i<n; i++)
{
    Pointer kernelParameters = Pointer.to(...);
    cuLaunchKernel(...,kernelParameters,...);
}

But of course, I’m currently examining this bug and will fix it as soon as possible.