Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
apex
Commits
eba809d7
Commit
eba809d7
authored
Jul 07, 2020
by
lcskrishna
Browse files
skip newer tests
parent
8d5c2624
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
tests/L0/run_optimizers/test_lamb.py
tests/L0/run_optimizers/test_lamb.py
+4
-0
No files found.
tests/L0/run_optimizers/test_lamb.py
View file @
eba809d7
...
...
@@ -5,6 +5,7 @@ import torch
from
torch.optim
import
Optimizer
import
apex
from
apex.multi_tensor_apply
import
multi_tensor_applier
from
apex.testing.common_utils
import
skipIfRocm
class
RefLAMB
(
Optimizer
):
r
"""Implements Lamb algorithm.
...
...
@@ -207,6 +208,7 @@ class TestFusedLAMB(unittest.TestCase):
self
.
assertLessEqual
(
max_abs_diff
,
self
.
max_abs_diff
)
self
.
assertLessEqual
(
max_rel_diff
,
self
.
max_rel_diff
)
@
skipIfRocm
def
test_float
(
self
):
self
.
gen_single_type_test
(
param_type
=
torch
.
float
)
...
...
@@ -214,6 +216,7 @@ class TestFusedLAMB(unittest.TestCase):
def
test_half
(
self
):
self
.
gen_single_type_test
(
param_type
=
torch
.
float16
)
@
skipIfRocm
def
test_multi_params
(
self
):
sizes
=
[[
4096
,
1024
],
[
4096
],
[
4096
,
2048
],
[
32320
,
1024
],
[
1
]]
weight_decay
=
[
0
,
0.01
]
...
...
@@ -234,6 +237,7 @@ class TestFusedLAMB(unittest.TestCase):
self
.
assertLessEqual
(
max_abs_diff
,
self
.
max_abs_diff
)
self
.
assertLessEqual
(
max_rel_diff
,
self
.
max_rel_diff
)
@
skipIfRocm
def
test_lamb_option
(
self
):
nelem
=
1
tensor
=
torch
.
rand
(
nelem
,
dtype
=
torch
.
float
,
device
=
'cuda'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment