aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/Cuda.cpp
diff options
context:
space:
mode:
authorTim Renouf <tim.renouf@amd.com>2020-10-06 18:23:59 +0100
committerTim Renouf <tim.renouf@amd.com>2020-10-10 17:22:22 +0100
commit666ef0db208bb3880115bdc133e72e954ed55300 (patch)
treed859f39dd5ed089ec74f1553d5021a7796493fb0 /clang/lib/Basic/Cuda.cpp
parentd48b249b71628f3a73540734f50c6aae21828566 (diff)
downloadllvm-666ef0db208bb3880115bdc133e72e954ed55300.zip
llvm-666ef0db208bb3880115bdc133e72e954ed55300.tar.gz
llvm-666ef0db208bb3880115bdc133e72e954ed55300.tar.bz2
[AMDGPU] Add gfx602, gfx705, gfx805 targets
At AMD, in an internal audit of our code, we found some corner cases where we were not quite differentiating targets enough for some old hardware. This commit is part of fixing that by adding three new targets: * The "Oland" and "Hainan" variants of gfx601 are now split out into gfx602. LLPC (in the GPUOpen driver) and other front-ends could use that to avoid using the shaderZExport workaround on gfx602. * One variant of gfx703 is now split out into gfx705. LLPC and other front-ends could use that to avoid using the shaderSpiCsRegAllocFragmentation workaround on gfx705. * The "TongaPro" variant of gfx802 is now split out into gfx805. TongaPro has a faster 64-bit shift than its former friends in gfx802, and a subtarget feature could be set up for that to take advantage of it. This commit does not make that change; it just adds the target. V2: Add clang changes. Put TargetParser list in order. V3: AMDGCNGPUs table in TargetParser.cpp needs to be in GPUKind order, so fix the GPUKind order. Differential Revision: https://reviews.llvm.org/D88916 Change-Id: Ia901a7157eb2f73ccd9f25dbacec38427312377d
Diffstat (limited to 'clang/lib/Basic/Cuda.cpp')
-rw-r--r--clang/lib/Basic/Cuda.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Basic/Cuda.cpp b/clang/lib/Basic/Cuda.cpp
index 7de42c1..42a8a09 100644
--- a/clang/lib/Basic/Cuda.cpp
+++ b/clang/lib/Basic/Cuda.cpp
@@ -73,15 +73,18 @@ CudaArchToStringMap arch_names[] = {
SM(75), // Turing
SM(80), // Ampere
GFX(600), // tahiti
- GFX(601), // pitcairn, verde, oland,hainan
+ GFX(601), // pitcairn, verde
+ GFX(602), // oland, hainan
GFX(700), // kaveri
GFX(701), // hawaii
GFX(702), // 290,290x,R390,R390x
GFX(703), // kabini mullins
GFX(704), // bonaire
+ GFX(705),
GFX(801), // carrizo
GFX(802), // tonga,iceland
GFX(803), // fiji,polaris10
+ GFX(805), // tongapro
GFX(810), // stoney
GFX(900), // vega, instinct
GFX(902), GFX(904), GFX(906), GFX(908), GFX(909),