Skip to content

Commit aeee2ba

Browse files
author
Mark Saroufim
committed
patch utils.py to avoid [] as a valid submission
1 parent 0942e96 commit aeee2ba

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • problems/nvidia/nvfp4_group_gemm

problems/nvidia/nvfp4_group_gemm/utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ def match_reference(data, output, reference: callable, rtol=1e-05, atol=1e-08) -
131131
Convenient "default" implementation for tasks' `check_implementation` function.
132132
"""
133133
expected = reference(data)
134+
135+
if len(output) != len(expected):
136+
return False, f"output length mismatch: got {len(output)}, expected {len(expected)}"
137+
134138
for i, (output_i, expected_i) in enumerate(zip(output, expected)):
135139
reasons = verbose_allclose(output_i, expected_i, rtol=rtol, atol=atol)
136140
if len(reasons) > 0:

0 commit comments

Comments
 (0)