[Flow]Relaxes the assertion to accept non-negative operands in saturatingMul ofAnnotateDispatches . - #24947
[Flow]Relaxes the assertion to accept non-negative operands in saturatingMul ofAnnotateDispatches . #24947liuyalong wants to merge 1 commit into
saturatingMul ofAnnotateDispatches . #24947Conversation
|
Hello @liuyalong 👋 Thank you for submitting a Pull Request to IREE! It looks like this is your first one. We have one ask, and you can also find some general tips below. Action required: acknowledge IREE project policiesIREE is a Linux Foundation project. All participants are expected to follow the LF Projects Code of Conduct. All contributions to IREE must follow our IREE AI Tool Use Policy. In particular:
We kindly ask you to reply to this message and confirm that you understand and accept the cited policies, particularly the AI Tool Use Policy. General guidanceOur general Contributing guide contains information and links to detailed guides on code quality, testing, commit summaries and our CI system. A common point for new PRs: if a DCO signing check fails for you, check out the section on Developer Certificate of Origin. If you have any questions, feel free to leave a comment here, or ask away on IREE Discord. Thank you, |
saturatingMul ofAnnotateDispatches . #24378saturatingMul ofAnnotateDispatches .
…e strictly positive (`lhs > 0 && rhs > 0`), which crashes the compiler on 0-extent dimensions (e.g. empty-set reductions with input shape `2x0x4`). Multiplying by `0` is well-defined; nothing should crash just because a dimension is `0`. This relaxes the assertion to accept non-negative operands and short-circuits to `0`. This is a small, self-contained robustness fix. It is the first of a series of 0-extent assertion issues surfaced by the ONNX empty-set reduction cases; a follow-up will address the root cause within IREE (removing the 0-extent reduction before codegen). Related to iree-org#24378 Assisted-by: AI Tools Signed-off-by: Yalong <liuyalong.email@foxmail.com>
3809613 to
b7bceb5
Compare
[Flow]
saturatingMulinAnnotateDispatchesasserts its operands are strictly positive (lhs > 0 && rhs > 0), which crashes the compiler on 0-extent dimensions (e.g. empty-set reductions with input shape2x0x4). Multiplying by0is well-defined; nothing should crash just because a dimension is0.This relaxes the assertion to accept non-negative operands and short-circuits to
0.This is a small, self-contained robustness fix. It is the first of a series of 0-extent assertion issues surfaced by the ONNX empty-set reduction cases; a follow-up will address the root cause within IREE (removing the 0-extent reduction before codegen).
Related to #24378