Files
clang-p2996/mlir/test/Dialect/GPU/module-to-binary-invalid.mlir
Fabian Mora 419c45a325 [mlir][gpu] Fix crash in gpu-module-to-binary (#75477)
This patch fixes the error in issue #75434. The crash was being caused
by not checking for a lack of target attributes in a GPU module. It's
now considered an error to invoke the pass with a GPU module with no
target attributes.
2023-12-14 14:03:10 -05:00

13 lines
384 B
MLIR

// RUN: mlir-opt %s --gpu-module-to-binary --verify-diagnostics
module attributes {gpu.container_module} {
// expected-error @below {{the module has no target attributes}}
gpu.module @kernel_module1 {
llvm.func @kernel(%arg0: i32, %arg1: !llvm.ptr,
%arg2: !llvm.ptr, %arg3: i64, %arg4: i64,
%arg5: i64) attributes {gpu.kernel} {
llvm.return
}
}
}