[Mlir-commits] [mlir] [mlir][gpu] Adding ELF section option to the gpu-module-to-binary pass (PR #119440)
Guray Ozen
llvmlistbot at llvm.org
Fri Dec 13 07:43:53 PST 2024
================
@@ -664,9 +664,18 @@ NVVMTargetAttrImpl::createObject(Attribute attribute, Operation *module,
gpu::CompilationTarget format = options.getCompilationTarget();
DictionaryAttr objectProps;
Builder builder(attribute.getContext());
+ SmallVector<NamedAttribute, 2> properties;
if (format == gpu::CompilationTarget::Assembly)
- objectProps = builder.getDictionaryAttr(
- {builder.getNamedAttr("O", builder.getI32IntegerAttr(target.getO()))});
+ properties.push_back(
+ builder.getNamedAttr("O", builder.getI32IntegerAttr(target.getO())));
+
+ if (auto section = options.getELFSection(); !section.empty())
+ properties.push_back(
+ builder.getNamedAttr("section", builder.getStringAttr(section)));
----------------
grypp wrote:
maybe create a constant `constexpr kSectionName = "section"`
https://github.com/llvm/llvm-project/pull/119440
More information about the Mlir-commits
mailing list