llvm-project/mlir/test/Target/SPIRV/execution-mode.mlir
Igor Wodiany bcc1e75b95
[mlir][spirv] Fix execution mode and function call Target tests (#159323)
It fixes the problem where the execution mode is not valid for the given
entry point (`LocalSizeHint` requires `Kernel`) and where an `Input`
storage class pointer is incorrectly passed to a function call (there is
a restriction on what storage classes are allowed for pointer operands
to an `OpFunctionCall`, see "2.16.1. Universal Validation Rules").
2025-09-23 15:19:56 +01:00

16 lines
640 B
MLIR

// RUN: mlir-translate -no-implicit-module -test-spirv-roundtrip %s | FileCheck %s
// RUN: %if spirv-tools %{ rm -rf %t %}
// RUN: %if spirv-tools %{ mkdir %t %}
// RUN: %if spirv-tools %{ mlir-translate --no-implicit-module --serialize-spirv --split-input-file --spirv-save-validation-files-with-prefix=%t/module %s %}
// RUN: %if spirv-tools %{ spirv-val %t %}
spirv.module Logical OpenCL requires #spirv.vce<v1.0, [Kernel], []> {
spirv.func @foo() -> () "None" {
spirv.Return
}
spirv.EntryPoint "Kernel" @foo
// CHECK: spirv.ExecutionMode @foo "LocalSizeHint", 3, 4, 5
spirv.ExecutionMode @foo "LocalSizeHint", 3, 4, 5
}