[all-commits] [llvm/llvm-project] be0063: [mlir][OpPrintingFlags] Allow to disable ElementsA...
Andrei Golubev via All-commits
all-commits at lists.llvm.org
Mon Apr 8 17:08:54 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: be006372f3bbcab1e2e51af93dd3302398dac9a4
https://github.com/llvm/llvm-project/commit/be006372f3bbcab1e2e51af93dd3302398dac9a4
Author: Andrei Golubev <andrey.golubev at intel.com>
Date: 2024-04-09 (Tue, 09 Apr 2024)
Changed paths:
M mlir/include/mlir/IR/OperationSupport.h
M mlir/lib/IR/AsmPrinter.cpp
Log Message:
-----------
[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: Harald Rotuna <harald.razvan.rotuna at intel.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list