[Mlir-commits] [mlir] [OpenMP][mlir] Add `enter` capture attribute to declare target (PR #72062)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Nov 13 05:57:38 PST 2023


================
@@ -0,0 +1,45 @@
+// RUN: mlir-translate -mlir-to-llvmir %s | FileCheck %s
+
+// The aim of the test is to check the LLVM IR codegen for the device
+// for omp target parallel construct
+
+module attributes {dlti.dl_spec = #dlti.dl_spec<#dlti.dl_entry<"dlti.alloca_memory_space", 5 : ui32>>, llvm.data_layout = "e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-p7:160:256:256:32-p8:128:128-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1-ni:7:8", llvm.target_triple = "amdgcn-amd-amdhsa", omp.is_gpu = true, omp.is_target_device = true, omp.target = #omp.target<target_cpu = "gfx90a", target_features = "">} {
----------------
agozillon wrote:

Nit: I think we try to keep the attribute list very cutdown and non-specific for these tests. You could likely just have the is_target_device. Up to you though!

I am also a little unsure if we should have a specific GPU architecture referenced without some kind of restriction on the test, I don't think we use anything architecture specific at the moment in the current flow that'd break with a different build that excluded AMD but it's better safe than sorry perhaps! 

https://github.com/llvm/llvm-project/pull/72062


More information about the Mlir-commits mailing list