[Mlir-commits] [mlir] [mlir][OpPrintingFlags] Allow to disable ElementsAttr hex printing (PR #85766)

Andrei Golubev llvmlistbot at llvm.org
Tue Mar 19 03:52:13 PDT 2024


================
@@ -1131,6 +1131,10 @@ class OpPrintingFlags {
   /// elements.
   OpPrintingFlags &elideLargeElementsAttrs(int64_t largeElementLimit = 16);
 
+  /// Enable or disable printing of large element attributes as a hex string. By
+  /// default, printing as hex is allowed (enabled).
+  OpPrintingFlags &allowPrintingElementsAttrWithHex(bool allowHex = true);
----------------
andrey-golubev wrote:

this patch is similar to the original we have in the downstream. however, looking at this now, I wonder if it makes more sense to expose `clOptions->printElementsAttrWithHexIfLarger` threshold here (so having an int64_t value instead of a bool). Then `-1` would act as "disable"

https://github.com/llvm/llvm-project/pull/85766


More information about the Mlir-commits mailing list