Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3699624
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T05:07:31+00:00 2026-05-19T05:07:31+00:00

When compiling your CUDA code, you have to select for which architecture your code

  • 0

When compiling your CUDA code, you have to select for which architecture your code is being generated. nvcc provides two parameters to specify this architecture, basically:

  • arch specifies the virtual arquictecture, which can be compute_10, compute_11, etc.
  • code specifies the real architecture, which can be sm_10, sm_11, etc.

So a command like this:

nvcc x.cu -arch=compute_13 -code=sm_13

Will generate ‘cubin’ code for devices with 1.3 compute capability. Please correct me if I’m wrong. Which I would like to know is which are the default values for these two parameters? Which is the default architecture that nvcc uses when no value for arch or code is specified?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T05:07:32+00:00Added an answer on May 19, 2026 at 5:07 am

    Ok, I’ve finally managed to discover the default values. My fault for not reading the whole chapter on GPU compilation in the NVCC documentation from the beginning to the very very end. So,

    nvcc x.cu
    

    is equivalent for

    nvcc x.cu –arch=compute_10 -code=sm_10,compute_10
    

    Those are the default values. The compilation is performed by default to the virtual architecture compute_10, and the a.out that results from the compilation will include the CUBIN code for the sm_10 real architecture, and the PTX assembly code for the compute_10 architecture, which will be recompiled ‘just in time’ by the CUDA driver if your architecture is greater than sm_10.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When compiling the following code: void DoSomething(int Numbers[]) { int SomeArray[] = Numbers; }
I'm compiling a simple .c in visual c++ with Compile as C Code (/TC)
Basically what the title says: what's the process for compiling your average go* file?
I have two questions: (1) I learned somewhere that -O3 is not recommended with
I'm compiling Great Ideas how to optimize and improve your CSS. What are your
Whilst compiling with avr-gcc I have encountered linker errors such as the following: undefined
When compiling this code I get: fatal error C1083: Cannot open include file: 'fstream.h':
Compiling FluidSynth 1.1.1 from source. I have unresolved external symbol with glib, using Visual
i'm compiling a .net 3.5 solution with msbuild with this line of code: msbuild.exe
Compiling a C++ file takes a very long time when compared to C# and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.