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
MMCV
Commits
33e14dea
Unverified
Commit
33e14dea
authored
Mar 15, 2022
by
Jiazhen Wang
Committed by
GitHub
Mar 15, 2022
Browse files
[Enhancement] Add PyTorch1.11.0 CI (#1800)
* add pytorch1.11 ci * fix test parallel * fix test parallel
parent
bdabdffc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
.github/workflows/build.yml
.github/workflows/build.yml
+3
-1
tests/test_parallel.py
tests/test_parallel.py
+7
-3
No files found.
.github/workflows/build.yml
View file @
33e14dea
...
...
@@ -217,12 +217,14 @@ jobs:
strategy
:
matrix
:
python-version
:
[
3.7
]
torch
:
[
1.9.0+cu102
,
1.10.0+cu102
]
torch
:
[
1.9.0+cu102
,
1.10.0+cu102
,
1.11.0+cu102
]
include
:
-
torch
:
1.9.0+cu102
torchvision
:
0.10.0+cu102
-
torch
:
1.10.0+cu102
torchvision
:
0.11.0+cu102
-
torch
:
1.11.0+cu102
torchvision
:
0.12.0+cu102
-
python-version
:
3.6
torch
:
1.9.0+cu102
torchvision
:
0.10.0+cu102
...
...
tests/test_parallel.py
View file @
33e14dea
...
...
@@ -31,11 +31,15 @@ def test_is_module_wrapper():
def
forward
(
self
,
x
):
return
self
.
conv
(
x
)
# _verify_model_across_ranks is added in torch1.9.0 so we should check
# whether _verify_model_across_ranks is the member of torch.distributed
# before mocking
# _verify_model_across_ranks is added in torch1.9.0,
# _verify_params_across_processes is added in torch1.11.0,
# so we should check whether _verify_model_across_ranks
# and _verify_params_across_processes are the member of
# torch.distributed before mocking
if
hasattr
(
torch
.
distributed
,
'_verify_model_across_ranks'
):
torch
.
distributed
.
_verify_model_across_ranks
=
mock
if
hasattr
(
torch
.
distributed
,
'_verify_params_across_processes'
):
torch
.
distributed
.
_verify_params_across_processes
=
mock
model
=
Model
()
assert
not
is_module_wrapper
(
model
)
...
...
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