Skip to content

Commit df55ec7

Browse files
malfetpytorchmergebot
authored andcommitted
[OpInfo][BE] Better inputs for addmm (#160234)
Right now alpha and betha are both less than zero, which makes them useless for all addmm samples for interal types Pull Request resolved: #160234 Approved by: https://github.com/Skylion007 ghstack dependencies: #160228
1 parent f0980fc commit df55ec7

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)