We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d43c59 commit 40b6f07Copy full SHA for 40b6f07
mlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp
@@ -385,6 +385,10 @@ LogicalResult GPUModuleConversion::matchAndRewrite(
385
if (auto attr = moduleOp->getAttrOfType<spirv::TargetEnvAttr>(
386
spirv::getTargetEnvAttrName()))
387
spvModule->setAttr(spirv::getTargetEnvAttrName(), attr);
388
+ for (auto targetAttr : moduleOp.getTargetsAttr())
389
+ if (auto spirvTargetEnvAttr =
390
+ llvm::dyn_cast<spirv::TargetEnvAttr>(targetAttr))
391
+ spvModule->setAttr(spirv::getTargetEnvAttrName(), spirvTargetEnvAttr);
392
393
rewriter.eraseOp(moduleOp);
394
return success();
0 commit comments