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
57 lines
2.0 KiB
MLIR
57 lines
2.0 KiB
MLIR
// RUN: mlir-opt -split-input-file %s -pass-pipeline='builtin.module(func.func(test-affine-reify-value-bounds))' -verify-diagnostics
|
|
|
|
func.func @test_invalid_reify_dim(%size: index) -> (index) {
|
|
%zero = arith.constant 0 : index
|
|
%tensor_val = tensor.empty(%size) : tensor<?xf32>
|
|
|
|
// expected-error@+1 {{'test.reify_bound' op invalid dim for shaped type}}
|
|
%dim = "test.reify_bound"(%tensor_val) {dim = 1 : i64} : (tensor<?xf32>) -> index
|
|
|
|
return %dim: index
|
|
}
|
|
|
|
// -----
|
|
|
|
func.func @test_invalid_reify_negative_dim(%size: index) -> (index) {
|
|
%zero = arith.constant 0 : index
|
|
%tensor_val = tensor.empty(%size) : tensor<?xf32>
|
|
|
|
// expected-error@+1 {{'test.reify_bound' op dim must be non-negative}}
|
|
%dim = "test.reify_bound"(%tensor_val) {dim = -1 : i64} : (tensor<?xf32>) -> index
|
|
|
|
return %dim: index
|
|
}
|
|
|
|
// -----
|
|
|
|
func.func @test_invalid_reify_int_value(%size: index) -> (index) {
|
|
%zero = arith.constant 0 : index
|
|
%int_val = arith.constant 1 : index
|
|
|
|
// expected-error@+1 {{'test.reify_bound' op unexpected 'dim' attribute for index/integer variable}}
|
|
%dim = "test.reify_bound"(%int_val) {dim = 1 : i64} : (index) -> index
|
|
|
|
return %dim: index
|
|
}
|
|
|
|
// -----
|
|
|
|
func.func @test_invalid_reify_without_dim(%size: index) -> (index) {
|
|
%zero = arith.constant 0 : index
|
|
%tensor_val = tensor.empty(%size) : tensor<?xf32>
|
|
|
|
// expected-error@+1 {{'test.reify_bound' op expected 'dim' attribute for shaped type variable}}
|
|
%dim = "test.reify_bound"(%tensor_val) : (tensor<?xf32>) -> index
|
|
|
|
return %dim: index
|
|
}
|
|
|
|
// -----
|
|
|
|
// Verify that an invalid 'type' value produces a proper error rather than
|
|
// crashing with llvm_unreachable. See: https://github.com/llvm/llvm-project/issues/128805
|
|
func.func @test_invalid_bound_type(%val: index) -> index {
|
|
// expected-error@+1 {{'test.reify_bound' op invalid bound type 'scalable', expected 'EQ', 'LB', or 'UB'}}
|
|
%bound = "test.reify_bound"(%val) {type = "scalable"} : (index) -> index
|
|
return %bound : index
|
|
} |