Skip to content

Commit 6f460a7

Browse files
committed
[OpInfo][BE] Better inputs for addmm
Right now alpha and betha are both less than zero, which makes them useless for all addmm samples for interal types ghstack-source-id: d3ec519 Pull Request resolved: #160234
1 parent 4f9f396 commit 6f460a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

torch/testing/_internal/common_methods_invocations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,8 +1161,8 @@ def make_arg_conj(size):
11611161

11621162

11631163
def sample_inputs_addmm(op_info, device, dtype, requires_grad, **kwargs):
1164-
alpha_val = kwargs.get('alpha', 2 + 3j if dtype.is_complex else 0.6)
1165-
beta_val = kwargs.get('beta', 1 + 2j if dtype.is_complex else 0.2)
1164+
alpha_val = kwargs.get('alpha', 2 + 3j if dtype.is_complex else 0.6 if dtype.is_floating_point else 2)
1165+
beta_val = kwargs.get('beta', 1 + 2j if dtype.is_complex else 0.2 if dtype.is_floating_point else 3)
11661166
tests_list = [
11671167
((2, 3), (2, 2), (2, 3), False),
11681168
((3, 3), (3, 3), (3, 3), False),

0 commit comments

Comments
 (0)