8000 fix test nondeterminism · pytorch/pytorch@9c5d202 · GitHub
[go: up one dir, main page]

Skip to content 8000

Commit 9c5d202

Browse files
committed
fix test nondeterminism
1 parent a8ec3a2 commit 9c5d202

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/inductor/test_op_dtype_prop.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,9 @@ def test_dtype_aware_codegen(self, op_name: str, load_upcast_to_fp32, input_dtyp
168168
triton_op_name = override if override is not None else torch_op_name
169169

170170
# Get the number of args for the op.
171+
# Take the minimum over all signatures to isolate required args.
171172
signatures = get_signature_for_torch_op(op)
172-
num_args = len(signatures[0].parameters)
173+
num_args = min(len(signature.parameters) for signature in signatures)
173174

174175
# Test codegen and check for casts.
175176
inps = (torch.rand((32, 32), device=GPU_TYPE, dtype=input_dtype),) * num_args

0 commit comments

Comments
 (0)
0