Skip to content

Commit

Permalink
[libc] Ignore unknown CUDA versions for libc targeting NVPTX
Browse files Browse the repository at this point in the history
Summary:
We generally need a CUDA toolchain to build the tests for the GPU `libc`
targeting NVPTX. However, clang will commonly emit warnings on versions
that are too new. We can ignore these in `libc` since we are manually
specifying the `+ptx` version to use whenever we compile. So we do not
need to worry about unexpected changes and we do not depend on any newer
features. So this should not be problematic.
  • Loading branch information
jhuber6 committed Apr 21, 2023
1 parent a73cd00 commit 1c968f7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libc/cmake/modules/LLVMLibCObjectRules.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ endfunction()
function(get_nvptx_compile_options output_var gpu_arch)
set(nvptx_options "")
list(APPEND nvptx_options "-march=${gpu_arch}")
list(APPEND nvptx_options "-Wno-unknown-cuda-version")
if(${gpu_arch} STREQUAL "sm_35")
list(APPEND nvptx_options "--cuda-feature=+ptx60")
elseif(${gpu_arch} STREQUAL "sm_37")
Expand Down

0 comments on commit 1c968f7

Please sign in to comment.