Nanmur opened a new pull request, #20389:
URL: https://github.com/apache/tvm/pull/20389

   ## Motivation
   
   `CombineParallelMatmul` assumes both operands have matrix dimensions when it 
concatenates RHS tensors and splits the combined output. Valid matmul 
expressions with a 1-D operand therefore crash the pass:
   
   - A vector LHS produces a 1-D output, but the rewrite constructs 
`relax.split(axis=1)`.
   - A vector RHS makes the batch-dimension loop use `rhs_dim - 2`, which 
underflows and leads to an out-of-bounds shape access.
   
   ## Changes
   
   - Skip rewrite groups whose RHS rank is less than two.
   - Skip rewrite groups whose shared LHS rank is less than two.
   - Add regression tests for both vector-LHS and vector-RHS matmul branches, 
verifying that the pass leaves valid unsupported patterns unchanged.
   
   ## Testing
   
   - `python -m pytest 
tests/python/relax/test_transform_combine_parallel_matmul.py -q` (`14 passed`)
   - Release/LLVM source build on Windows
   - Ruff check and format check
   - clang-format dry run
   - ASF header and file-type checks
   
   Fixes #20197


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to