[Mlir-commits] [mlir] [mlir][SPIRV] Fix lookup logic `spirv.target_env` for `gpu.module` (PR #147262)
Jakub Kuderski
llvmlistbot at llvm.org
Thu Jul 10 07:46:27 PDT 2025
================
@@ -385,6 +385,9 @@ LogicalResult GPUModuleConversion::matchAndRewrite(
if (auto attr = moduleOp->getAttrOfType<spirv::TargetEnvAttr>(
spirv::getTargetEnvAttrName()))
spvModule->setAttr(spirv::getTargetEnvAttrName(), attr);
+ for (auto targetAttr : moduleOp.getTargetsAttr())
----------------
kuhar wrote:
Use the actual type here, it's not obvious outside of an IDE: https://llvm.org/docs/CodingStandards.html#use-auto-type-deduction-to-make-code-more-readable
https://github.com/llvm/llvm-project/pull/147262
More information about the Mlir-commits
mailing list