================ @@ -188,4 +188,46 @@ def GpuROCDLAttachTarget: Pass<"rocdl-attach-target", ""> { ]; } +def GpuSPIRVAttachTarget: Pass<"spirv-attach-target", ""> { + let summary = "Attaches an SPIRV target attribute to a GPU Module."; + let description = [{ + This pass searches for all GPU Modules in the immediate regions and attaches + an SPIRV target if the module matches the name specified by the `module` argument. + + Example: + ``` + // File: in1.mlir: + gpu.module @nvvm_module_1 {...} + gpu.module @spirv_module_1 {...} + // mlir-opt --spirv-attach-target="module=spirv.* ver=v1.0 caps=Kernel" in1.mlir ---------------- silee2 wrote:
Done. https://github.com/llvm/llvm-project/pull/69949 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits