Unverified Commit c7b8ccc6 authored by Zaida Zhou's avatar Zaida Zhou Committed by GitHub
Browse files

Add torch2.1.0 checking in CI (#2955)

parent cac0c44a
...@@ -8,6 +8,8 @@ FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel ...@@ -8,6 +8,8 @@ FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel
# https://github.com/pytorch/pytorch/issues/37377 # https://github.com/pytorch/pytorch/issues/37377
ENV MKL_THREADING_LAYER GNU ENV MKL_THREADING_LAYER GNU
ARG DEBIAN_FRONTEND=noninteractive
# To fix GPG key error when running apt-get update # 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/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 RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
......
...@@ -169,16 +169,22 @@ jobs: ...@@ -169,16 +169,22 @@ jobs:
type: string type: string
cuda: cuda:
type: enum type: enum
enum: ["10.1", "10.2", "11.1", "11.7"] enum: ["10.1", "10.2", "11.1", "11.7", "11.8"]
cudnn: cudnn:
type: integer type: integer
default: 7 default: 7
machine: machine:
image: ubuntu-2004-cuda-11.4:202110-01 image: linux-cuda-11:default
docker_layer_caching: true docker_layer_caching: true
resource_class: gpu.nvidia.small resource_class: gpu.nvidia.small.multi
steps: steps:
- checkout - 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: - run:
name: Build Docker image name: Build Docker image
command: | command: |
...@@ -240,8 +246,8 @@ workflows: ...@@ -240,8 +246,8 @@ workflows:
- build_without_ops - build_without_ops
- build_cpu: - build_cpu:
name: maximum_version_cpu name: maximum_version_cpu
torch: 2.0.0 torch: 2.1.0
torchvision: 0.15.1 torchvision: 0.16.0
python: 3.9.0 python: 3.9.0
requires: requires:
- minimum_version_cpu - minimum_version_cpu
...@@ -257,10 +263,10 @@ workflows: ...@@ -257,10 +263,10 @@ workflows:
- hold_cuda_test - hold_cuda_test
- build_cuda: - build_cuda:
name: maximum_version_gpu name: maximum_version_gpu
torch: 2.0.0 torch: 2.1.0
# Use double quotation mark to explicitly specify its type # Use double quotation mark to explicitly specify its type
# as string instead of number # as string instead of number
cuda: "11.7" cuda: "11.8"
cudnn: 8 cudnn: 8
requires: requires:
- hold_cuda_test - hold_cuda_test
...@@ -281,10 +287,10 @@ workflows: ...@@ -281,10 +287,10 @@ workflows:
- main - main
- build_cuda: - build_cuda:
name: maximum_version_gpu name: maximum_version_gpu
torch: 2.0.0 torch: 2.1.0
# Use double quotation mark to explicitly specify its type # Use double quotation mark to explicitly specify its type
# as string instead of number # as string instead of number
cuda: "11.7" cuda: "11.8"
cudnn: 8 cudnn: 8
filters: filters:
branches: branches:
......
...@@ -8,11 +8,11 @@ concurrency: ...@@ -8,11 +8,11 @@ concurrency:
jobs: jobs:
build_macos10_wheel: build_macos10_wheel:
runs-on: macos-10.15 runs-on: macos-latest
if: contains(github.event.head_commit.message, 'Bump version to') if: contains(github.event.head_commit.message, 'Bump version to')
strategy: strategy:
matrix: 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'] python-version: [3.7, 3.8, 3.9, '3.10', '3.11']
include: include:
- torch: 1.8.0 - torch: 1.8.0
...@@ -29,6 +29,8 @@ jobs: ...@@ -29,6 +29,8 @@ jobs:
torchvision: 0.14.0 torchvision: 0.14.0
- torch: 2.0.0 - torch: 2.0.0
torchvision: 0.15.1 torchvision: 0.15.1
- torch: 2.1.0
torchvision: 0.16.0
exclude: exclude:
- torch: 1.8.0 - torch: 1.8.0
python-version: '3.10' python-version: '3.10'
...@@ -52,6 +54,8 @@ jobs: ...@@ -52,6 +54,8 @@ jobs:
python-version: '3.11' python-version: '3.11'
- torch: 2.0.0 - torch: 2.0.0
python-version: 3.7 python-version: 3.7
- torch: 2.1.0
python-version: 3.7
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Set up Python - name: Set up Python
......
...@@ -114,7 +114,7 @@ jobs: ...@@ -114,7 +114,7 @@ jobs:
strategy: strategy:
matrix: matrix:
python-version: [3.7] 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: include:
- torch: 1.8.1 - torch: 1.8.1
torchvision: 0.9.1 torchvision: 0.9.1
...@@ -131,9 +131,14 @@ jobs: ...@@ -131,9 +131,14 @@ jobs:
- torch: 2.0.0 - torch: 2.0.0
torchvision: 0.15.1 torchvision: 0.15.1
python-version: 3.8 python-version: 3.8
- torch: 2.1.0
torchvision: 0.16.0
python-version: 3.8
exclude: exclude:
- torch: 2.0.0 - torch: 2.0.0
python-version: 3.7 python-version: 3.7
- torch: 2.1.0
python-version: 3.7
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }} - name: Set up Python ${{ matrix.python-version }}
...@@ -311,13 +316,13 @@ jobs: ...@@ -311,13 +316,13 @@ jobs:
runs-on: windows-2019 runs-on: windows-2019
strategy: strategy:
matrix: matrix:
torch: [1.8.1, 2.0.0] torch: [1.8.1, 2.1.0]
include: include:
- torch: 1.8.1 - torch: 1.8.1
torchvision: 0.9.1 torchvision: 0.9.1
python-version: 3.7 python-version: 3.7
- torch: 2.0.0 - torch: 2.1.0
torchvision: 0.15.1 torchvision: 0.16.0
python-version: 3.8 python-version: 3.8
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
...@@ -343,13 +348,13 @@ jobs: ...@@ -343,13 +348,13 @@ jobs:
runs-on: macos-latest runs-on: macos-latest
strategy: strategy:
matrix: matrix:
torch: [1.8.1, 2.0.0] torch: [1.8.1, 2.1.0]
include: include:
- torch: 1.8.1 - torch: 1.8.1
torchvision: 0.9.1 torchvision: 0.9.1
python-version: 3.7 python-version: 3.7
- torch: 2.0.0 - torch: 2.1.0
torchvision: 0.15.1 torchvision: 0.16.0
python-version: 3.8 python-version: 3.8
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
......
...@@ -132,13 +132,13 @@ jobs: ...@@ -132,13 +132,13 @@ jobs:
runs-on: windows-2019 runs-on: windows-2019
strategy: strategy:
matrix: matrix:
torch: [1.8.1, 2.0.0] torch: [1.8.1, 2.1.0]
include: include:
- torch: 1.8.1 - torch: 1.8.1
torchvision: 0.9.1 torchvision: 0.9.1
python-version: 3.7 python-version: 3.7
- torch: 2.0.0 - torch: 2.1.0
torchvision: 0.15.1 torchvision: 0.16.0
python-version: 3.8 python-version: 3.8
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
...@@ -164,13 +164,13 @@ jobs: ...@@ -164,13 +164,13 @@ jobs:
runs-on: macos-latest runs-on: macos-latest
strategy: strategy:
matrix: matrix:
torch: [1.8.1, 2.0.0] torch: [1.8.1, 2.1.0]
include: include:
- torch: 1.8.1 - torch: 1.8.1
torchvision: 0.9.1 torchvision: 0.9.1
python-version: 3.7 python-version: 3.7
- torch: 2.0.0 - torch: 2.1.0
torchvision: 0.15.1 torchvision: 0.16.0
python-version: 3.8 python-version: 3.8
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
......
...@@ -371,7 +371,7 @@ class GeneralizedAttention(nn.Module): ...@@ -371,7 +371,7 @@ class GeneralizedAttention(nn.Module):
contiguous().\ contiguous().\
view(1, 1, h*w, h_kv*w_kv) 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')) float('-inf'))
attention = F.softmax(energy, 3) attention = F.softmax(energy, 3)
......
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