CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
47 lines
1.7 KiB
MLIR
47 lines
1.7 KiB
MLIR
// RUN: mlir-translate -mlir-to-llvmir %s | FileCheck %s
|
|
|
|
module attributes {omp.is_target_device = false, omp.target_triples = ["amdgcn-amd-amdhsa"]} {
|
|
llvm.func @target_if_nowait(%arg0: !llvm.ptr, %arg1: !llvm.ptr) {
|
|
%0 = llvm.mlir.constant(1 : i64) : i64
|
|
%3 = llvm.alloca %0 x i32 {bindc_name = "cond"} : (i64) -> !llvm.ptr
|
|
%6 = llvm.load %3 : !llvm.ptr -> i32
|
|
%7 = llvm.mlir.constant(0 : i64) : i32
|
|
%8 = llvm.icmp "ne" %6, %7 : i32
|
|
%9 = omp.map.info var_ptr(%3 : !llvm.ptr, i32) map_clauses(implicit, exit_release_or_enter_alloc) capture(ByCopy) -> !llvm.ptr {name = "cond"}
|
|
%10 = omp.map.info var_ptr(%arg0 : !llvm.ptr, f32) map_clauses(implicit, exit_release_or_enter_alloc) capture(ByCopy) -> !llvm.ptr {name = "var"}
|
|
%11 = omp.map.info var_ptr(%arg1 : !llvm.ptr, f32) map_clauses(implicit, exit_release_or_enter_alloc) capture(ByCopy) -> !llvm.ptr {name = "val"}
|
|
omp.target if(%8) nowait map_entries(%10 -> %arg3, %11 -> %arg4 : !llvm.ptr, !llvm.ptr) {
|
|
%12 = llvm.load %arg4 : !llvm.ptr -> f32
|
|
llvm.store %12, %arg3 : f32, !llvm.ptr
|
|
omp.terminator
|
|
}
|
|
llvm.return
|
|
}
|
|
}
|
|
|
|
// CHECK: define void @target_if_nowait{{.*}} {
|
|
// CHECK: omp_if.then:
|
|
// CHECK: br label %[[TARGET_TASK_BB:.*]]
|
|
|
|
// CHECK: [[TARGET_TASK_BB]]:
|
|
// CHECK: call ptr @__kmpc_omp_target_task_alloc
|
|
// CHECK: br label %[[OFFLOAD_CONT:.*]]
|
|
|
|
// CHECK: [[OFFLOAD_CONT]]:
|
|
// CHECK: br label %omp_if.end
|
|
|
|
// CHECK: omp_if.else:
|
|
// CHECK: br label %[[HOST_TASK_BB:.*]]
|
|
|
|
// CHECK: [[HOST_TASK_BB]]:
|
|
// CHECK: call ptr @__kmpc_omp_task_alloc
|
|
// CHECK: br label %[[HOST_TASK_CONT:.*]]
|
|
|
|
// CHECK: [[HOST_TASK_CONT]]:
|
|
// CHECK: br label %omp_if.end
|
|
|
|
// CHECK: omp_if.end:
|
|
// CHECK: ret void
|
|
// CHECK: }
|
|
|