Skip to content
This repository was archived by the owner on Oct 11, 2025. It is now read-only.

Commit bd9f009

Browse files
authored
[mlir] Python: Extend print large elements limit to resources (#125738)
If the large element limit is specified, large elements are hidden from the asm but large resources are not. This change extends the large elements limit to apply to printed resources as well.
1 parent 569b6cd commit bd9f009

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mlir/lib/Bindings/Python/IRCore.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1296,8 +1296,10 @@ void PyOperationBase::print(std::optional<int64_t> largeElementsLimit,
12961296
fileObject = nb::module_::import_("sys").attr("stdout");
12971297

12981298
MlirOpPrintingFlags flags = mlirOpPrintingFlagsCreate();
1299-
if (largeElementsLimit)
1299+
if (largeElementsLimit) {
13001300
mlirOpPrintingFlagsElideLargeElementsAttrs(flags, *largeElementsLimit);
1301+
mlirOpPrintingFlagsElideLargeResourceString(flags, *largeElementsLimit);
1302+
}
13011303
if (enableDebugInfo)
13021304
mlirOpPrintingFlagsEnableDebugInfo(flags, /*enable=*/true,
13031305
/*prettyForm=*/prettyDebugInfo);

0 commit comments

Comments
 (0)