Commit 0b79041
authored
[FX] Fix scaled_mm_v2 test shape for PyTorch compatibility (#4643)
## Description
PyTorch requires `scale_a/b` to be 2D tensors for `scaled_mm_v2` (see
[validate_scaled_mm_v2_inputs](https://github.com/pytorch/pytorch/blob/d4165ba8f7d119c23f08273aa6979734f843845c/aten/src/ATen/native/ScaledBlasUtils.cpp#L449)).
In older PyTorch versions, this check was enforced in Python
meta-registrations (prior to [this
commit](pytorch/pytorch@1a00857)
moving the validation to C++). However,
`test_import_scaled_mm_v2_rowwise_fp4` was using 1D tensors, causing
tracing and metadata checks to fail on PyTorch 2.3+.
This PR fixes the test case by updating the scale tensors to `(128, 1)`.1 parent 1828c50 commit 0b79041
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
304 | | - | |
| 304 | + | |
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
340 | | - | |
341 | | - | |
| 340 | + | |
| 341 | + | |
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
| |||
0 commit comments