1

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?

prmottajr
  • 1,816
  • 1
  • 13
  • 22
  • Without an [MCVE] 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 Oct 03 '16 at 05:41
  • 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 Oct 03 '16 at 08:48
  • 1
    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 Oct 03 '16 at 11:39
  • 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 Oct 03 '16 at 11:54
  • 1
    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 Oct 03 '16 at 14:09
  • The first attempt was with it from the samples folder. Then I made the change, but I'm suspecting of something related with the CUDA capability because the other machine that was used that worked has a gt 625m. The only machine that is not working is the one with the geforce 830m. – prmottajr Oct 03 '16 at 14:14
  • Yesterday I had the opportunity to test both the original code and the modified version on a system with a quadro k620 which has CUDA capability 5.0 and both worked fine. The system was a desktop not using bumblebee and the nvidia driver was 352. I will try to downgrade the driver on the laptop and check again. – prmottajr Oct 04 '16 at 12:45

1 Answers1

0

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.

prmottajr
  • 1,816
  • 1
  • 13
  • 22