Make sure that you're building for the appropriate device architecture.
http://arnon.dk/matching-sm-architectures-arch-and-gencode-f...
Make sure that you're building for the appropriate device architecture.
http://arnon.dk/matching-sm-architectures-arch-and-gencode-f...
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.