[llvm] [ELF] Add CPU name detection for CUDA architectures (PR #75964)
Joseph Huber via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 19 15:33:27 PST 2023
================
@@ -517,6 +519,73 @@ StringRef ELFObjectFileBase::getAMDGPUCPUName() const {
}
}
+StringRef ELFObjectFileBase::getNVPTXCPUName() const {
+ assert(getEMachine() == ELF::EM_CUDA);
+ unsigned SM = getPlatformFlags() & ELF::EF_CUDA_SM;
----------------
jhuber6 wrote:
I mostly copied this from the existing AMDGPU version and kept the style.
https://github.com/llvm/llvm-project/pull/75964
More information about the llvm-commits
mailing list