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
40 lines
1.7 KiB
MLIR
40 lines
1.7 KiB
MLIR
// RUN: mlir-opt %s -convert-linalg-to-loops -convert-scf-to-cf -expand-strided-metadata -lower-affine -convert-arith-to-llvm -finalize-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \
|
|
// RUN: mlir-runner -O3 -e main -entry-point-result=void \
|
|
// RUN: -shared-libs=%mlir_runner_utils \
|
|
// RUN: | FileCheck %s
|
|
|
|
func.func private @printMemrefF32(memref<*xf32>)
|
|
|
|
func.func @main() {
|
|
%c0 = arith.constant 0 : index
|
|
%c1 = arith.constant 1 : index
|
|
%c2 = arith.constant 2 : index
|
|
%f0 = arith.constant 0.0 : f32
|
|
%f1 = arith.constant 1.0 : f32
|
|
%f2 = arith.constant 2.0 : f32
|
|
%f3 = arith.constant 3.0 : f32
|
|
%A = memref.alloc(%c2, %c2) : memref<?x?xf32>
|
|
memref.store %f0, %A[%c0, %c0] : memref<?x?xf32>
|
|
memref.store %f1, %A[%c0, %c1] : memref<?x?xf32>
|
|
memref.store %f2, %A[%c1, %c0] : memref<?x?xf32>
|
|
memref.store %f3, %A[%c1, %c1] : memref<?x?xf32>
|
|
%B = memref.subview %A[%c1, 0][1, %c2][1, 1] : memref<?x?xf32> to memref<?xf32, strided<[1], offset: ?>>
|
|
%C = memref.subview %A[0, %c1][%c2, 1][1, 1] : memref<?x?xf32> to memref<?xf32, strided<[?], offset: ?>>
|
|
%A_ = memref.cast %A : memref<?x?xf32> to memref<*xf32>
|
|
call @printMemrefF32(%A_) : (memref<*xf32>) -> ()
|
|
%B_ = memref.cast %B : memref<?xf32, strided<[1], offset: ?>> to memref<*xf32>
|
|
call @printMemrefF32(%B_) : (memref<*xf32>) -> ()
|
|
%C_ = memref.cast %C : memref<?xf32, strided<[?], offset: ?>> to memref<*xf32>
|
|
call @printMemrefF32(%C_) : (memref<*xf32>) -> ()
|
|
memref.dealloc %A : memref<?x?xf32>
|
|
return
|
|
}
|
|
|
|
// CHECK: Unranked Memref base@ = {{.*}} rank = 2 offset = 0 sizes = [2, 2] strides = [2, 1] data =
|
|
// CHECK-NEXT: [
|
|
// CHECK-SAME: [0, 1],
|
|
// CHECK-NEXT: [2, 3]
|
|
// CHECK-SAME: ]
|
|
// CHECK: [2, 3]
|
|
// CHECK: [1, 3]
|