[Mlir-commits] [mlir] [MLIR] Make SM_90 integration tests use `TargetAttr` (PR #65926)
Guray Ozen
llvmlistbot at llvm.org
Mon Sep 11 04:51:31 PDT 2023
================
@@ -0,0 +1,107 @@
+// RUN: mlir-opt %s \
+// RUN: -test-transform-dialect-interpreter \
+// RUN: -test-transform-dialect-erase-schedule \
+// RUN: -convert-nvgpu-to-nvvm -gpu-kernel-outlining \
+// RUN: -convert-scf-to-cf -convert-nvvm-to-llvm \
+// RUN: -convert-vector-to-llvm \
+// RUN: -convert-math-to-llvm \
+// RUN: -expand-strided-metadata \
+// RUN: -lower-affine \
+// RUN: -convert-index-to-llvm=index-bitwidth=32 \
+// RUN: -convert-arith-to-llvm \
+// RUN: -finalize-memref-to-llvm \
+// RUN: -convert-func-to-llvm \
+// RUN: -canonicalize \
+// RUN: -expand-strided-metadata --nvvm-attach-target="module=main_kernel features=+ptx80 chip=sm_90 O=3" \
+// RUN: | mlir-opt -pass-pipeline='builtin.module(gpu.module(strip-debuginfo,convert-gpu-to-nvvm,convert-index-to-llvm{index-bitwidth=32},canonicalize,cse))' \
+// RUN: | mlir-opt --gpu-to-llvm --gpu-module-to-binary -canonicalize -cse -reconcile-unrealized-casts -debug-only=serialize-to-isa \
+// RUN: 2>&1 | FileCheck %s --check-prefixes=CHECK-PTX
+
+// Basic PTX check to make sure we are generating the right instructions.
+// CHECK-PTX: mbarrier.init.shared.b64
+// CHECK-PTX: mbarrier.arrive.expect_tx.shared.b64
+// CHECK-PTX: cp.async.bulk.tensor.2d.shared::cluster.global.mbarrier::complete_tx::bytes
+// CHECK-PTX: cp.async.bulk.tensor.2d.shared::cluster.global.mbarrier::complete_tx::bytes
+// CHECK-PTX: mbarrier.arrive.expect_tx.shared.b64
+// CHECK-PTX: mbarrier.try_wait.parity.shared.b64
+
+// TODO: GPU layering does not currently work end-to-end. Activate the following
+// when fixed.
+// R-UN: | mlir-opt -convert-index-to-llvm=index-bitwidth=32 \
+// R-UN: -gpu-to-llvm \
+// R-UN: -convert-func-to-llvm \
+// R-UN: -cse \
+// R-UN: -canonicalize \
+// R-UN: -reconcile-unrealized-casts \
+// R-UN: | mlir-cpu-runner \
+// R-UN: --shared-libs=%mlir_cuda_runtime \
+// R-UN: --shared-libs=%mlir_runner_utils \
+// R-UN: --entry-point-result=void \
+// R-UN: | FileCheck %s
----------------
grypp wrote:
The problem is actually solved. I was gonna fix this another PR, but just did it here.
https://github.com/llvm/llvm-project/pull/65926
More information about the Mlir-commits
mailing list