2 ms·
What's wrong with the code? I have CUDA 10 installed and all Nvidia's shipped samples work fine, while this doesn't. I'm new and totally lost, how can this be d
by weebhard 8y ago
What's wrong with the code? I have CUDA 10 installed and all Nvidia's shipped samples work fine, while this doesn't. I'm new and totally lost, how can this be debug?
[weeb@neet ~/repo/raytracinginoneweekendincuda (ch01_output_cuda)]
$ ./cudart
Rendering a 1200x600 image in 8x8 blocks.
CUDA error = 48 at main.cu:48 'cudaGetLastError()'
- Robadob 8y agocuda error 48 is apparently "No Kernel Image available for execution on this device" Make sure that you're building for the appropriate device architecture. http://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ http://arnon.dk/matching-sm-architectures-arch-and-gencode-f...
- weebhard 8y agothanks! that did it, works now. Makefile had "sm_60" arch flag while my card is sm_50.
- twtw 8y ago"I'm new and totally lost" Then I'll give you some unsolicited advice: 1. Don't assume it's someone else's fault - "What's wrong with the code" is the wrong first question. 2. Read the original article, in its entirety. Fortunately people are still nice enough to help you, but the combo of "how is this screwed up" and "I didn't thoroughly read the article" is off-putting to people who would otherwise love to assist you. The relevant section: > If you start with my Makefile, note that I build for a GTX 1070 card using specific -gencode flags for that card (-gencode arch=compute_60,code=sm_60). You will want to adjust the architecture and feature settings for the GPU or GPUs you will be running on.