This error may occurs when the gpu setting is wrong. In my experience I have chosen wrong “Generate PTX code” and “Generate GPU code” version. If you are directly running the code on your local device you can check the right version on “properties -> build -> Settings -> cuda” when you see the below pic it means that you have chosen the right version.
** remember clean the project and rebuild it to see the changes.

Feel free and ask your questions or share your experiences with us.