Skip to content

Commit 2807ebd

Browse files
Update tests/unit/torch/export/test_nvfp4_utils.py
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: ynankani-nv <ynankani@nvidia.com>
1 parent c838f3f commit 2807ebd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/unit/torch/export/test_nvfp4_utils.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@ def test_row_col_padding(self):
8989
assert s.shape[0] % 16 == 0
9090
assert s.shape[1] % 16 == 0
9191

92+
def test_row_col_padding_scale_only(self):
93+
sd = _make_nvfp4_state_dict(rows=32, cols=48)
94+
result = pad_nvfp4_weights(sd, "row_col")
95+
96+
assert result["layer0.weight"].shape == (32, 48)
97+
assert result["layer0.weight_scale"].shape == (32, 16)
98+
9299
def test_already_aligned(self):
93100
sd = _make_nvfp4_state_dict(rows=32, cols=64)
94101
orig_w_shape = sd["layer0.weight"].shape

0 commit comments

Comments
 (0)