diff --git a/.circleci/docker/Dockerfile b/.circleci/docker/Dockerfile index db5ab86e3a..ab4961206a 100644 --- a/.circleci/docker/Dockerfile +++ b/.circleci/docker/Dockerfile @@ -8,6 +8,8 @@ FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel # https://github.com/pytorch/pytorch/issues/37377 ENV MKL_THREADING_LAYER GNU +ARG DEBIAN_FRONTEND=noninteractive + # To fix GPG key error when running apt-get update RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub diff --git a/.circleci/test.yml b/.circleci/test.yml index a5c72b5539..d9ddbce255 100644 --- a/.circleci/test.yml +++ b/.circleci/test.yml @@ -169,16 +169,22 @@ jobs: type: string cuda: type: enum - enum: ["10.1", "10.2", "11.1", "11.7"] + enum: ["10.1", "10.2", "11.1", "11.7", "11.8"] cudnn: type: integer default: 7 machine: - image: ubuntu-2004-cuda-11.4:202110-01 + image: linux-cuda-11:default docker_layer_caching: true - resource_class: gpu.nvidia.small + resource_class: gpu.nvidia.small.multi steps: - checkout + - run: + name: Install nvidia-container-toolkit and Restart Docker + command: | + sudo apt-get update + sudo apt-get install -y nvidia-container-toolkit + sudo systemctl restart docker - run: name: Build Docker image command: | @@ -240,8 +246,8 @@ workflows: - build_without_ops - build_cpu: name: maximum_version_cpu - torch: 2.0.0 - torchvision: 0.15.1 + torch: 2.1.0 + torchvision: 0.16.0 python: 3.9.0 requires: - minimum_version_cpu @@ -257,10 +263,10 @@ workflows: - hold_cuda_test - build_cuda: name: maximum_version_gpu - torch: 2.0.0 + torch: 2.1.0 # Use double quotation mark to explicitly specify its type # as string instead of number - cuda: "11.7" + cuda: "11.8" cudnn: 8 requires: - hold_cuda_test @@ -281,10 +287,10 @@ workflows: - main - build_cuda: name: maximum_version_gpu - torch: 2.0.0 + torch: 2.1.0 # Use double quotation mark to explicitly specify its type # as string instead of number - cuda: "11.7" + cuda: "11.8" cudnn: 8 filters: branches: diff --git a/.github/workflows/build_macos_wheel.yml b/.github/workflows/build_macos_wheel.yml index a9410ab78d..b9f7b815dd 100644 --- a/.github/workflows/build_macos_wheel.yml +++ b/.github/workflows/build_macos_wheel.yml @@ -8,11 +8,11 @@ concurrency: jobs: build_macos10_wheel: - runs-on: macos-10.15 + runs-on: macos-latest if: contains(github.event.head_commit.message, 'Bump version to') strategy: matrix: - torch: [1.8.0, 1.9.0, 1.10.0, 1.11.0, 1.12.0, 1.13.0, 2.0.0] + torch: [1.8.0, 1.9.0, 1.10.0, 1.11.0, 1.12.0, 1.13.0, 2.0.0, 2.1.0] python-version: [3.7, 3.8, 3.9, '3.10', '3.11'] include: - torch: 1.8.0 @@ -29,6 +29,8 @@ jobs: torchvision: 0.14.0 - torch: 2.0.0 torchvision: 0.15.1 + - torch: 2.1.0 + torchvision: 0.16.0 exclude: - torch: 1.8.0 python-version: '3.10' @@ -52,6 +54,8 @@ jobs: python-version: '3.11' - torch: 2.0.0 python-version: 3.7 + - torch: 2.1.0 + python-version: 3.7 steps: - uses: actions/checkout@v2 - name: Set up Python diff --git a/.github/workflows/merge_stage_test.yml b/.github/workflows/merge_stage_test.yml index a2a5dc1345..206d2b577a 100644 --- a/.github/workflows/merge_stage_test.yml +++ b/.github/workflows/merge_stage_test.yml @@ -114,7 +114,7 @@ jobs: strategy: matrix: python-version: [3.7] - torch: [1.8.1, 1.9.1, 1.10.1, 1.11.0, 1.12.0, 1.13.0, 2.0.0] + torch: [1.8.1, 1.9.1, 1.10.1, 1.11.0, 1.12.0, 1.13.0, 2.0.0, 2.1.0] include: - torch: 1.8.1 torchvision: 0.9.1 @@ -131,9 +131,14 @@ jobs: - torch: 2.0.0 torchvision: 0.15.1 python-version: 3.8 + - torch: 2.1.0 + torchvision: 0.16.0 + python-version: 3.8 exclude: - torch: 2.0.0 python-version: 3.7 + - torch: 2.1.0 + python-version: 3.7 steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} @@ -311,13 +316,13 @@ jobs: runs-on: windows-2019 strategy: matrix: - torch: [1.8.1, 2.0.0] + torch: [1.8.1, 2.1.0] include: - torch: 1.8.1 torchvision: 0.9.1 python-version: 3.7 - - torch: 2.0.0 - torchvision: 0.15.1 + - torch: 2.1.0 + torchvision: 0.16.0 python-version: 3.8 steps: - uses: actions/checkout@v2 @@ -343,13 +348,13 @@ jobs: runs-on: macos-latest strategy: matrix: - torch: [1.8.1, 2.0.0] + torch: [1.8.1, 2.1.0] include: - torch: 1.8.1 torchvision: 0.9.1 python-version: 3.7 - - torch: 2.0.0 - torchvision: 0.15.1 + - torch: 2.1.0 + torchvision: 0.16.0 python-version: 3.8 steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/pr_stage_test.yml b/.github/workflows/pr_stage_test.yml index d790384f14..8dfefeed7c 100644 --- a/.github/workflows/pr_stage_test.yml +++ b/.github/workflows/pr_stage_test.yml @@ -132,13 +132,13 @@ jobs: runs-on: windows-2019 strategy: matrix: - torch: [1.8.1, 2.0.0] + torch: [1.8.1, 2.1.0] include: - torch: 1.8.1 torchvision: 0.9.1 python-version: 3.7 - - torch: 2.0.0 - torchvision: 0.15.1 + - torch: 2.1.0 + torchvision: 0.16.0 python-version: 3.8 steps: - uses: actions/checkout@v2 @@ -164,13 +164,13 @@ jobs: runs-on: macos-latest strategy: matrix: - torch: [1.8.1, 2.0.0] + torch: [1.8.1, 2.1.0] include: - torch: 1.8.1 torchvision: 0.9.1 python-version: 3.7 - - torch: 2.0.0 - torchvision: 0.15.1 + - torch: 2.1.0 + torchvision: 0.16.0 python-version: 3.8 steps: - uses: actions/checkout@v2 diff --git a/mmcv/cnn/bricks/generalized_attention.py b/mmcv/cnn/bricks/generalized_attention.py index ab20467f63..239823c787 100644 --- a/mmcv/cnn/bricks/generalized_attention.py +++ b/mmcv/cnn/bricks/generalized_attention.py @@ -371,7 +371,7 @@ def forward(self, x_input: torch.Tensor) -> torch.Tensor: contiguous().\ view(1, 1, h*w, h_kv*w_kv) - energy = energy.masked_fill_(cur_local_constraint_map, + energy = energy.masked_fill_(cur_local_constraint_map.bool(), float('-inf')) attention = F.softmax(energy, 3)