This revision was automatically updated to reflect the committed changes. Closed by commit rG49d982d8cbbb: [CUDA] Add support for CUDA-11.4 (authored by tra).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108239/new/ https://reviews.llvm.org/D108239 Files: clang/include/clang/Basic/Cuda.h clang/lib/Basic/Cuda.cpp clang/lib/Basic/Targets/NVPTX.cpp clang/lib/Driver/ToolChains/Cuda.cpp llvm/lib/Target/NVPTX/NVPTX.td
Index: llvm/lib/Target/NVPTX/NVPTX.td =================================================================== --- llvm/lib/Target/NVPTX/NVPTX.td +++ llvm/lib/Target/NVPTX/NVPTX.td @@ -89,6 +89,10 @@ "Use PTX version 7.1">; def PTX72 : SubtargetFeature<"ptx72", "PTXVersion", "72", "Use PTX version 7.2">; +def PTX73 : SubtargetFeature<"ptx73", "PTXVersion", "73", + "Use PTX version 7.3">; +def PTX74 : SubtargetFeature<"ptx74", "PTXVersion", "74", + "Use PTX version 7.4">; //===----------------------------------------------------------------------===// // NVPTX supported processors. Index: clang/lib/Driver/ToolChains/Cuda.cpp =================================================================== --- clang/lib/Driver/ToolChains/Cuda.cpp +++ clang/lib/Driver/ToolChains/Cuda.cpp @@ -77,6 +77,12 @@ return CudaVersion::CUDA_110; if (raw_version < 11020) return CudaVersion::CUDA_111; + if (raw_version < 11030) + return CudaVersion::CUDA_112; + if (raw_version < 11040) + return CudaVersion::CUDA_113; + if (raw_version < 11050) + return CudaVersion::CUDA_114; return CudaVersion::LATEST; } @@ -720,6 +726,8 @@ case CudaVersion::CUDA_##CUDA_VER: \ PtxFeature = "+ptx" #PTX_VER; \ break; + CASE_CUDA_VERSION(114, 74); + CASE_CUDA_VERSION(113, 73); CASE_CUDA_VERSION(112, 72); CASE_CUDA_VERSION(111, 71); CASE_CUDA_VERSION(110, 70); Index: clang/lib/Basic/Targets/NVPTX.cpp =================================================================== --- clang/lib/Basic/Targets/NVPTX.cpp +++ clang/lib/Basic/Targets/NVPTX.cpp @@ -44,6 +44,8 @@ if (!Feature.startswith("+ptx")) continue; PTXVersion = llvm::StringSwitch<unsigned>(Feature) + .Case("+ptx74", 74) + .Case("+ptx73", 73) .Case("+ptx72", 72) .Case("+ptx71", 71) .Case("+ptx70", 70) Index: clang/lib/Basic/Cuda.cpp =================================================================== --- clang/lib/Basic/Cuda.cpp +++ clang/lib/Basic/Cuda.cpp @@ -36,6 +36,10 @@ return "11.1"; case CudaVersion::CUDA_112: return "11.2"; + case CudaVersion::CUDA_113: + return "11.3"; + case CudaVersion::CUDA_114: + return "11.4"; } llvm_unreachable("invalid enum"); } @@ -54,6 +58,8 @@ .Case("11.0", CudaVersion::CUDA_110) .Case("11.1", CudaVersion::CUDA_111) .Case("11.2", CudaVersion::CUDA_112) + .Case("11.3", CudaVersion::CUDA_113) + .Case("11.4", CudaVersion::CUDA_114) .Default(CudaVersion::UNKNOWN); } @@ -194,6 +200,8 @@ case CudaArch::SM_20: case CudaArch::SM_21: return CudaVersion::CUDA_80; + case CudaArch::SM_30: + return CudaVersion::CUDA_110; default: return CudaVersion::LATEST; } @@ -227,6 +235,10 @@ return CudaVersion::CUDA_111; case 112: return CudaVersion::CUDA_112; + case 113: + return CudaVersion::CUDA_113; + case 114: + return CudaVersion::CUDA_114; default: return CudaVersion::UNKNOWN; } Index: clang/include/clang/Basic/Cuda.h =================================================================== --- clang/include/clang/Basic/Cuda.h +++ clang/include/clang/Basic/Cuda.h @@ -31,7 +31,9 @@ CUDA_110, CUDA_111, CUDA_112, - LATEST = CUDA_112, + CUDA_113, + CUDA_114, + LATEST = CUDA_114, LATEST_SUPPORTED = CUDA_101, }; const char *CudaVersionToString(CudaVersion V);
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits