Skip to content

Validate CUDA host warning flags independently - #498

Open
cherubrock-seb wants to merge 1 commit into
NVIDIA:mainfrom
cherubrock-seb:cherub/issue-126-cuda-host-flags
Open

cherubrock-seb wants to merge 1 commit into
NVIDIA:mainfrom
cherubrock-seb:cherub/issue-126-cuda-host-flags

Conversation

@cherubrock-seb

Copy link
Copy Markdown

Fixes #126.

Warning-flag support is now checked independently for the C++ compiler and the NVIDIA CUDA host compiler.

For CUDA compilation, each forwarded -Xcompiler flag is added only when a CUDA-language compiler check confirms that nvcc with its configured host compiler accepts it. The existing top-level developer-build policy requiring matching CXX and CUDA host compilers is unchanged.

Validation:

  • Dependency-mode mixed-toolchain probe: clang++ 18.1.3 as CXX, nvcc 13.2.86 with g++ 12.4 as CUDA host.
  • -Wgnu: accepted for CXX, rejected for CUDA host, and therefore omitted from the nvcc command.
  • -Wall: accepted and retained for both CXX and CUDA host.
  • A mixed CXX/CUDA static target built successfully with the resulting flags.
  • No GPU kernel was executed.
  • Full current-tree NVBench configure was not run on this host because its CMake is 3.28.3 while current NVBench requires CMake 3.30.4.

@copy-pr-bot

copy-pr-bot Bot commented Nov 10, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@oleksandr-pavlyk

Copy link
Copy Markdown
Collaborator

Please provide configuration cmake command used that was broken before, and work now.

On my attempt to check the fix I tried:

cmake -B build-498 --preset nvbench-dev -G Ninja \
    -DCMAKE_CXX_COMPILER=$(which g++) \
    -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc \
    -DCMAKE_CUDA_ARCHITECTURES=native 
    -DCMAKE_CUDA_HOST_COMPILER=$(which clang++)

This configuration failed at cmake/NVBenchConfigTarget.cmake:66 with "NVBench developer builds require that CMAKE_CUDA_HOST_COMPILER matches CMAKE_CXX_COMPILER when using nvcc".

Same for --preset nvbench-ci.

This branch has not been deployed

No deployments
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.

Project assumes CXX compiler and and CUDACXXHOST compiler are the same

2 participants