[PATCH] D146648: [MLIR][OpenMP] Added MLIR translation support for use_device clauses
Akash Banerjee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 24 09:47:42 PDT 2023
TIFitis marked an inline comment as done.
TIFitis added a comment.
BTW I am not sure how to resolve the windows build error that I am getting repeatedly. It's giving an unknown identifier error for the `fail` functor being called at `OpenMPToLLVMIRTranslation.cpp:1429`. Any insight would be much appreciated.
================
Comment at: mlir/test/Target/LLVMIR/omptarget-llvm.mlir:215
+
+llvm.func @_QPopenmp_target_use_dev_addr() {
+ %0 = llvm.mlir.constant(1 : i64) : i64
----------------
kiranchandramohan wrote:
> Is the default usage of `dev_addr` also with the pointer type?
> If not using a single reference example might be easier to follow.
> ```
> llvm.func @_QPopenmp_target_use_dev_addr() {
> %0 = llvm.mlir.constant(1 : i64) : i64
> %a = llvm.alloca %0 x !llvm.ptr<i32> : (i64) -> !llvm.ptr<i32>
> omp.target_data map((from -> %a : !llvm.ptr<i32>)) use_device_addr(%a : !llvm.ptr<i32>) {
> ^bb0(%arg0: !llvm.ptr<i32>):
> %1 = llvm.mlir.constant(10 : i32) : i32
> llvm.store %1, %arg0 : !llvm.ptr<i32>
> omp.terminator
> }
> llvm.return
> }
> ```
I've added a `openmp_target_use_dev_addr_no_ptr` test
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146648/new/
https://reviews.llvm.org/D146648
More information about the llvm-commits
mailing list