Commit b082090
authored
[CPU] Expose more options to CPUCodegenOptions. (#23586)
The revision moves `useFastMinMaxOps`, `skipIntermediateRoundings`,
`useSoftmaxInterFusion`, and `instrumentMemoryAccesses` to
`CPUCodegenOptions`, and hides the remaining developer CLI flags.
There are three categories of use cases:
- **Users**: They do not need to understand individual flags. The
expectation is that they use optimization levels and optional flags
recommended by core developers.
- **Core developers**: Internal knobs for debugging or testing specific
codegen behaviors. These are hidden from `--help` and may change or
disappear at any time.
- **External developers**: Contributors pushing the boundary on specific
targets (e.g., ARM SVE/SME). Their flags need discoverability but are
not yet stable.
Moving flags related to scalable vectors was considered but ultimately
not done because the plumbing would violate layering. For example,
`clEnableScalableVectorization` is accessed globally through a free
function. It cannot be passed to the encoding materialization pass
because that pass should not carry target-specific codegen options. The
root cause is that this information is not queryable from the IR.
Promoting it to `CPUCodegenOptions` with an `experimental-` prefix was
considered, but the layering violation makes it the wrong approach.
Thus, it is left where it is.
Signed-off-by: hanhanW <hanhan0912@gmail.com>1 parent a314ffe commit b082090
File tree
3 files changed
+56
-39
lines changed- compiler/src/iree/compiler/Codegen
- LLVMCPU
- Utils
3 files changed
+56
-39
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 55 | + | |
83 | 56 | | |
84 | 57 | | |
85 | 58 | | |
86 | 59 | | |
87 | 60 | | |
88 | | - | |
| 61 | + | |
89 | 62 | | |
90 | 63 | | |
91 | 64 | | |
92 | 65 | | |
93 | | - | |
| 66 | + | |
94 | 67 | | |
95 | 68 | | |
96 | 69 | | |
| |||
103 | 76 | | |
104 | 77 | | |
105 | 78 | | |
106 | | - | |
| 79 | + | |
107 | 80 | | |
108 | 81 | | |
109 | 82 | | |
| |||
375 | 348 | | |
376 | 349 | | |
377 | 350 | | |
378 | | - | |
379 | | - | |
| 351 | + | |
| 352 | + | |
380 | 353 | | |
381 | 354 | | |
382 | 355 | | |
| |||
427 | 400 | | |
428 | 401 | | |
429 | 402 | | |
430 | | - | |
431 | | - | |
| 403 | + | |
| 404 | + | |
432 | 405 | | |
433 | 406 | | |
434 | 407 | | |
| |||
557 | 530 | | |
558 | 531 | | |
559 | 532 | | |
560 | | - | |
| 533 | + | |
| 534 | + | |
561 | 535 | | |
562 | 536 | | |
563 | 537 | | |
| |||
632 | 606 | | |
633 | 607 | | |
634 | 608 | | |
635 | | - | |
| 609 | + | |
636 | 610 | | |
637 | 611 | | |
638 | 612 | | |
| |||
659 | 633 | | |
660 | 634 | | |
661 | 635 | | |
662 | | - | |
| 636 | + | |
663 | 637 | | |
664 | 638 | | |
665 | 639 | | |
| |||
Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
64 | 94 | | |
65 | 95 | | |
66 | 96 | | |
| |||
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
43 | 56 | | |
44 | 57 | | |
45 | 58 | | |
| |||
0 commit comments