Unverified Commit be006372 authored by Andrei Golubev's avatar Andrei Golubev Committed by GitHub
Browse files

[mlir][OpPrintingFlags] Allow to disable ElementsAttr hex printing (#85766)



At present, large ElementsAttr is unconditionally printed with a hex
string. This means that in IR large constant values often look like:
dense<"0x000000000004000000080000000004000000080000000..."> :
tensor<10x10xi32>

Hoisting hex printing control to the user level for tooling means that
one can disable the feature and get human-readable values when
necessary:
dense<[16, 32, 48, 500...]> : tensor<10x10xi32>

Note: AsmPrinterOptions::printElementsAttrWithHexIfLarger is not always
possible to be used as it requires that one exposes MLIR's command-line
options in user tooling (including an actual compiler).

Co-authored-by: default avatarHarald Rotuna <harald.razvan.rotuna@intel.com>
parent 3b74f8c1
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment