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
138 lines
3.3 KiB
MLIR
138 lines
3.3 KiB
MLIR
// RUN: mlir-opt -split-input-file -verify-diagnostics %s
|
|
|
|
|
|
func.func @missing_sizes(%tc : i32, %ts : i32) {
|
|
%canonloop = omp.new_cli
|
|
omp.canonical_loop(%canonloop) %iv : i32 in range(%tc) {
|
|
omp.terminator
|
|
}
|
|
|
|
// expected-error@+1 {{'omp.tile' op there must be one tile size for each applyee}}
|
|
omp.tile <-(%canonloop)
|
|
|
|
llvm.return
|
|
}
|
|
|
|
// -----
|
|
|
|
func.func @no_loop(%tc : i32, %ts : i32) {
|
|
// expected-error@+1 {{'omp.tile' op must apply to at least one loop}}
|
|
omp.tile <-()
|
|
|
|
return
|
|
}
|
|
|
|
// -----
|
|
|
|
func.func @missing_generator(%tc : i32, %ts : i32) {
|
|
// expected-error@+1 {{'omp.new_cli' op CLI has no generator}}
|
|
%canonloop = omp.new_cli
|
|
|
|
// expected-note@+1 {{see consumer here: "omp.tile"(%0, %arg1) <{operandSegmentSizes = array<i32: 0, 1, 1>}> : (!omp.cli, i32) -> ()}}
|
|
omp.tile <-(%canonloop) sizes(%ts : i32)
|
|
|
|
return
|
|
}
|
|
|
|
// -----
|
|
|
|
func.func @insufficient_sizes(%tc : i32, %ts : i32) {
|
|
%canonloop1 = omp.new_cli
|
|
%canonloop2 = omp.new_cli
|
|
omp.canonical_loop(%canonloop1) %iv1 : i32 in range(%tc) {
|
|
omp.canonical_loop(%canonloop2) %iv2 : i32 in range(%tc) {
|
|
omp.terminator
|
|
}
|
|
omp.terminator
|
|
}
|
|
|
|
// expected-error@+1 {{'omp.tile' op there must be one tile size for each applyee}}
|
|
omp.tile <-(%canonloop1, %canonloop2) sizes(%ts : i32)
|
|
|
|
llvm.return
|
|
}
|
|
|
|
// -----
|
|
|
|
func.func @insufficient_applyees(%tc : i32, %ts : i32) {
|
|
%canonloop = omp.new_cli
|
|
omp.canonical_loop(%canonloop) %iv : i32 in range(%tc) {
|
|
omp.terminator
|
|
}
|
|
|
|
// expected-error@+1 {{omp.tile' op there must be one tile size for each applyee}}
|
|
omp.tile <- (%canonloop) sizes(%ts, %ts : i32, i32)
|
|
|
|
return
|
|
}
|
|
|
|
// -----
|
|
|
|
func.func @insufficient_generatees(%tc : i32, %ts : i32) {
|
|
%canonloop = omp.new_cli
|
|
%grid = omp.new_cli
|
|
omp.canonical_loop(%canonloop) %iv : i32 in range(%tc) {
|
|
omp.terminator
|
|
}
|
|
|
|
// expected-error@+1 {{'omp.tile' op expecting two times the number of generatees than applyees}}
|
|
omp.tile (%grid) <- (%canonloop) sizes(%ts : i32)
|
|
|
|
return
|
|
}
|
|
|
|
// -----
|
|
|
|
func.func @not_nested(%tc : i32, %ts : i32) {
|
|
%canonloop1 = omp.new_cli
|
|
%canonloop2 = omp.new_cli
|
|
omp.canonical_loop(%canonloop1) %iv1 : i32 in range(%tc) {
|
|
omp.terminator
|
|
}
|
|
omp.canonical_loop(%canonloop2) %iv2 : i32 in range(%tc) {
|
|
omp.terminator
|
|
}
|
|
|
|
// expected-error@+1 {{'omp.tile' op tiled loop nest must be nested within each other}}
|
|
omp.tile <-(%canonloop1, %canonloop2) sizes(%ts, %ts : i32, i32)
|
|
|
|
llvm.return
|
|
}
|
|
|
|
// -----
|
|
|
|
func.func @not_perfectly_nested(%tc : i32, %ts : i32) {
|
|
%canonloop1 = omp.new_cli
|
|
%canonloop2 = omp.new_cli
|
|
omp.canonical_loop(%canonloop1) %iv1 : i32 in range(%tc) {
|
|
%v = arith.constant 42 : i32
|
|
omp.canonical_loop(%canonloop2) %iv2 : i32 in range(%tc) {
|
|
omp.terminator
|
|
}
|
|
omp.terminator
|
|
}
|
|
|
|
// expected-error@+1 {{'omp.tile' op tiled loop nest must be perfectly nested}}
|
|
omp.tile <-(%canonloop1, %canonloop2) sizes(%ts, %ts : i32, i32)
|
|
|
|
llvm.return
|
|
}
|
|
|
|
// -----
|
|
|
|
func.func @non_nectangular(%tc : i32, %ts : i32) {
|
|
%canonloop1 = omp.new_cli
|
|
%canonloop2 = omp.new_cli
|
|
omp.canonical_loop(%canonloop1) %iv1 : i32 in range(%tc) {
|
|
omp.canonical_loop(%canonloop2) %iv2 : i32 in range(%iv1) {
|
|
omp.terminator
|
|
}
|
|
omp.terminator
|
|
}
|
|
|
|
// expected-error@+1 {{'omp.tile' op tiled loop nest must be rectangular}}
|
|
omp.tile <-(%canonloop1, %canonloop2) sizes(%ts, %ts : i32, i32)
|
|
|
|
llvm.return
|
|
}
|