blt icon indicating copy to clipboard operation
blt copied to clipboard

Investigate NVCC flag '-forward-unknown-to-host-compiler' on by default

Open white238 opened this issue 3 years ago • 3 comments

https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#options-for-guiding-compiler-driver-forward-host-compiler

This seems extremely useful to always turn on.

white238 avatar Sep 03 '20 22:09 white238

CMake 3.18 seems to add this by default already...

cd builddir/blt/tests/smoke && /usr/tce/packages/cuda/cuda-11.0.182/bin/nvcc -forward-unknown-to-host-compiler -ccbin=/usr/tce/packages/clang/clang-upstream-2019.08.15/bin/clang++  -I/usr/tce/packages/cuda/cuda-11.0.182/include -isystem=/usr/tce/packages/spectrum-mpi/ibm/spectrum-mpi-2020.08.19/include -isystem=/usr/tce/packages/spectrum-mpi/ibm/spectrum-mpi-rolling-release/include -arch sm_70 --gcc-toolchain=/usr/tce/packages/gcc/gcc-8.3.1 -g --generate-code=arch=compute_70,code=[compute_70,sm_70] -Xcompiler=-fPIE -Xcompiler=-pthread -std=c++17 -x cu -c repo/cmake/blt/tests/smoke/blt_cuda_mpi_smoke.cpp -o CMakeFiles/blt_cuda_mpi_smoke.dir/blt_cuda_mpi_smoke.cpp.o

white238 avatar Sep 03 '20 23:09 white238

Good to know...

gzagaris avatar Sep 03 '20 23:09 gzagaris

This flag was added in CUDA 11 apparently.

white238 avatar Sep 03 '20 23:09 white238