1
votes

I am trying to use the ptxjit sample from the CUDA SDK as the basis for instrument the interaction with the GPU device.

I've managed to successfully compile the instrumentation code, and control the device to load and execute a PTX module with a Geforce GT440 that has CUDA capability 2.0.

When compiling the same instrumentation code on a (laptop using bumblebee to control the discrete GPU) system with a Geforce 830M that has CUDA capability 5.0 the code compiles but gives me 209 (CUDA_ERROR_NO_BINARY_FOR_GPU).

I've tried to compile the kernel to be compatible with CUDA capability 5.0 but had no success, still the same error.

Any ideas?

1
Without an minimal reproducible example it is very hard to say what is wrong. Normally CUDA_ERROR_NO_BINARY_FOR_GPU would mean that you either have a CUBIN without code for the correct architecture in it, or your PTX contained a syntax error or something else during the JIT compilation made the compile call fail. - talonmies
As I mentioned, I using the code provided on the CUDA SDK, but I will copy a part of it along with the ptx. - prmottajr
are you actually building and running the ptxjit sample project that comes with the CUDA SDK? Or are you taking this ptxjit sample code and dropping it into your own project? Which CUDA version are you using? - Robert Crovella
Yes, I started with the sample provided with the 7.5 CUDA SDK. The strange thing is that on a system with the gt440 it works, but on the laptop with the 830m it does not. - prmottajr
You may have made some changes that broke the sample. In your question you state "I tried to compile the kernel to be compatible with..." but the sample code project is already set up that way. If you made any changes at all to that project you may have broken it. - Robert Crovella

1 Answers

0
votes

In the end the problem was with the driver. It seams that it affects only the functions that are used for PTX code loading with GPUs that have CUDA Capability 5.0.

I removed all the nvidia driver packages that were updated recently and installed the driver and OpenGL libraries that comes with the CUDA SDK. The driver version for SDK 7.5 is 352.39, with this driver both the original ptxjit sample as well as the modified one executed perfectly as on the other systems.

I don't have any GPU with CUDA capability 3.0 to test if the same problem would appear, also, I didn't updated my desktop to the 367.44 driver to see if it would break the ptxjit sample.

For now, the solution is to keep the driver that comes with the CUDA SDK and turn off updates from the nvidia repository.