[Mlir-commits] [mlir] [mlir][test][gpu] Migrate ROCM tests to the TargetAttr compilation wo… (PR #65805)
Fabian Mora
llvmlistbot at llvm.org
Fri Sep 8 14:05:00 PDT 2023
https://github.com/fabianmcg created https://github.com/llvm/llvm-project/pull/65805:
…rkflow
Migrate tests referencing `gpu-to-hsaco` to the new compilation workflow using TargetAttrs.
The test `Integration/GPU/ROCM/printf.mlir` crashed when I tested on MI250x, however, it also crashes with `gpu-to-hsaco`.
>From 59784147654b5a41e893db8518f576f0453a0c12 Mon Sep 17 00:00:00 2001
From: Fabian Mora <fmora.dev at gmail.com>
Date: Fri, 8 Sep 2023 20:15:32 +0000
Subject: [PATCH] [mlir][test][gpu] Migrate ROCM tests to the TargetAttr
compilation workflow
Migrate tests referencing `gpu-to-hsaco` to the new compilation workflow using TargetAttrs.
---
mlir/test/Integration/GPU/ROCM/gpu-to-hsaco.mlir | 4 ++--
mlir/test/Integration/GPU/ROCM/printf.mlir | 4 ++--
mlir/test/Integration/GPU/ROCM/two-modules.mlir | 4 ++--
mlir/test/Integration/GPU/ROCM/vecadd.mlir | 4 ++--
mlir/test/Integration/GPU/ROCM/vector-transferops.mlir | 4 ++--
5 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/mlir/test/Integration/GPU/ROCM/gpu-to-hsaco.mlir b/mlir/test/Integration/GPU/ROCM/gpu-to-hsaco.mlir
index 73cfa24fd2571aa..405471b9af00435 100644
--- a/mlir/test/Integration/GPU/ROCM/gpu-to-hsaco.mlir
+++ b/mlir/test/Integration/GPU/ROCM/gpu-to-hsaco.mlir
@@ -1,7 +1,7 @@
// RUN: mlir-opt %s \
// RUN: | mlir-opt -gpu-kernel-outlining \
-// RUN: | mlir-opt -pass-pipeline='builtin.module(gpu.module(strip-debuginfo,convert-gpu-to-rocdl,gpu-to-hsaco{chip=%chip}))' \
-// RUN: | mlir-opt -gpu-to-llvm \
+// RUN: | mlir-opt -pass-pipeline='builtin.module(gpu.module(strip-debuginfo,convert-gpu-to-rocdl),rocdl-attach-target{chip=%chip})' \
+// RUN: | mlir-opt -gpu-to-llvm -gpu-module-to-binary \
// RUN: | mlir-cpu-runner \
// RUN: --shared-libs=%mlir_rocm_runtime \
// RUN: --shared-libs=%mlir_runner_utils \
diff --git a/mlir/test/Integration/GPU/ROCM/printf.mlir b/mlir/test/Integration/GPU/ROCM/printf.mlir
index ef2b87b3a3ad9dc..ae4309c848e7149 100644
--- a/mlir/test/Integration/GPU/ROCM/printf.mlir
+++ b/mlir/test/Integration/GPU/ROCM/printf.mlir
@@ -1,6 +1,6 @@
// RUN: mlir-opt %s \
-// RUN: | mlir-opt -pass-pipeline='builtin.module(gpu.module(strip-debuginfo,convert-gpu-to-rocdl{index-bitwidth=32 runtime=HIP},gpu-to-hsaco{chip=%chip}))' \
-// RUN: | mlir-opt -gpu-to-llvm \
+// RUN: | mlir-opt -pass-pipeline='builtin.module(gpu.module(strip-debuginfo,convert-gpu-to-rocdl{index-bitwidth=32 runtime=HIP}),rocdl-attach-target{chip=%chip})' \
+// RUN: | mlir-opt -gpu-to-llvm -gpu-module-to-binary \
// RUN: | mlir-cpu-runner \
// RUN: --shared-libs=%mlir_rocm_runtime \
// RUN: --shared-libs=%mlir_runner_utils \
diff --git a/mlir/test/Integration/GPU/ROCM/two-modules.mlir b/mlir/test/Integration/GPU/ROCM/two-modules.mlir
index 65a1bb41ee7ae9a..796ada5379ead04 100644
--- a/mlir/test/Integration/GPU/ROCM/two-modules.mlir
+++ b/mlir/test/Integration/GPU/ROCM/two-modules.mlir
@@ -1,7 +1,7 @@
// RUN: mlir-opt %s \
// RUN: | mlir-opt -gpu-kernel-outlining \
-// RUN: | mlir-opt -pass-pipeline='builtin.module(gpu.module(strip-debuginfo,convert-gpu-to-rocdl,gpu-to-hsaco{chip=%chip}))' \
-// RUN: | mlir-opt -gpu-to-llvm \
+// RUN: | mlir-opt -pass-pipeline='builtin.module(gpu.module(strip-debuginfo,convert-gpu-to-rocdl),rocdl-attach-target{chip=%chip})' \
+// RUN: | mlir-opt -gpu-to-llvm -gpu-module-to-binary \
// RUN: | mlir-cpu-runner \
// RUN: --shared-libs=%mlir_rocm_runtime \
// RUN: --shared-libs=%mlir_runner_utils \
diff --git a/mlir/test/Integration/GPU/ROCM/vecadd.mlir b/mlir/test/Integration/GPU/ROCM/vecadd.mlir
index e3991979efafdcd..ccbaf25530aceef 100644
--- a/mlir/test/Integration/GPU/ROCM/vecadd.mlir
+++ b/mlir/test/Integration/GPU/ROCM/vecadd.mlir
@@ -1,8 +1,8 @@
// RUN: mlir-opt %s \
// RUN: | mlir-opt -convert-scf-to-cf \
// RUN: | mlir-opt -gpu-kernel-outlining \
-// RUN: | mlir-opt -pass-pipeline='builtin.module(gpu.module(strip-debuginfo,convert-gpu-to-rocdl{use-bare-ptr-memref-call-conv=true},gpu-to-hsaco{chip=%chip}))' \
-// RUN: | mlir-opt -gpu-to-llvm=use-bare-pointers-for-kernels=true \
+// RUN: | mlir-opt -pass-pipeline='builtin.module(gpu.module(strip-debuginfo,convert-gpu-to-rocdl{use-bare-ptr-memref-call-conv=true}),rocdl-attach-target{chip=%chip})' \
+// RUN: | mlir-opt -gpu-to-llvm=use-bare-pointers-for-kernels=true -gpu-module-to-binary \
// RUN: | mlir-cpu-runner \
// RUN: --shared-libs=%mlir_rocm_runtime \
// RUN: --shared-libs=%mlir_runner_utils \
diff --git a/mlir/test/Integration/GPU/ROCM/vector-transferops.mlir b/mlir/test/Integration/GPU/ROCM/vector-transferops.mlir
index 36ec6ebad67c186..b147a8f4d71d0d8 100644
--- a/mlir/test/Integration/GPU/ROCM/vector-transferops.mlir
+++ b/mlir/test/Integration/GPU/ROCM/vector-transferops.mlir
@@ -1,8 +1,8 @@
// RUN: mlir-opt %s \
// RUN: | mlir-opt -convert-scf-to-cf \
// RUN: | mlir-opt -gpu-kernel-outlining \
-// RUN: | mlir-opt -pass-pipeline='builtin.module(gpu.module(strip-debuginfo,convert-gpu-to-rocdl{chipset=%chip index-bitwidth=32},gpu-to-hsaco{chip=%chip}))' \
-// RUN: | mlir-opt -gpu-to-llvm \
+// RUN: | mlir-opt -pass-pipeline='builtin.module(gpu.module(strip-debuginfo,convert-gpu-to-rocdl{chipset=%chip index-bitwidth=32}),rocdl-attach-target{chip=%chip})' \
+// RUN: | mlir-opt -gpu-to-llvm -gpu-module-to-binary \
// RUN: | mlir-cpu-runner \
// RUN: --shared-libs=%mlir_rocm_runtime \
// RUN: --shared-libs=%mlir_runner_utils \
More information about the Mlir-commits
mailing list