Skip to content

Commit 7e296fb

Browse files
kuharAWoloszyn
authored andcommitted
[ROCM] Add radeon pro workstation cards to known targets (#19815)
This covers the most popular rdna3 card: w7900, w7800, w7700, and v710. Add these to known targets, as these pro cards are currently some of the most popular hw for local GPU dev work in IREE. These don't match the consumer cards 1:1. For instance, I don't see a consumer card with 70 CUs like w7800. Signed-off-by: Jakub Kuderski <[email protected]>
1 parent 577a565 commit 7e296fb

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

compiler/plugins/target/ROCM/test/target_device_features.mlir

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@
1313
//
1414
// RUN: iree-opt --pass-pipeline='builtin.module(iree-hal-assign-target-devices{targetDevices=hip},iree-hal-transformation-pipeline{serialize-executables=false})' \
1515
// RUN: --iree-hip-target=rx7900xtx %s | FileCheck %s --check-prefix=GFX1100
16+
//
17+
// RUN: iree-opt --pass-pipeline='builtin.module(iree-hal-assign-target-devices{targetDevices=hip},iree-hal-transformation-pipeline{serialize-executables=false})' \
18+
// RUN: --iree-hip-target=w7900 %s | FileCheck %s --check-prefix=GFX1100
19+
//
20+
// RUN: iree-opt --pass-pipeline='builtin.module(iree-hal-assign-target-devices{targetDevices=hip},iree-hal-transformation-pipeline{serialize-executables=false})' \
21+
// RUN: --iree-hip-target=v710 %s | FileCheck %s --check-prefix=GFX1101
22+
//
23+
// RUN: iree-opt --pass-pipeline='builtin.module(iree-hal-assign-target-devices{targetDevices=hip},iree-hal-transformation-pipeline{serialize-executables=false})' \
24+
// RUN: --iree-hip-target=w7700 %s | FileCheck %s --check-prefix=GFX1101
1625

1726
// GFX942: target = #iree_gpu.target<arch = "gfx942",
1827
// GFX942-SAME: wgp = <compute = fp64|fp32|fp16|int64|int32|int16|int8, storage = b64|b32|b16|b8,
@@ -35,6 +44,10 @@
3544
// GFX1100-SAME: mma = [<WMMA_F32_16x16x16_F16>, <WMMA_F16_16x16x16_F16>, <WMMA_I32_16x16x16_I8>, <WMMA_I32_16x16x16_I8>, <WMMA_I32_16x16x16_I8>]
3645
// GFX1100-SAME: subgroup_size_choices = [32, 64]
3746

47+
// GFX1101: target = #iree_gpu.target<arch = "gfx1101",
48+
// GFX1101-SAME: mma = [<WMMA_F32_16x16x16_F16>, <WMMA_F16_16x16x16_F16>, <WMMA_I32_16x16x16_I8>, <WMMA_I32_16x16x16_I8>, <WMMA_I32_16x16x16_I8>]
49+
// GFX1101-SAME: subgroup_size_choices = [32, 64]
50+
3851
stream.executable public @reduce_dispatch {
3952
stream.executable.export @reduce_dispatch workgroups(%arg0: index) -> (index, index, index) {
4053
%x, %y, %z = flow.dispatch.workgroup_count_from_dag_root %arg0

compiler/src/iree/compiler/Codegen/Dialect/GPU/TargetUtils/KnownTargets.cpp

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,10 @@ std::optional<TargetDetails> getAMDGPUTargetDetails(StringRef target) {
302302
static const ChipDetails rx7900xtChip = {84, "rx7900xt"};
303303
static const ChipDetails rx7800xtChip = {60, "rx7800xt"};
304304
static const ChipDetails rx7700xtChip = {54, "rx7700xt"};
305+
static const ChipDetails v710Chip = {54, "v710"};
306+
static const ChipDetails w7900Chip = {96, "w7900"};
307+
static const ChipDetails w7800Chip = {70, "w7800"};
308+
static const ChipDetails w7700Chip = {48, "w7700"};
305309

306310
// See https://llvm.org/docs/AMDGPUUsage.html#processors for gfxN to
307311
// cdnaN/rdnaN mapping.
@@ -325,6 +329,14 @@ std::optional<TargetDetails> getAMDGPUTargetDetails(StringRef target) {
325329
.Case("rx7800xt", TargetDetails{rdna3Wgp, &rx7800xtChip})
326330
// https://www.techpowerup.com/gpu-specs/radeon-rx-7700-xt.c3911
327331
.Case("rx7700xt", TargetDetails{rdna3Wgp, &rx7700xtChip})
332+
// https://www.techpowerup.com/gpu-specs/radeon-pro-v710.c4234
333+
.Case("v710", TargetDetails{rdna3Wgp, &v710Chip})
334+
// https://www.techpowerup.com/gpu-specs/radeon-pro-w7900.c4147
335+
.Case("w7900", TargetDetails{rdna3Wgp, &w7900Chip})
336+
// https://www.techpowerup.com/gpu-specs/radeon-pro-w7800.c4148
337+
.Case("w7800", TargetDetails{rdna3Wgp, &w7800Chip})
338+
// https://www.techpowerup.com/gpu-specs/radeon-pro-w7700.c4184
339+
.Case("w7700", TargetDetails{rdna3Wgp, &w7700Chip})
328340
.Cases("rdna3", "gfx1100", "gfx1101", "gfx1102", "gfx1103", "gfx1150",
329341
"gfx1151", TargetDetails{rdna3Wgp, nullptr})
330342
.Cases("rdna2", "gfx1030", "gfx1031", "gfx1032", "gfx1033", "gfx1034",
@@ -347,8 +359,8 @@ StringRef normalizeAMDGPUTarget(StringRef target) {
347359
.Cases("mi300a", "mi300x", "mi308x", "gfx942")
348360
.Cases("mi250x", "mi250", "mi210", "cdna2", "gfx90a")
349361
.Cases("mi100", "cdna1", "gfx908")
350-
.Cases("rx7900xtx", "rx7900xt", "gfx1100")
351-
.Cases("rx7800xt", "rx7700xt", "gfx1101")
362+
.Cases("rx7900xtx", "rx7900xt", "w7900", "w7800", "gfx1100")
363+
.Cases("rx7800xt", "rx7700xt", "v710", "w7700", "gfx1101")
352364
.Default("");
353365
}
354366

0 commit comments

Comments
 (0)