Skip to content

Commit d8013e0

Browse files
jaglinuxpruthvistony
authored andcommitted
ROCm: Fix test_nadam (#1006)
Change the rtol level Signed-off-by: Jagadish Krishnamoorthy <[email protected]>
1 parent 9bdfb92 commit d8013e0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/test_optim.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
TestCase,
4040
run_tests,
4141
TEST_WITH_UBSAN,
42+
TEST_WITH_ROCM,
4243
load_tests,
4344
parametrize,
4445
instantiate_parametrized_tests,
@@ -1174,6 +1175,8 @@ def test_adadelta_complex(self):
11741175
)
11751176

11761177
def test_nadam(self):
1178+
if TEST_WITH_ROCM:
1179+
self.rel_tol = 1e-5
11771180
self._test_basic_cases(
11781181
lambda weight, bias, foreach: optim.NAdam(
11791182
[weight, bias], lr=1e-3, foreach=foreach

0 commit comments

Comments
 (0)