[all-commits] [llvm/llvm-project] e2356f: [libc] Add special handling for CUDA PTX features
Joseph Huber via All-commits
all-commits at lists.llvm.org
Mon Apr 17 09:52:01 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e2356fb07e57538cbe5f731f23fc574848ea9bb1
https://github.com/llvm/llvm-project/commit/e2356fb07e57538cbe5f731f23fc574848ea9bb1
Author: Joseph Huber <jhuber6 at vols.utk.edu>
Date: 2023-04-17 (Mon, 17 Apr 2023)
Changed paths:
M libc/cmake/modules/LLVMLibCObjectRules.cmake
M libc/cmake/modules/LLVMLibCTestRules.cmake
M libc/startup/gpu/nvptx/CMakeLists.txt
Log Message:
-----------
[libc] Add special handling for CUDA PTX features
The NVIDIA compilation path requires some special options. This is
mostly because compilation is dependent on having a valid CUDA
toolchain. We don't actually need the CUDA toolchain to create the
exported `libcgpu.a` library because it's pure LLVM-IR. However, for
some language features we need the PTX version to be set. This is
normally set by checking the CUDA version, but without one installed it
will fail to build. We instead choose a minimum set of features on the
desired target, inferred from
https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#release-notes
and the PTX refernece for functions like `nanosleep`.
Reviewed By: tianshilei1992
Differential Revision: https://reviews.llvm.org/D148532
More information about the All-commits
mailing list