[PATCH] D64364: [HIP] Add GPU arch gfx1010, gfx1011, and gfx1012
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp:4973-4992 case CudaArch::GFX600: case CudaArch::GFX601: case CudaArch::GFX700: case CudaArch::GFX701: case CudaArch::GFX702: case CudaArch::GFX703: case CudaArch::GFX704: tra wrote: > Just a side note: > I wonder if we need these at all -- we'll end up failing with misleading > "Unexpected NVPTX target without ptx feature" assertion. We may just remove > all non-SM_xx arch cases and replace them with default: calling > llvm_unreachable(). Perhaps in a separate patch. > I think it is intentional not to use default here, otherwise people may forget to update this part when a new nvptx arch is added. I could let gfx archs go to the path with llvm_unreachable("Unexpected Cuda arch.") though. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64364/new/ https://reviews.llvm.org/D64364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D64364: [HIP] Add GPU arch gfx1010, gfx1011, and gfx1012
This revision was automatically updated to reflect the committed changes. Closed by commit rL365799: [HIP] Add GPU arch gfx1010, gfx1011, and gfx1012 (authored by yaxunl, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D64364?vs=208489=209259#toc Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64364/new/ https://reviews.llvm.org/D64364 Files: cfe/trunk/include/clang/Basic/Cuda.h cfe/trunk/lib/Basic/Cuda.cpp cfe/trunk/lib/Basic/Targets/NVPTX.cpp cfe/trunk/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp Index: cfe/trunk/include/clang/Basic/Cuda.h === --- cfe/trunk/include/clang/Basic/Cuda.h +++ cfe/trunk/include/clang/Basic/Cuda.h @@ -66,6 +66,9 @@ GFX906, GFX908, GFX909, + GFX1010, + GFX1011, + GFX1012, LAST, }; const char *CudaArchToString(CudaArch A); Index: cfe/trunk/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp === --- cfe/trunk/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp +++ cfe/trunk/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp @@ -4930,6 +4930,9 @@ case CudaArch::GFX906: case CudaArch::GFX908: case CudaArch::GFX909: + case CudaArch::GFX1010: + case CudaArch::GFX1011: + case CudaArch::GFX1012: case CudaArch::UNKNOWN: break; case CudaArch::LAST: @@ -4985,6 +4988,9 @@ case CudaArch::GFX906: case CudaArch::GFX908: case CudaArch::GFX909: + case CudaArch::GFX1010: + case CudaArch::GFX1011: + case CudaArch::GFX1012: case CudaArch::UNKNOWN: break; case CudaArch::LAST: Index: cfe/trunk/lib/Basic/Cuda.cpp === --- cfe/trunk/lib/Basic/Cuda.cpp +++ cfe/trunk/lib/Basic/Cuda.cpp @@ -113,6 +113,12 @@ return "gfx908"; case CudaArch::GFX909: // TBA return "gfx909"; + case CudaArch::GFX1010: // TBA +return "gfx1010"; + case CudaArch::GFX1011: // TBA +return "gfx1011"; + case CudaArch::GFX1012: // TBA +return "gfx1012"; } llvm_unreachable("invalid enum"); } @@ -151,6 +157,9 @@ .Case("gfx906", CudaArch::GFX906) .Case("gfx908", CudaArch::GFX908) .Case("gfx909", CudaArch::GFX909) + .Case("gfx1010", CudaArch::GFX1010) + .Case("gfx1011", CudaArch::GFX1011) + .Case("gfx1012", CudaArch::GFX1012) .Default(CudaArch::UNKNOWN); } @@ -264,6 +273,9 @@ case CudaArch::GFX906: case CudaArch::GFX908: case CudaArch::GFX909: + case CudaArch::GFX1010: + case CudaArch::GFX1011: + case CudaArch::GFX1012: return CudaVirtualArch::COMPUTE_AMDGCN; } llvm_unreachable("invalid enum"); @@ -312,6 +324,9 @@ case CudaArch::GFX906: case CudaArch::GFX908: case CudaArch::GFX909: + case CudaArch::GFX1010: + case CudaArch::GFX1011: + case CudaArch::GFX1012: return CudaVersion::CUDA_70; } llvm_unreachable("invalid enum"); @@ -336,6 +351,9 @@ case CudaArch::GFX810: case CudaArch::GFX900: case CudaArch::GFX902: + case CudaArch::GFX1010: + case CudaArch::GFX1011: + case CudaArch::GFX1012: return CudaVersion::CUDA_80; default: return CudaVersion::LATEST; Index: cfe/trunk/lib/Basic/Targets/NVPTX.cpp === --- cfe/trunk/lib/Basic/Targets/NVPTX.cpp +++ cfe/trunk/lib/Basic/Targets/NVPTX.cpp @@ -193,6 +193,9 @@ case CudaArch::GFX906: case CudaArch::GFX908: case CudaArch::GFX909: + case CudaArch::GFX1010: + case CudaArch::GFX1011: + case CudaArch::GFX1012: case CudaArch::LAST: break; case CudaArch::UNKNOWN: ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D64364: [HIP] Add GPU arch gfx1010, gfx1011, and gfx1012
tra accepted this revision. tra added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp:4973-4992 case CudaArch::GFX600: case CudaArch::GFX601: case CudaArch::GFX700: case CudaArch::GFX701: case CudaArch::GFX702: case CudaArch::GFX703: case CudaArch::GFX704: Just a side note: I wonder if we need these at all -- we'll end up failing with misleading "Unexpected NVPTX target without ptx feature" assertion. We may just remove all non-SM_xx arch cases and replace them with default: calling llvm_unreachable(). Perhaps in a separate patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64364/new/ https://reviews.llvm.org/D64364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D64364: [HIP] Add GPU arch gfx1010, gfx1011, and gfx1012
ashi1 accepted this revision. ashi1 added a comment. This revision is now accepted and ready to land. LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64364/new/ https://reviews.llvm.org/D64364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D64364: [HIP] Add GPU arch gfx1010, gfx1011, and gfx1012
yaxunl created this revision. yaxunl added reviewers: ashi1, tra. Herald added a subscriber: jholewinski. https://reviews.llvm.org/D64364 Files: include/clang/Basic/Cuda.h lib/Basic/Cuda.cpp lib/Basic/Targets/NVPTX.cpp lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp Index: lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp === --- lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp +++ lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp @@ -4929,6 +4929,9 @@ case CudaArch::GFX904: case CudaArch::GFX906: case CudaArch::GFX909: + case CudaArch::GFX1010: + case CudaArch::GFX1011: + case CudaArch::GFX1012: case CudaArch::UNKNOWN: break; case CudaArch::LAST: @@ -4983,6 +4986,9 @@ case CudaArch::GFX904: case CudaArch::GFX906: case CudaArch::GFX909: + case CudaArch::GFX1010: + case CudaArch::GFX1011: + case CudaArch::GFX1012: case CudaArch::UNKNOWN: break; case CudaArch::LAST: Index: lib/Basic/Targets/NVPTX.cpp === --- lib/Basic/Targets/NVPTX.cpp +++ lib/Basic/Targets/NVPTX.cpp @@ -192,6 +192,9 @@ case CudaArch::GFX904: case CudaArch::GFX906: case CudaArch::GFX909: + case CudaArch::GFX1010: + case CudaArch::GFX1011: + case CudaArch::GFX1012: case CudaArch::LAST: break; case CudaArch::UNKNOWN: Index: lib/Basic/Cuda.cpp === --- lib/Basic/Cuda.cpp +++ lib/Basic/Cuda.cpp @@ -111,6 +111,12 @@ return "gfx906"; case CudaArch::GFX909: // TBA return "gfx909"; + case CudaArch::GFX1010: // TBA +return "gfx1010"; + case CudaArch::GFX1011: // TBA +return "gfx1011"; + case CudaArch::GFX1012: // TBA +return "gfx1012"; } llvm_unreachable("invalid enum"); } @@ -148,6 +154,9 @@ .Case("gfx904", CudaArch::GFX904) .Case("gfx906", CudaArch::GFX906) .Case("gfx909", CudaArch::GFX909) + .Case("gfx1010", CudaArch::GFX1010) + .Case("gfx1011", CudaArch::GFX1011) + .Case("gfx1012", CudaArch::GFX1012) .Default(CudaArch::UNKNOWN); } @@ -260,6 +269,9 @@ case CudaArch::GFX904: case CudaArch::GFX906: case CudaArch::GFX909: + case CudaArch::GFX1010: + case CudaArch::GFX1011: + case CudaArch::GFX1012: return CudaVirtualArch::COMPUTE_AMDGCN; } llvm_unreachable("invalid enum"); @@ -307,6 +319,9 @@ case CudaArch::GFX904: case CudaArch::GFX906: case CudaArch::GFX909: + case CudaArch::GFX1010: + case CudaArch::GFX1011: + case CudaArch::GFX1012: return CudaVersion::CUDA_70; } llvm_unreachable("invalid enum"); @@ -331,6 +346,9 @@ case CudaArch::GFX810: case CudaArch::GFX900: case CudaArch::GFX902: + case CudaArch::GFX1010: + case CudaArch::GFX1011: + case CudaArch::GFX1012: return CudaVersion::CUDA_80; default: return CudaVersion::LATEST; Index: include/clang/Basic/Cuda.h === --- include/clang/Basic/Cuda.h +++ include/clang/Basic/Cuda.h @@ -65,6 +65,9 @@ GFX904, GFX906, GFX909, + GFX1010, + GFX1011, + GFX1012, LAST, }; const char *CudaArchToString(CudaArch A); ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits