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
119 lines
3.2 KiB
MLIR
119 lines
3.2 KiB
MLIR
// RUN: mlir-opt %s -convert-openacc-to-scf -split-input-file | FileCheck %s
|
|
|
|
func.func @testenterdataop(%a: memref<f32>, %ifCond: i1) -> () {
|
|
%0 = acc.create varPtr(%a : memref<f32>) -> memref<f32>
|
|
acc.enter_data if(%ifCond) dataOperands(%0 : memref<f32>)
|
|
return
|
|
}
|
|
|
|
// CHECK: func @testenterdataop(%{{.*}}: memref<f32>, [[IFCOND:%.*]]: i1)
|
|
// CHECK: scf.if [[IFCOND]] {
|
|
// CHECK-NEXT: acc.enter_data dataOperands(%{{.*}} : memref<f32>)
|
|
// CHECK-NEXT: }
|
|
|
|
// -----
|
|
|
|
func.func @testexitdataop(%a: memref<f32>, %ifCond: i1) -> () {
|
|
%0 = acc.getdeviceptr varPtr(%a : memref<f32>) -> memref<f32>
|
|
acc.exit_data if(%ifCond) dataOperands(%0 : memref<f32>)
|
|
acc.delete accPtr(%0 : memref<f32>)
|
|
return
|
|
}
|
|
|
|
// CHECK: func @testexitdataop(%{{.*}}: memref<f32>, [[IFCOND:%.*]]: i1)
|
|
// CHECK: scf.if [[IFCOND]] {
|
|
// CHECK-NEXT: acc.exit_data dataOperands(%{{.*}} : memref<f32>)
|
|
// CHECK-NEXT: }
|
|
|
|
// -----
|
|
|
|
func.func @testupdateop(%a: memref<f32>, %ifCond: i1) -> () {
|
|
%0 = acc.update_device varPtr(%a : memref<f32>) -> memref<f32>
|
|
acc.update if(%ifCond) dataOperands(%0 : memref<f32>)
|
|
return
|
|
}
|
|
|
|
// CHECK: func @testupdateop(%{{.*}}: memref<f32>, [[IFCOND:%.*]]: i1)
|
|
// CHECK: scf.if [[IFCOND]] {
|
|
// CHECK: acc.update dataOperands(%{{.*}} : memref<f32>)
|
|
// CHECK-NEXT: }
|
|
|
|
// -----
|
|
|
|
func.func @update_true(%arg0: memref<f32>) {
|
|
%true = arith.constant true
|
|
%0 = acc.update_device varPtr(%arg0 : memref<f32>) -> memref<f32>
|
|
acc.update if(%true) dataOperands(%0 : memref<f32>)
|
|
return
|
|
}
|
|
|
|
// CHECK-LABEL: func.func @update_true
|
|
// CHECK-NOT: if
|
|
// CHECK: acc.update dataOperands
|
|
|
|
// -----
|
|
|
|
func.func @update_false(%arg0: memref<f32>) {
|
|
%false = arith.constant false
|
|
%0 = acc.update_device varPtr(%arg0 : memref<f32>) -> memref<f32>
|
|
acc.update if(%false) dataOperands(%0 : memref<f32>)
|
|
return
|
|
}
|
|
|
|
// CHECK-LABEL: func.func @update_false
|
|
// CHECK-NOT: acc.update dataOperands
|
|
|
|
// -----
|
|
|
|
func.func @enter_data_true(%d1 : memref<f32>) {
|
|
%true = arith.constant true
|
|
%0 = acc.create varPtr(%d1 : memref<f32>) -> memref<f32>
|
|
acc.enter_data async if(%true) dataOperands(%0 : memref<f32>)
|
|
return
|
|
}
|
|
|
|
// CHECK-LABEL: func.func @enter_data_true
|
|
// CHECK-NOT: if
|
|
// CHECK: acc.enter_data async dataOperands
|
|
|
|
// -----
|
|
|
|
func.func @enter_data_false(%d1 : memref<f32>) {
|
|
%false = arith.constant false
|
|
%0 = acc.create varPtr(%d1 : memref<f32>) -> memref<f32>
|
|
acc.enter_data async if(%false) dataOperands(%0 : memref<f32>)
|
|
return
|
|
}
|
|
|
|
// CHECK-LABEL: func.func @enter_data_false
|
|
// CHECK-NOT: acc.enter_data
|
|
|
|
// -----
|
|
|
|
func.func @exit_data_true(%d1 : memref<f32>) {
|
|
%true = arith.constant true
|
|
%0 = acc.getdeviceptr varPtr(%d1 : memref<f32>) -> memref<f32>
|
|
acc.exit_data async if(%true) dataOperands(%0 : memref<f32>)
|
|
acc.delete accPtr(%0 : memref<f32>)
|
|
return
|
|
}
|
|
|
|
// CHECK-LABEL: func.func @exit_data_true
|
|
// CHECK-NOT:if
|
|
// CHECK:acc.exit_data async dataOperands
|
|
|
|
// -----
|
|
|
|
func.func @exit_data_false(%d1 : memref<f32>) {
|
|
%false = arith.constant false
|
|
%0 = acc.getdeviceptr varPtr(%d1 : memref<f32>) -> memref<f32>
|
|
acc.exit_data async if(%false) dataOperands(%0 : memref<f32>)
|
|
acc.delete accPtr(%0 : memref<f32>)
|
|
return
|
|
}
|
|
|
|
// CHECK-LABEL: func.func @exit_data_false
|
|
// CHECK-NOT:acc.exit_data
|
|
|
|
// -----
|