Pages

Sunday, 24 March 2013

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

19 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
  7. Helpful data accessible here, Thanks This is very interesting article, Very skilled blogger.

    ReplyDelete
  8. Excellent post. I was always check this blog, and I’m impressed. Greatjob!

    ReplyDelete
  9. Wow! Such an amazing and helpful post this is. you're great buddy

    ReplyDelete
  10. Satisfied with all the information I found in this article. Very helpful.

    ReplyDelete
  11. I enjoy every little bit of it. I bookmarked to check out new stuff of this blog. Thanks... MM

    ReplyDelete
  12. Your blog have nice information, I got good ideas from this amazing blog... MM

    ReplyDelete
  13. I admire this blog here. Awesome article, keep doing it! thanks!... MM

    ReplyDelete
  14. I learned a lot in this blog. Thank you very much for sharing good content... MM

    ReplyDelete
  15. I will support you. Such a very useful article. A must read post, Thanks a lot... MM

    ReplyDelete
  16. Aw, this was an extremely good post. thanks. Pretty great post. Thankyou... MM

    ReplyDelete
  17. I have bookmarked this site to check out the new stuff post. Keep it up, you're great... MM

    ReplyDelete
  18. This is a clear and practical explanation of an issue that trips up a lot of people when they first start working with CUDA tooling. The disconnect between the actual GPU capability and the compiler flags in Visual Profiler can be frustrating, especially when errors like atomicAdd being undefined do not immediately point to an architecture mismatch.

    What works well here is how you tie the command line approach back to the Visual Profiler configuration. Showing the exact change from compute_10 to compute_30 makes it obvious what the tool is really doing under the hood and helps readers build a mental model instead of just following clicks. That understanding pays off when they move between IDEs, command line builds, or CI environments.

    From a quality perspective, this kind of documentation is invaluable. Configuration issues are often harder to diagnose than code bugs, and having clear steps reduces trial and error. Capturing these setup nuances alongside test scenarios and build requirements in a shared place, such as Tuskr test management software, helps teams avoid rediscovering the same problems as hardware and toolchains evolve.

    ReplyDelete

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