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
75 lines
2.7 KiB
MLIR
75 lines
2.7 KiB
MLIR
// RUN: mlir-opt %s -generate-runtime-verification \
|
|
// RUN: -expand-strided-metadata \
|
|
// RUN: -test-cf-assert \
|
|
// RUN: -convert-to-llvm | \
|
|
// RUN: mlir-runner -e main -entry-point-result=void \
|
|
// RUN: -shared-libs=%mlir_runner_utils 2>&1 | \
|
|
// RUN: FileCheck %s
|
|
|
|
// RUN: mlir-opt %s -generate-runtime-verification \
|
|
// RUN: -expand-strided-metadata \
|
|
// RUN: -test-cf-assert \
|
|
// RUN: -convert-to-llvm="allow-pattern-rollback=0" \
|
|
// RUN: -reconcile-unrealized-casts | \
|
|
// RUN: mlir-runner -e main -entry-point-result=void \
|
|
// RUN: -shared-libs=%mlir_runner_utils 2>&1 | \
|
|
// RUN: FileCheck %s
|
|
|
|
func.func @load(%memref: memref<1xf32>, %index: index) {
|
|
memref.load %memref[%index] : memref<1xf32>
|
|
return
|
|
}
|
|
|
|
func.func @load_dynamic(%memref: memref<?xf32>, %index: index) {
|
|
memref.load %memref[%index] : memref<?xf32>
|
|
return
|
|
}
|
|
|
|
func.func @load_nd_dynamic(%memref: memref<?x?x?xf32>, %index0: index, %index1: index, %index2: index) {
|
|
memref.load %memref[%index0, %index1, %index2] : memref<?x?x?xf32>
|
|
return
|
|
}
|
|
|
|
func.func @main() {
|
|
%0 = arith.constant 0 : index
|
|
%1 = arith.constant 1 : index
|
|
%n1 = arith.constant -1 : index
|
|
%2 = arith.constant 2 : index
|
|
%alloca_1 = memref.alloca() : memref<1xf32>
|
|
%alloc_1 = memref.alloc(%1) : memref<?xf32>
|
|
%alloc_2x2x2 = memref.alloc(%2, %2, %2) : memref<?x?x?xf32>
|
|
|
|
// CHECK: ERROR: Runtime op verification failed
|
|
// CHECK-NEXT: memref.load %{{.*}}[%{{.*}}] : memref<1xf32>
|
|
// CHECK-NEXT: ^ out-of-bounds access
|
|
// CHECK-NEXT: Location: loc({{.*}})
|
|
func.call @load(%alloca_1, %1) : (memref<1xf32>, index) -> ()
|
|
|
|
// CHECK: ERROR: Runtime op verification failed
|
|
// CHECK-NEXT: memref.load %{{.*}}[%{{.*}}] : memref<?xf32>
|
|
// CHECK-NEXT: ^ out-of-bounds access
|
|
// CHECK-NEXT: Location: loc({{.*}})
|
|
func.call @load_dynamic(%alloc_1, %1) : (memref<?xf32>, index) -> ()
|
|
|
|
// CHECK: ERROR: Runtime op verification failed
|
|
// CHECK-NEXT: memref.load %{{.*}}[%{{.*}}] : memref<?x?x?xf32>
|
|
// CHECK-NEXT: ^ out-of-bounds access
|
|
// CHECK-NEXT: Location: loc({{.*}})
|
|
func.call @load_nd_dynamic(%alloc_2x2x2, %1, %n1, %0) : (memref<?x?x?xf32>, index, index, index) -> ()
|
|
|
|
// CHECK-NOT: ERROR: Runtime op verification failed
|
|
func.call @load(%alloca_1, %0) : (memref<1xf32>, index) -> ()
|
|
|
|
// CHECK-NOT: ERROR: Runtime op verification failed
|
|
func.call @load_dynamic(%alloc_1, %0) : (memref<?xf32>, index) -> ()
|
|
|
|
// CHECK-NOT: ERROR: Runtime op verification failed
|
|
func.call @load_nd_dynamic(%alloc_2x2x2, %1, %1, %0) : (memref<?x?x?xf32>, index, index, index) -> ()
|
|
|
|
memref.dealloc %alloc_1 : memref<?xf32>
|
|
memref.dealloc %alloc_2x2x2 : memref<?x?x?xf32>
|
|
|
|
return
|
|
}
|
|
|