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
62 lines
2.8 KiB
MLIR
62 lines
2.8 KiB
MLIR
// RUN: mlir-opt %s -one-shot-bufferize="bufferize-function-boundaries" -split-input-file | FileCheck %s
|
|
|
|
// Run fuzzer with different seeds.
|
|
// RUN: mlir-opt %s -one-shot-bufferize="test-analysis-only analysis-heuristic=fuzzer analysis-fuzzer-seed=23 bufferize-function-boundaries" -split-input-file -o /dev/null
|
|
// RUN: mlir-opt %s -one-shot-bufferize="test-analysis-only analysis-heuristic=fuzzer analysis-fuzzer-seed=59 bufferize-function-boundaries" -split-input-file -o /dev/null
|
|
// RUN: mlir-opt %s -one-shot-bufferize="test-analysis-only analysis-heuristic=fuzzer analysis-fuzzer-seed=91 bufferize-function-boundaries" -split-input-file -o /dev/null
|
|
|
|
// Test bufferization using memref types that have no layout map.
|
|
// RUN: mlir-opt %s -one-shot-bufferize="unknown-type-conversion=identity-layout-map function-boundary-type-conversion=identity-layout-map bufferize-function-boundaries" -split-input-file -o /dev/null
|
|
|
|
// CHECK-LABEL: func @write_to_select_op_source
|
|
// CHECK-SAME: %[[t1:.*]]: memref<?xf32, strided{{.*}}>, %[[t2:.*]]: memref<?xf32, strided{{.*}}>
|
|
func.func @write_to_select_op_source(
|
|
%t1 : tensor<?xf32> {bufferization.writable = true},
|
|
%t2 : tensor<?xf32> {bufferization.writable = true},
|
|
%c : i1)
|
|
-> (tensor<?xf32>, tensor<?xf32>)
|
|
{
|
|
%cst = arith.constant 0.0 : f32
|
|
%idx = arith.constant 0 : index
|
|
// CHECK: %[[alloc:.*]] = memref.alloc
|
|
// CHECK: memref.copy %[[t1]], %[[alloc]]
|
|
// CHECK: memref.store %{{.*}}, %[[alloc]]
|
|
%w = tensor.insert %cst into %t1[%idx] : tensor<?xf32>
|
|
// CHECK: %[[select:.*]] = arith.select %{{.*}}, %[[t1]], %[[t2]]
|
|
%s = arith.select %c, %t1, %t2 : tensor<?xf32>
|
|
// CHECK: return %[[select]], %[[alloc]]
|
|
return %s, %w : tensor<?xf32>, tensor<?xf32>
|
|
}
|
|
|
|
// -----
|
|
|
|
// Due to the out-of-place bufferization of %t1, buffers with different layout
|
|
// maps are passed to arith.select. A cast must be inserted.
|
|
|
|
// CHECK-LABEL: func @write_after_select_read_one
|
|
// CHECK-SAME: %[[t1:.*]]: memref<?xf32, strided{{.*}}>, %[[t2:.*]]: memref<?xf32, strided{{.*}}>
|
|
func.func @write_after_select_read_one(
|
|
%t1 : tensor<?xf32> {bufferization.writable = true},
|
|
%t2 : tensor<?xf32> {bufferization.writable = true},
|
|
%c : i1)
|
|
-> (f32, tensor<?xf32>)
|
|
{
|
|
%cst = arith.constant 0.0 : f32
|
|
%idx = arith.constant 0 : index
|
|
|
|
// CHECK: %[[alloc:.*]] = memref.alloc
|
|
// CHECK-DAG: %[[casted:.*]] = memref.cast %[[alloc]]
|
|
// CHECK-DAG: memref.copy %[[t1]], %[[alloc]]
|
|
// CHECK: %[[select:.*]] = arith.select %{{.*}}, %[[casted]], %[[t2]]
|
|
%s = arith.select %c, %t1, %t2 : tensor<?xf32>
|
|
|
|
// CHECK: memref.store %{{.*}}, %[[select]]
|
|
%w = tensor.insert %cst into %s[%idx] : tensor<?xf32>
|
|
|
|
// CHECK: %[[f:.*]] = memref.load %[[t1]]
|
|
%f = tensor.extract %t1[%idx] : tensor<?xf32>
|
|
|
|
// CHECK: return %[[f]], %[[select]]
|
|
return %f, %w : f32, tensor<?xf32>
|
|
}
|