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
36 lines
2.0 KiB
MLIR
36 lines
2.0 KiB
MLIR
// RUN: mlir-opt %s -pass-pipeline="builtin.module(func.func(convert-vector-to-scf))" -split-input-file | FileCheck %s
|
|
|
|
// Ensure that the permutation map is lowered (by inserting a transpose op)
|
|
// before lowering the vector.transfer_read.
|
|
|
|
// CHECK-LABEL: func @transfer_read_2d_mask_transposed(
|
|
// CHECK-DAG: %[[PADDING:.*]] = arith.constant dense<-4.200000e+01> : vector<9xf32>
|
|
// CHECK-DAG: %[[MASK:.*]] = arith.constant dense<{{.*}}> : vector<4x9xi1>
|
|
// CHECK: %[[MASK_MEM:.*]] = memref.alloca() : memref<vector<4x9xi1>>
|
|
// CHECK: memref.store %[[MASK]], %[[MASK_MEM]][] : memref<vector<4x9xi1>>
|
|
// CHECK: %[[MASK_CASTED:.*]] = vector.type_cast %[[MASK_MEM]] : memref<vector<4x9xi1>> to memref<4xvector<9xi1>>
|
|
// CHECK: scf.for {{.*}} {
|
|
// CHECK: scf.if {{.*}} {
|
|
// CHECK: %[[MASK_LOADED:.*]] = memref.load %[[MASK_CASTED]][%{{.*}}] : memref<4xvector<9xi1>>
|
|
// CHECK: %[[READ:.*]] = vector.transfer_read %{{.*}}, %{{.*}}, %[[MASK_LOADED]] : memref<?x?xf32>, vector<9xf32>
|
|
// CHECK: memref.store %[[READ]], %{{.*}} : memref<4xvector<9xf32>>
|
|
// CHECK: }
|
|
// CHECK: }
|
|
// CHECK: %[[RESULT:.*]] = memref.load %{{.*}} : memref<vector<4x9xf32>>
|
|
// CHECK: %[[RESULT_T:.*]] = vector.transpose %[[RESULT]], [1, 0] : vector<4x9xf32> to vector<9x4xf32>
|
|
// CHECK: return %[[RESULT_T]] : vector<9x4xf32>
|
|
|
|
// Vector load with mask + transpose.
|
|
func.func @transfer_read_2d_mask_transposed(
|
|
%A : memref<?x?xf32>, %base1: index, %base2: index) -> (vector<9x4xf32>) {
|
|
%fm42 = arith.constant -42.0: f32
|
|
%mask = arith.constant dense<[[1, 0, 1, 0, 1, 1, 1, 0, 1],
|
|
[0, 0, 1, 1, 1, 1, 1, 0, 1],
|
|
[1, 1, 1, 1, 1, 1, 1, 0, 1],
|
|
[0, 0, 1, 0, 1, 1, 1, 0, 1]]> : vector<4x9xi1>
|
|
%f = vector.transfer_read %A[%base1, %base2], %fm42, %mask
|
|
{permutation_map = affine_map<(d0, d1) -> (d1, d0)>} :
|
|
memref<?x?xf32>, vector<9x4xf32>
|
|
return %f : vector<9x4xf32>
|
|
}
|