Prefer Your Language

Search This Blog

How to specify architecture while compiling CUDA program in Visual profiler How to change command line flag in CUDA


How to specify architecture while compiling CUDA program in Visual profiler
How to change command line flag in CUDA

Hello, today I’ll let you know how to change compilation option such as flag in visual profiler. Sometimes it happens we need to specify the architecture of our GPU to run any sample code. For example, if your code contain “atomicAdd()” function then you SM architecture
should be > SM10, although you SM architecture is greater than 1.0 but you can’t Build your project in Visual profiler because of compiler flag is SM10. When you try to do this visual profiler through an error like this;
atomicAdd undefined identifier

In this case you specifically, specify architecture greater than SM10 in compiler flag.
Let us compile our code using command line;
nvcc –arch=sm__30

Same you want to do in your visual profiler. So you need to change this line
nvcc  -gencode=arch=compute_10,code=\"sm_30,compute_30\

To
nvcc  -gencode=arch=compute_30,code=\"sm_30,compute_30\

Procedure to achieve this;
Step 1: Open your project properties



Step 2: Go to your GPU option


Step 3: Change GPU architecture value to required SM value, in this case I have change it from SM10 to SM30




Step 4 : You are done



Got Questions?

Feel free to ask me any question by commenting below because I'd be happy to walk you through step by step! 

Want to Contact us? Click here

7 comments:

  1. What a great approach to the subject, I was looking for. Thanks for these tips

    ReplyDelete
  2. As I can see, there are even more different programming languages, and I hear about it for the first time. Anyway, I am a user of applications running in the cloud because I know that such services always offer help in case of problems. I like to use solutions from https://grapeup.com/cloudboostr/support-and-services/ and more I've never had any problems.

    ReplyDelete
  3. Great Post Keep sharing such informative posts.

    Apply Now For android application development course

    Call Now on 7070905090

    ReplyDelete
  4. What’s up, I wish for to subscribe for this website to get latest updates, therefore where can I do it please help out.

    Jaipur Raj University BA Final Year Result

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete
  6. Ask him any Questions about herpes

    […] It’s a crazy miracle product. Read my review here. […]

    I was cured of herpes simplex virus his contact ___________Robinsonbuckler11@gmail. com.......................

    this is the best herbal remedy…

    ReplyDelete

Help us to improve our quality and become contributor to our blog

Become a contributor to this blog. Click on contact us tab
Blogger Template by Clairvo