[Mlir-commits] [mlir] [mlir][gpu] Extend `mgpumoduleLoadJIT` API to add assemblySize parameter (PR #189429)
Md Abdullah Shahneous Bari
llvmlistbot at llvm.org
Thu Apr 2 23:06:52 PDT 2026
================
@@ -475,10 +475,19 @@ XeVMTargetAttrImpl::createObject(Attribute attribute, Operation *module,
gpu::CompilationTarget format = options.getCompilationTarget();
auto xeTarget = cast<XeVMTargetAttr>(attribute);
SmallVector<NamedAttribute, 2> properties;
- if (format == gpu::CompilationTarget::Assembly)
+ if (format == gpu::CompilationTarget::Assembly) {
properties.push_back(
builder.getNamedAttr("O", builder.getI32IntegerAttr(xeTarget.getO())));
-
+ // If the object is serialized from a SPIR-V target, attach bool attribute
+ // "requires_null_terminator=false". Since, SPIR-V is a binary format it
+ // does not require a null terminator.
+ if (xeTarget.getTriple().starts_with("spirv")) {
+ properties.push_back(builder.getNamedAttr(
+ "requires_null_terminator",
+ builder.getBoolAttr(
+ false /*SPIR-V binary does not need null terminator*/)));
+ }
+ }
----------------
mshahneo wrote:
Hi @fabianmcg ,
Any more suggestions?
https://github.com/llvm/llvm-project/pull/189429
More information about the Mlir-commits
mailing list