carlosgalvezp updated this revision to Diff 385286. carlosgalvezp added a comment.
Update release notes CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113249/new/ https://reviews.llvm.org/D113249 Files: clang/include/clang/Basic/BuiltinsNVPTX.def clang/include/clang/Basic/Cuda.h clang/lib/Basic/Cuda.cpp clang/lib/Basic/Targets/NVPTX.cpp clang/lib/Driver/ToolChains/Cuda.cpp llvm/docs/CompileCudaWithLLVM.rst 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 @@ -93,6 +93,8 @@ "Use PTX version 7.3">; def PTX74 : SubtargetFeature<"ptx74", "PTXVersion", "74", "Use PTX version 7.4">; +def PTX75 : SubtargetFeature<"ptx75", "PTXVersion", "75", + "Use PTX version 7.5">; //===----------------------------------------------------------------------===// // NVPTX supported processors. Index: llvm/docs/CompileCudaWithLLVM.rst =================================================================== --- llvm/docs/CompileCudaWithLLVM.rst +++ llvm/docs/CompileCudaWithLLVM.rst @@ -23,8 +23,8 @@ ------------- CUDA is supported since llvm 3.9. Clang currently supports CUDA 7.0 through -10.1. If clang detects a newer CUDA version, it will issue a warning and will -attempt to use detected CUDA SDK it as if it were CUDA-10.1. +11.5. If clang detects a newer CUDA version, it will issue a warning and will +attempt to use detected CUDA SDK it as if it were CUDA 11.5. Before you build CUDA code, you'll need to have installed the CUDA SDK. See `NVIDIA's CUDA installation guide Index: clang/lib/Driver/ToolChains/Cuda.cpp =================================================================== --- clang/lib/Driver/ToolChains/Cuda.cpp +++ clang/lib/Driver/ToolChains/Cuda.cpp @@ -65,6 +65,8 @@ return CudaVersion::CUDA_113; if (raw_version < 11050) return CudaVersion::CUDA_114; + if (raw_version < 11060) + return CudaVersion::CUDA_115; return CudaVersion::NEW; } @@ -707,6 +709,7 @@ case CudaVersion::CUDA_##CUDA_VER: \ PtxFeature = "+ptx" #PTX_VER; \ break; + CASE_CUDA_VERSION(115, 75); CASE_CUDA_VERSION(114, 74); CASE_CUDA_VERSION(113, 73); CASE_CUDA_VERSION(112, 72); Index: clang/lib/Basic/Targets/NVPTX.cpp =================================================================== --- clang/lib/Basic/Targets/NVPTX.cpp +++ clang/lib/Basic/Targets/NVPTX.cpp @@ -44,6 +44,7 @@ if (!Feature.startswith("+ptx")) continue; PTXVersion = llvm::StringSwitch<unsigned>(Feature) + .Case("+ptx75", 75) .Case("+ptx74", 74) .Case("+ptx73", 73) .Case("+ptx72", 72) Index: clang/lib/Basic/Cuda.cpp =================================================================== --- clang/lib/Basic/Cuda.cpp +++ clang/lib/Basic/Cuda.cpp @@ -40,6 +40,8 @@ return "11.3"; case CudaVersion::CUDA_114: return "11.4"; + case CudaVersion::CUDA_115: + return "11.5"; case CudaVersion::NEW: return ""; } @@ -62,6 +64,7 @@ .Case("11.2", CudaVersion::CUDA_112) .Case("11.3", CudaVersion::CUDA_113) .Case("11.4", CudaVersion::CUDA_114) + .Case("11.5", CudaVersion::CUDA_115) .Default(CudaVersion::UNKNOWN); } @@ -241,6 +244,8 @@ return CudaVersion::CUDA_113; case 114: return CudaVersion::CUDA_114; + case 115: + return CudaVersion::CUDA_115; default: return CudaVersion::UNKNOWN; } Index: clang/include/clang/Basic/Cuda.h =================================================================== --- clang/include/clang/Basic/Cuda.h +++ clang/include/clang/Basic/Cuda.h @@ -33,9 +33,10 @@ CUDA_112, CUDA_113, CUDA_114, - FULLY_SUPPORTED = CUDA_114, + CUDA_115, + FULLY_SUPPORTED = CUDA_115, PARTIALLY_SUPPORTED = - CUDA_114, // Partially supported. Proceed with a warning. + CUDA_115, // Partially supported. Proceed with a warning. NEW = 10000, // Too new. Issue a warning, but allow using it. }; const char *CudaVersionToString(CudaVersion V); Index: clang/include/clang/Basic/BuiltinsNVPTX.def =================================================================== --- clang/include/clang/Basic/BuiltinsNVPTX.def +++ clang/include/clang/Basic/BuiltinsNVPTX.def @@ -41,7 +41,9 @@ #pragma push_macro("PTX72") #pragma push_macro("PTX73") #pragma push_macro("PTX74") -#define PTX74 "ptx74" +#pragma push_macro("PTX75") +#define PTX75 "ptx75" +#define PTX74 "ptx74|" PTX75 #define PTX73 "ptx73|" PTX74 #define PTX72 "ptx72|" PTX73 #define PTX71 "ptx71|" PTX72 @@ -827,3 +829,4 @@ #pragma pop_macro("PTX72") #pragma pop_macro("PTX73") #pragma pop_macro("PTX74") +#pragma pop_macro("PTX75")
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits