Skip to content

[Fix][Relax] Skip constant LHS in CombineParallelMatmul - #20822

Open
Nanmur wants to merge 1 commit into
apache:mainfrom
Nanmur:codex/fix-combine-parallel-matmul-const
Open

Nanmur wants to merge 1 commit into
apache:mainfrom
Nanmur:codex/fix-combine-parallel-matmul-const

Conversation

@Nanmur

@Nanmur Nanmur commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

This change prevents CombineParallelMatmul from throwing when a matched matmul has a non-Var left operand.

The pass groups parallel branches by VarNode identity, so a constant left operand cannot participate in the existing grouping scheme. Skip these ineligible matches and leave the original matmul unchanged.

Fixes #20821

Tests:

  • python -m pytest tests/python/relax/test_transform_combine_parallel_matmul.py -q (13 passed)
  • pre-commit run --files src/relax/transform/combine_parallel_matmul.cc tests/python/relax/test_transform_combine_parallel_matmul.py
  • Windows source build with MSVC 19.51 and Ninja

The issue investigation and patch preparation were assisted by OpenAI Codex.

@Nanmur
Nanmur force-pushed the codex/fix-combine-parallel-matmul-const branch from 4127212 to d625e2b Compare October 26, 2026 07:10
@Nanmur

Nanmur commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

@tlopex Could you please help rerun the Windows check when the runner/setup issue is resolved?

The Windows job has failed twice before any TVM build or test step ran (Actions runs 40280664426 and 40284167740). In both attempts, conda-incubator/setup-miniconda@v4.0.1 failed during environment setup:

  1. conda init --all reported needs sudo C:\Users\runneradmin\miniconda3\Scripts\conda.exe.
  2. The action retried installation into the same path.
  3. The retry exited because C:\Users\runneradmin\miniconda3 was already non-empty.

The subsequent conda info, dependency installation, build, and test steps were skipped, so this failure did not exercise the PR changes. macOS, lint, and all Jenkins checks (arm/cpu/docker/gpu/wasm) are passing. I also cannot rerun the GitHub Actions job from a fork contributor account because it requires repository admin permission.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug][Relax] CombineParallelMatmul crashes on a constant matrix left operand even for a single matmul

1 participant