CUDA

Open topic with navigation

You are here: How To: Set Breakpoints in a Shader > Walkthrough: Debugging a CUDA Application > CUDA Project Properties

CUDA Project Properties

NVIDIA® Nsight™ Application Development Environment for Heterogeneous Platforms, Visual Studio Edition 6.0 User Guide 
Send Feedback 


With NVIDIA Nsight, you can set parameters of your CUDA project in order to customize your debugging experience.

To configure your project's CUDA properties page:

  1. In the Solution Explorer, click on the project name so that it is highlighted.
  2. From the Project menu, choose Properties. The Property Pages window opens.
  3. Select CUDA C/C++ in the left pane.

Common

On the Common page, you can configure the following options:

  1. CUDA Toolkit Custom Dir — This option sets a custom path to the CUDA toolkit. You can edit the path, select "Browse" to choose the path, or select "inherit from parent or project defaults." 
  2. Source Dependencies — This option allows you to add additional source file dependencies. If you have a dependency that has been set with an #include statement, it does not need to be explicitly specified in this
  3. Compiler Output (obj/cubin) — This sets the output as a an .obj or a .cubin file. The default setting is $(IntDir)%(Filename)%(Extension).obj.
  4. Additional Include Directories — This option allows you to list at least one additional directory to add to the include path. If you have more than one, use a semi-colon to separate them.
  5. Use Host Include Directories — This option specifies whether or not to use the additional include directories that are used by the host compiler for device code.
  6. Keep Preprocessed Files — This option allows you to choose whether or not the preprocessor files generated by the CUDA compiler (for example, .ptx.cubin.cudafe1.c, etc.) will be deleted.
  7. Keep Directory — This option sets the path the directory where the preprocessor files generated by the CUDA compiler will be kept.
  8. Generate Relocatable Device Code — This setting chooses whether or not to compile the input file into an object file that contains relocatable device code.
  9. NVCC Compilation Type — This option sets your desired output of NVCC compilation. Choices here include the following: 
    • Generate hybrid object file (--compile
    • Generate hybrid .c file (-cuda
    • Generate .gpu file (-gpu
    • Generate .cubin file (-cubin
    • Generate .ptx file (-ptx
  10. CUDA Runtime — This option allows you to specify the type of CUDA runtime library to be used. The choices here include the following: 
    • No CUDA runtime library (-cudart none
    • Shared/dynamic CUDA runtime library (-cudart shared
    • Static CUDA runtime library (-cudart static
  11. Target Machine Platform — This sets the platform of the target machine (either x86 or x64).

Device

On the Device page, you can configure the following options: 

  1. C interleaved in PTXAS Output — This setting chooses whether or not to insert source code into generated PTX.
  2. Code Generation — This option specifies the names of the NVIDIA GPU architectures to generate code for. If you click Edit from the drop-down menu, the following pop-up appears: 

    If you edit this field, the correct syntax to use is [arch],[code] (for example, compute_10,sm_10). If the selected NVCC Compilation Type is compile, then multiple arch/code pairs may be listed, separated by a semi-colon (for example, compute_10,sm_10;compute_20,sm_20).

    Valid values for arch and code include the following: 

    • compute_10
    • compute_11
    • compute_12
    • compute_13
    • compute_20
    • compute_30
    • sm_10
    • sm_11
    • sm_12
    • sm_13
    • sm_20
    • sm_21
    • sm_30
    • sm_35 
  3. Generate GPU Debug Information — This setting selects whether or not GPU debugging information is generated by the CUDA compiler.
  4. Generate Line Number Information — This option chooses whether or not to generate line number information for device code. If Generate GPU Debug Information is on (-G), line information (-lineinfo) is automatically generated as well.
  5. Max Used Register — This option specifies the maximum amount of registers that GPU functions can use.
  6. Verbose PTXAS Output — This option selects whether or not to use verbose PTXAS output.

Host 

On the Host page, you can configure the following options: 

  1. Additional Compiler Options — This setting lists additional host compiler options that are not supported by the host's project properties.
  2. Preprocessor Definitions — This option allows you to list preprocessor defines.
  3. Use Host Preprocessor Definitions — This option selects whether or not to use the defines that were used by the host compiler for device code.
  4. Emulation — This option specifies whether or not to generate emulated code.
  5. Generate Host Debug Information — This option specifies whether or not the host debugging information will be generated by the CUDA compiler.
  6. Use Fast Math — This option selects whether or not to make use of the fast math library.
  7. Optimization — This field selects the option for code optimization. Available choices include the following: 
    • <inherit from host> 
    • Disabled (/Od)
    • Minimize Size (/O1
    • Maximize Speed (/O2
    • Full Optimization (/Ox)
  8. Runtime Library — This field selects the runtime library to use for linking. Available choices include the following: 
    • <inherit from host> 
    • Multi-Threaded (/Mt)
    • Multi-Threaded Debug (/Mtd
    • Multi-Threaded DLL (/MD)
    • Multi-Threaded Debug DLL (/MDd)
    • Single-Threaded (/ML
    • Single-Threaded Debug (/MLd)
  9. Basic Runtime Checks — This field performs basic runtime error checks, incompatible with any optimization type other than debug. Available choices include the following: 
    • <inherit from host>
    • Default
    • Stack Frames (/RTCs)
    • Uninitialized Variables (/RTCu)
    • Both (/RTC1
  10. Enable Run-Time Type Info — This option chooses whether or not to add code for checking C++ object types at run time.
  11. Warning Level — This option selects how strictly you want the compiler to be when checking for potentially suspect constructs. Available choices here include: 
    • <inherit from host> 
    • Off: Turn Off All Warnings (/W0)
    • Level 1 (/W1)
    • Level 2 (/W2)
    • Level 3 (/W3)
    • Level 4 (/W4)
    • Enable All Warnings (/Wall)

Command Line

The Command Line page shows the approximate command line parameters, given the settings you've chosen.

 

 

 


NVIDIA® Nsight™ Application Development Environment for Heterogeneous Platforms, Visual Studio Edition User Guide Rev. 6.0.180917 ©2009-2018. NVIDIA Corporation. All Rights Reserved.

previous topicnext topic

Open topic with navigation

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值