Skip to content

[FIX][TIR] Fix fixed-point multiply legalization - #20341

Open
sepcnt wants to merge 3 commits into
apache:mainfrom
sepcnt:q-multiply-shift-legalize
Open

sepcnt wants to merge 3 commits into
apache:mainfrom
sepcnt:q-multiply-shift-legalize

Conversation

@sepcnt

@sepcnt sepcnt commented Sep 15, 2026

Copy link
Copy Markdown

Handle runtime operands, zero-exponent scaling, and integer per-axis flags. Restrict the fast path to Q31.

Fixes #20340.
Fixes tile-ai/tilelang#3014.
Fixes tile-ai/tilelang#3003.
Fixes tile-ai/tilelang#3006.

Resolve BigInt conflicts by matching IntImm directly and avoid int64 conversion and host exponent subtraction. Keep five minimal regression cases in the existing lower-intrin test file, reusing its lowering helper without a standalone test module.

Validation: all five regressions fail with upstream intrin_rule.cc and pass with the patched implementation. Related Python tests: 1042 passed, 57 skipped, 8 xfailed. Changed-file pre-commit passed. The unchanged C++ implementation also passed the previous 640-case numerical oracle and three LowerIntrin smoke checks.
@sepcnt
sepcnt force-pushed the q-multiply-shift-legalize branch from ec35ba6 to abda08d Compare September 20, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment