Skip to content

Mark NVBench headers as SYSTEM for consuming targets.#267

Closed
alliepiper wants to merge 2 commits intoNVIDIA:mainfrom
alliepiper:update-nvbench-targets-for-system-headers
Closed

Mark NVBench headers as SYSTEM for consuming targets.#267
alliepiper wants to merge 2 commits intoNVIDIA:mainfrom
alliepiper:update-nvbench-targets-for-system-headers

Conversation

@alliepiper
Copy link
Copy Markdown
Collaborator

Fixes #30.

@oleksandr-pavlyk
Copy link
Copy Markdown
Collaborator

Left review comment at the parent issue: #30 (comment)

@alliepiper
Copy link
Copy Markdown
Collaborator Author

I talked with Rob offline and I'm planning to do the same pattern as CCCL with the system header pragmas. I'm working on this in the background on a local branch, just getting testing and stuff finished up.

@oleksandr-pavlyk
Copy link
Copy Markdown
Collaborator

oleksandr-pavlyk commented Mar 21, 2026

@alliepiper Do you understand what causes compilation errors with CTK 12.9 and older GCC compilers and how to fix it?

Compilation commands

This PR ❌

/usr/bin/sccache /usr/local/cuda/bin/nvcc \
    -forward-unknown-to-host-compiler \
    -ccbin=/usr/bin/g++ \
    -DFMT_USE_BITINT=0 \
    -I/home/coder/nvbench \
    -I/home/coder/nvbench/build/cuda12.9-gcc7/nvbench-ci \
    -O3 -DNDEBUG -std=c++17 -arch=all-major \
    -Xcompiler=-fPIC -Xcompiler=-Wall -Xcompiler=-Wextra \
    -Xcompiler=-Wconversion -Xcompiler=-Woverloaded-virtual \
    -Xcompiler=-Wcast-qual -Xcompiler=-Wpointer-arith \
    -Xcompiler=-Wunused-local-typedefs -Xcompiler=-Wunused-parameter \
    -Xcompiler=-Wvla -Xcompiler=-Wno-gnu-line-marker \
    -Xcompiler=-Werror -Xcudafe=--display_error_number \
    -Wno-deprecated-gpu-targets -Xcudafe=--promote_warnings \
    -MD -MT nvbench/CMakeFiles/nvbench.main.dir/main.cu.o \
    -MF nvbench/CMakeFiles/nvbench.main.dir/main.cu.o.d \
    -x cu -c /home/coder/nvbench/nvbench/main.cu \
    -o nvbench/CMakeFiles/nvbench.main.dir/main.cu.o

Main ✅

/usr/bin/sccache /usr/local/cuda/bin/nvcc \
     -forward-unknown-to-host-compiler \
     -ccbin=/usr/bin/g++ \
     -DFMT_USE_BITINT=0 \
     -I/home/coder/nvbench \
     -I/home/coder/nvbench/build/cuda12.9-gcc7/nvbench-ci \
     -isystem /usr/local/cuda/targets/x86_64-linux/include \     # <-----
     -isystem /usr/local/cuda/include \                          # <-----
     -O3 -DNDEBUG -std=c++17 -arch=all-major \
     -Xcompiler=-fPIC -Xcompiler=-Wall -Xcompiler=-Wextra \
     -Xcompiler=-Wconversion -Xcompiler=-Woverloaded-virtual \
     -Xcompiler=-Wcast-qual -Xcompiler=-Wpointer-arith \
     -Xcompiler=-Wunused-local-typedefs -Xcompiler=-Wunused-parameter \
     -Xcompiler=-Wvla -Xcompiler=-Wno-gnu-line-marker \
     -Xcompiler=-Werror -Xcudafe=--display_error_number \
     -Wno-deprecated-gpu-targets -Xcudafe=--promote_warnings \
     -MD -MT nvbench/CMakeFiles/nvbench.main.dir/main.cu.o \
     -MF nvbench/CMakeFiles/nvbench.main.dir/main.cu.o.d \
     -x cu -c /home/coder/nvbench/nvbench/main.cu \
     -o nvbench/CMakeFiles/nvbench.main.dir/main.cu.o

@oleksandr-pavlyk
Copy link
Copy Markdown
Collaborator

I opened #330 that includes the commit from this PR and add a change to re-introduce linking of nvbench.main to CTK libraries to resolve the build break.

@alliepiper alliepiper closed this Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make nvbench targets use SYSTEM includes

2 participants