[PATCH] D100126: AMDGPU: Add gfx90c support to code object v2 for backwards compatibility
Konstantin Zhuravlyov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 8 10:05:22 PDT 2021
kzhuravl created this revision.
kzhuravl added a reviewer: t-tye.
Herald added subscribers: kerbowa, hiraditya, tpr, dstuttard, yaxunl, nhaehnle, jvesely, arsenm.
kzhuravl requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.
https://reviews.llvm.org/D100126
Files:
llvm/docs/AMDGPUUsage.rst
llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
llvm/test/CodeGen/AMDGPU/tid-code-object-v2-backwards-compatibility.ll
Index: llvm/test/CodeGen/AMDGPU/tid-code-object-v2-backwards-compatibility.ll
===================================================================
--- /dev/null
+++ llvm/test/CodeGen/AMDGPU/tid-code-object-v2-backwards-compatibility.ll
@@ -0,0 +1,5 @@
+; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90c -mattr=-xnack --amdhsa-code-object-version=2 < %s 2>&1 | FileCheck --check-prefix=GFX90C-VALID %s
+; RUN: not --crash llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90c --amdhsa-code-object-version=2 < %s 2>&1 | FileCheck --check-prefix=GFX90C-ERROR %s
+
+; GFX90C-VALID: .amd_amdgpu_isa "amdgcn-amd-amdhsa--gfx90c"
+; GFX90C-ERROR: LLVM ERROR: AMD GPU code object V2 does not support processor gfx90c with XNACK being ON or ANY
Index: llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
+++ llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
@@ -438,7 +438,13 @@
} else if (Processor == "gfx906") {
if (isXnackOnOrAny())
Processor = "gfx907";
- } else {
+ } else if (Processor == "gfx90c") {
+ if (isXnackOnOrAny())
+ report_fatal_error(
+ "AMD GPU code object V2 does not support processor " + Processor +
+ " with XNACK being ON or ANY");
+ }
+ else {
report_fatal_error(
"AMD GPU code object V2 does not support processor " + Processor);
}
Index: llvm/docs/AMDGPUUsage.rst
===================================================================
--- llvm/docs/AMDGPUUsage.rst
+++ llvm/docs/AMDGPUUsage.rst
@@ -1387,6 +1387,7 @@
``AMD:AMDGPU:9:0:5`` ``gfx904:xnack+``
``AMD:AMDGPU:9:0:6`` ``gfx906:sramecc-:xnack-``
``AMD:AMDGPU:9:0:7`` ``gfx906:sramecc-:xnack+``
+ ``AMD:AMDGPU:9:0:C`` ``gfx90c:xnack-``
==================== ==========================
.. _amdgpu-note-records-v3-v4:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100126.336156.patch
Type: text/x-patch
Size: 1940 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210408/6e6ca30c/attachment.bin>
More information about the llvm-commits
mailing list