[llvm] [Offload] Optimistically accept SM architectures (PR #142399)

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 2 12:32:06 PDT 2025


================
@@ -75,8 +75,7 @@ checkMachineImpl(const object::ELFObjectFile<ELFT> &ELFObj, uint16_t EMachine) {
   } else if (Header.e_machine == EM_CUDA) {
     if (~Header.e_flags & EF_CUDA_64BIT_ADDRESS)
       return createError("Invalid CUDA addressing mode");
-    if ((Header.e_flags & EF_CUDA_SM) < EF_CUDA_SM35 ||
-        (Header.e_flags & EF_CUDA_SM) > EF_CUDA_SM90)
+    if ((Header.e_flags & EF_CUDA_SM) < EF_CUDA_SM35)
----------------
jhuber6 wrote:

It's supposed to check if we can run it, so we can be optimistic. Kind of just assumed that since sm_35 is fully deprecated we should reject it.

https://github.com/llvm/llvm-project/pull/142399


More information about the llvm-commits mailing list