Unverified Commit 33e14dea authored by Jiazhen Wang's avatar Jiazhen Wang Committed by GitHub
Browse files

[Enhancement] Add PyTorch1.11.0 CI (#1800)

* add pytorch1.11 ci

* fix test parallel

* fix test parallel
parent bdabdffc
...@@ -217,12 +217,14 @@ jobs: ...@@ -217,12 +217,14 @@ jobs:
strategy: strategy:
matrix: matrix:
python-version: [3.7] 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: include:
- torch: 1.9.0+cu102 - torch: 1.9.0+cu102
torchvision: 0.10.0+cu102 torchvision: 0.10.0+cu102
- torch: 1.10.0+cu102 - torch: 1.10.0+cu102
torchvision: 0.11.0+cu102 torchvision: 0.11.0+cu102
- torch: 1.11.0+cu102
torchvision: 0.12.0+cu102
- python-version: 3.6 - python-version: 3.6
torch: 1.9.0+cu102 torch: 1.9.0+cu102
torchvision: 0.10.0+cu102 torchvision: 0.10.0+cu102
......
...@@ -31,11 +31,15 @@ def test_is_module_wrapper(): ...@@ -31,11 +31,15 @@ def test_is_module_wrapper():
def forward(self, x): def forward(self, x):
return self.conv(x) return self.conv(x)
# _verify_model_across_ranks is added in torch1.9.0 so we should check # _verify_model_across_ranks is added in torch1.9.0,
# whether _verify_model_across_ranks is the member of torch.distributed # _verify_params_across_processes is added in torch1.11.0,
# before mocking # 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'): if hasattr(torch.distributed, '_verify_model_across_ranks'):
torch.distributed._verify_model_across_ranks = mock torch.distributed._verify_model_across_ranks = mock
if hasattr(torch.distributed, '_verify_params_across_processes'):
torch.distributed._verify_params_across_processes = mock
model = Model() model = Model()
assert not is_module_wrapper(model) assert not is_module_wrapper(model)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment