Device Code Background is not working in nsight 7.5 and nsight 8.0 if following include is used:
#include <cuda_runtime_api.h>
global void test1()
{
}
device void test2()
{
}
Background color should be yellow, but is white. If you comment out include statement, both functions, test1 and test2, get yellow background.
veraj
2
Hi, andrej_domzale2
Thanks for your reporting.
I have reproduced the issue on my side and filed a ticket to our dev.
I will get back to you when I get response.
Hi
I found workaround for this problem. The problem is in indexer in Nsight. The solution (not pretty nice, but it works) is:
In file /usr/local/cuda/include/host_defines.h in line 185 add:
#if ( !defined(MY_INDEXER) )
in line 198 add:
#endif /* !defined(MY_INDEXER) */
You will get all together:
#if ( !defined(MY_INDEXER) )
#define host
location(host)
#define device
location(device)
#define global
location(global)
#define shared
location(shared)
#define constant
location(constant)
#define managed
location(managed)
#endif /* !defined(MY_INDEXER) */
Now you have to set symbol MY_INDEXER in Nsight:
Project/Properties/C/C++General/Preprocessor Include Paths, Macros etc./Entries/CUDA C/CDT User Settings Entries
klick button: Add
pull down: Preprocessor Macro
Name: MY_INDEXER
Value: 1
klick button: OK
Klick button: Apply
klick button: OK
Project/C/C++ Index/Rebuild