Skip to content

Commit

Permalink
Work-Around: CUDA 12.1 Non-Default Codelines (#3275)
Browse files Browse the repository at this point in the history
## Summary

Set `AMReX_CUDA_SHOW_CODELINES` to be `FALSE`/`OFF` by default for CUDA
12.1, since we know that `--source-in-ptx` has a NVCC regression in
debug mode.

## Additional background

- [x] rebase after #3274 was merged
- [x] close #3215
  • Loading branch information
ax3l authored Apr 26, 2023
1 parent e7e2e1e commit a5a0715
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Tools/CMake/AMReXCUDAOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,16 @@ cuda_print_option(AMReX_CUDA_DEBUG)

# both are performance-neutral debug symbols
option(AMReX_CUDA_SHOW_LINENUMBERS "Generate line-number information (optimizations: on)" ON)
option(AMReX_CUDA_SHOW_CODELINES "Generate source information in PTX (optimizations: on)" ON)
cuda_print_option(AMReX_CUDA_SHOW_LINENUMBERS)

# https://github.com/AMReX-Codes/amrex/issues/3215
# Nvidia Bug ID: 4088095
if (CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 12.1)
set(AMReX_CUDA_SHOW_CODELINES_DEFAULT OFF)
else()
set(AMReX_CUDA_SHOW_CODELINES_DEFAULT ON)
endif()
option(AMReX_CUDA_SHOW_CODELINES "Generate source information in PTX (optimizations: on)" AMReX_CUDA_SHOW_CODELINES_DEFAULT)
cuda_print_option(AMReX_CUDA_SHOW_CODELINES)

option(AMReX_CUDA_BACKTRACE "Generate host function symbol names (better cuda-memcheck)" ${AMReX_CUDA_DEBUG})
Expand Down

0 comments on commit a5a0715

Please sign in to comment.