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

   The GPU GEMV schedule assumes that the outer spatial loop produced by its 
thread-tile split has extent one. It checks this by reading `.extent.value`, 
which crashes when the extent is a `FloorDiv`; for the convolution shapes in 
#20047, the extent is also genuinely larger than one, so forcing this GEMV 
schedule is not valid.
   
   This change uses `arith.Analyzer.can_prove_equal` at the three unit-extent 
guards. When the selected GEMV configuration cannot prove that the outer extent 
is one, the rule returns `None`, allowing `ApplyDefaultSchedule` to continue to 
the GPU Fallback rule.
   
   The regression test uses the lowered TIR for the reported `1x1x3x10` input 
and `1x1x1x2` kernel. It verifies that GEMV declines the unsupported 
configuration and Fallback produces a scheduled PrimFunc instead of raising 
`AttributeError` or `AssertionError`.
   
   Fixes #20047
   
   Tests:
   - `python -m pytest tests/python/s_tir/dlight/test_gpu_gemv.py -q` (`15 
passed`)
   - Relax CUDA default-pipeline probe for the reported conv2d shape
   - `python -m ruff check python/tvm/s_tir/dlight/gpu/gemv.py 
tests/python/s_tir/dlight/test_gpu_gemv.py`
   - `python -m ruff format --check python/tvm/s_tir/dlight/gpu/gemv.py 
tests/python/s_tir/dlight/test_gpu_gemv.py`


-- 
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