Promote iree-opt-data-tiling to pipeline options.#22295
Promote iree-opt-data-tiling to pipeline options.#22295hanhanW merged 2 commits intoiree-org:mainfrom
Conversation
There are two paths for data-tiling. One starts from global optimization phase and the other starts from dispatch creation phase. The former one is the suggested path, since the latter one is just getting used recently. The revision adds an umbrella flag for data-tiling, so users can start data-tiling with the suggested path. It is intended to be NFC for most users in terms of command line flags. The revision also adds a new `iree-global-opt-data-tiling` flag that allows users to explicitly start the data-tiling from global optimization phase. Note that the pipeline flag has higher priority. I.e., it overrides the other two flags if it is set as true. Signed-off-by: hanhanW <hanhan0912@gmail.com>
| "you have a preference. See `iree-global-opt-data-tiling` and " | ||
| "`iree-dispatch-creation-data-tiling` for details. Note that this " | ||
| "flag will override the other two flags, because it has a higher " | ||
| "priority."), |
There was a problem hiding this comment.
I was thinking if we should use the website doc instead, but it may be inconsistent for old binaries. A better improvement may be embedding the information in their flag descriptions.
Max191
left a comment
There was a problem hiding this comment.
Nice improvement to the docs!
| if (dispatchTransformOptions.dataTiling) { | ||
| assert(!globalOptimizationOptions.dataTiling && | ||
| "expect only one data-tiling option to be enabled"); | ||
| } |
There was a problem hiding this comment.
This can be triggered by the user by passing iree-global-opt-data-tiling and iree-dispatch-creation-data-tiling at the same time right? So this seems like something that should still error/warn in NDEBUG. Maybe llvm::reportFatalUsageError or similar would be good here?
There was a problem hiding this comment.
Good point! I use llvm::report_fatal_error and make it fall back to one of options.
| "flag will override the other two flags, because it has a higher " | ||
| "priority."), | ||
| llvm::cl::cat(category)); | ||
|
|
There was a problem hiding this comment.
Side note: If we get more flags that control the options of multiple passes it might be worth setting up something similar to iree-opt-level to make it more declarative & so that the logic is in Options.cpp.
There was a problem hiding this comment.
I think data-tiling flag is in a similar scope of iree-opt-level, or a sub-option in the future. Data-tiling does not belong to any opt level at the moment, because it can regress backends that don't implement data-tiling a lot. It is not ready for the opt level scope yet, but ideally we'd enable it for O2 in the future.
It is in a similar scope to me because it is an umbrella flag that controls encoding early materialization, propagation, etc.
I don't follow how it makes the logic be in Options.cpp, though.
Signed-off-by: hanhanW <hanhan0912@gmail.com>
There are two paths for data-tiling. One starts from global optimization phase and the other starts from dispatch creation phase. The former one is the suggested path, since the latter one is just getting used recently. The revision adds a new `iree-global-opt-data-tiling` flag that allows users to explicitly start the data-tiling from global optimization phase; it promotes the existing flag to an umbrella flag for data-tiling, so users can start data-tiling with the suggested path. It is intended to be NFC for most users in terms of command line flags. The `iree-opt-data-tiling` used to be identical to the new `iree-global-opt-data-tiling`, and it selects the global optimization path when it is set. Note that the pipeline flag has higher priority. I.e., it overrides the other two flags if it is set as true. Doc preview: https://hanhanw.github.io/iree/reference/optimization-options/#data-tiling-iree-opt-data-tiling-off --------- Signed-off-by: hanhanW <hanhan0912@gmail.com> Signed-off-by: Philipp <philipp.weidel@intel.com>
There are two paths for data-tiling. One starts from global optimization phase and the other starts from dispatch creation phase. The former one is the suggested path, since the latter one is just getting used recently. The revision adds a new `iree-global-opt-data-tiling` flag that allows users to explicitly start the data-tiling from global optimization phase; it promotes the existing flag to an umbrella flag for data-tiling, so users can start data-tiling with the suggested path. It is intended to be NFC for most users in terms of command line flags. The `iree-opt-data-tiling` used to be identical to the new `iree-global-opt-data-tiling`, and it selects the global optimization path when it is set. Note that the pipeline flag has higher priority. I.e., it overrides the other two flags if it is set as true. Doc preview: https://hanhanw.github.io/iree/reference/optimization-options/#data-tiling-iree-opt-data-tiling-off --------- Signed-off-by: hanhanW <hanhan0912@gmail.com>
There are two paths for data-tiling. One starts from global optimization phase and the other starts from dispatch creation phase. The former one is the suggested path, since the latter one is just getting used recently.
The revision adds a new
iree-global-opt-data-tilingflag that allows users to explicitly start the data-tiling from global optimization phase; it promotes the existing flag to an umbrella flag for data-tiling, so users can start data-tiling with the suggested path. It is intended to be NFC for most users in terms of command line flags. Theiree-opt-data-tilingused to be identical to the newiree-global-opt-data-tiling, and it selects the global optimization path when it is set.Note that the pipeline flag has higher priority. I.e., it overrides the other two flags if it is set as true.
Doc preview: https://hanhanw.github.io/iree/reference/optimization-options/#data-tiling-iree-opt-data-tiling-off