Files
clang-p2996/mlir/test/Conversion/GPUToNVVM/memref.mlir
Uday Bondhugula 27ccf0f407 [MLIR] Provide bare pointer memref lowering option on gpu-to-nvvm pass
Provide the bare pointer memref lowering option on gpu-to-nvvm pass.
This is needed whenever we lower memrefs on the host function side and
the kernel calls on the host-side (gpu-to-llvm) with the bare ptr
convention. The GPU module side of the lowering should also "align" and
use the bare pointer convention.

Reviewed By: krzysz00

Differential Revision: https://reviews.llvm.org/D152480
2023-06-18 22:53:50 +05:30

14 lines
471 B
MLIR

// RUN: mlir-opt %s -convert-gpu-to-nvvm | FileCheck %s
// RUN: mlir-opt %s -convert-gpu-to-nvvm='use-bare-ptr-memref-call-conv=1' \
// RUN: | FileCheck %s --check-prefix=BARE
gpu.module @memref_conversions {
// CHECK: llvm.func @kern
// CHECK-SAME: (%{{.*}}: !llvm.ptr, %{{.*}}: !llvm.ptr, %{{.*}}: i64, %{{.*}}: i64, %{{.*}}: i64)
// BARE: llvm.func @kern
// BARE-SAME: (%{{.*}}: !llvm.ptr)
gpu.func @kern(%arg0: memref<8xf32>) kernel {
gpu.return
}
}