Cannot get CUB to compile with nsight on CUDA 9.1

Hello - First time posting.

I’m trying to go through the example program given on CUB here:

Following the instructions at:

  1. I created a project in nsight
  2. Added the CUB files in a directory in the project.
  3. Added the cub folder to my include path flag

The compiler seems to find all the includes correctly. However, I get the error

Method 'SortBlockedToStriped' could not be resolved. Line 118

This is from the line of code:


I’m kind of at a loss since this is based on their example code and I followed their instructions. Am I missing something in the project setup? I checked the block_radix_sort.cuh file and saw that the method is defined. Not sure why it won’t compile. Any help is appreciated. Thanks so much!


Here’s my console output:

19:46:41 **** Build of configuration Debug for project CUBTest ****
make all 
Building file: ../
Invoking: NVCC Compiler
/usr/local/cuda-9.1/bin/nvcc -I"/home/eclipse/cuda-workspace/CUBTest" -G -g -O0 -std=c++11 -gencode arch=compute_37,code=sm_37  -odir "." -M -o "test.d" "../"
/usr/local/cuda-9.1/bin/nvcc -I"/home/eclipse/cuda-workspace/CUBTest" -G -g -O0 -std=c++11 --compile --relocatable-device-code=false -gencode arch=compute_37,code=compute_37 -gencode arch=compute_37,code=sm_37  -x cu -o  "test.o" "../"
Finished building: ../
Building target: CUBTest
Invoking: NVCC Linker
/usr/local/cuda-9.1/bin/nvcc --cudart static --relocatable-device-code=false -gencode arch=compute_37,code=compute_37 -gencode arch=compute_37,code=sm_37 -link -o  "CUBTest"  ./test.o   
Finished building target: CUBTest

The console output seems to be fine and the it shows the project was successfully built. Where is the compiler error?

Hm, I guess it’s really an nsight error and not a compiler error. I tried running the code and got an expected output. The error is listed under the problems tab down at the bottom. I guess I will ignore that for now. Any idea how to make that go away?

Try to run the indexer again. Right click on the project-> Indexer -> Rebuild.