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
13c8d152
Commit
13c8d152
authored
Jan 18, 2021
by
Jeff Daily
Browse files
skip failing tests on ROCm
parent
4ebf2b90
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
tests/L0/run_optimizers/test_fused_optimizer.py
tests/L0/run_optimizers/test_fused_optimizer.py
+5
-0
tests/L0/run_optimizers/test_lamb.py
tests/L0/run_optimizers/test_lamb.py
+1
-0
No files found.
tests/L0/run_optimizers/test_fused_optimizer.py
View file @
13c8d152
...
...
@@ -87,6 +87,7 @@ class TestFusedAdam(TestFusedOptimizer):
self
.
ref_optim
=
torch
.
optim
.
Adam
self
.
fused_optim
=
apex
.
optimizers
.
FusedAdam
@
skipIfRocm
def
test_float
(
self
):
self
.
gen_single_type_test
(
param_type
=
torch
.
float
)
...
...
@@ -102,6 +103,7 @@ class TestFusedAdam(TestFusedOptimizer):
self
.
max_abs_diff
=
1e-2
self
.
gen_single_type_test
(
param_type
=
torch
.
bfloat16
,
apex_only
=
True
)
@
skipIfRocm
@
unittest
.
skipIf
(
torch
.
cuda
.
device_count
()
<
2
,
"more than 1 GPU required"
)
def
test_multi_device
(
self
):
devices
=
(
"cuda:0"
,
"cuda:1"
)
...
...
@@ -194,6 +196,7 @@ class TestFusedAdagrad(TestFusedOptimizer):
self
.
ref_optim
=
torch
.
optim
.
Adagrad
self
.
fused_optim
=
apex
.
optimizers
.
FusedAdagrad
@
skipIfRocm
def
test_float
(
self
):
self
.
gen_single_type_test
(
param_type
=
torch
.
float
)
...
...
@@ -201,6 +204,7 @@ class TestFusedAdagrad(TestFusedOptimizer):
def
test_half
(
self
):
self
.
gen_single_type_test
(
param_type
=
torch
.
float16
)
@
skipIfRocm
@
unittest
.
skipIf
(
torch
.
cuda
.
device_count
()
<
2
,
"more than 1 GPU required"
)
def
test_multi_device
(
self
):
devices
=
(
"cuda:0"
,
"cuda:1"
)
...
...
@@ -209,6 +213,7 @@ class TestFusedAdagrad(TestFusedOptimizer):
self
.
gen_single_type_test
(
param_type
=
torch
.
float
,
device
=
tensor_dev
)
@
skipIfRocm
def
test_multi_params
(
self
):
sizes
=
[[
4096
,
1024
],
[
4096
],
[
4096
,
2048
],
[
32320
,
1024
],
[
1
]]
adagrad_option
=
{
"lr"
:
5e-4
,
"eps"
:
1e-08
,
"weight_decay"
:
0
}
...
...
tests/L0/run_optimizers/test_lamb.py
View file @
13c8d152
...
...
@@ -228,6 +228,7 @@ class TestFusedLAMB(unittest.TestCase):
with
torch
.
cuda
.
device
(
current_dev
):
self
.
gen_single_type_test
(
param_type
=
torch
.
float
,
device
=
tensor_dev
)
@
skipIfRocm
def
test_multi_params
(
self
):
sizes
=
[[
4096
,
1024
],
[
4096
],
[
4096
,
2048
],
[
32320
,
1024
],
[
1
]]
weight_decay
=
[
0
,
0.01
]
...
...
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