Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pick commits from 1.x branch #2849

Merged
merged 42 commits into from
Jun 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
cb94ffb
[Fix] Fix a typo in the docstring of MSDeformAttn (#2599)
nijkah Feb 13, 2023
8e8ab22
[Enhancement] Support MultiScaleDeformableAttention with AMP (#2541)
nijkah Feb 17, 2023
4adddfd
Fix the paper link error in the docstring (#2618)
BainOuO Feb 27, 2023
ec63932
[Enhance] The argument scale of fused_bias_leakyrelu should be greate…
jayggh Feb 27, 2023
5f12229
[Enhancement] ms_deform_attn performance optimization (#2616)
Wickyzheng Mar 3, 2023
7459859
[Feature] Add the support of voxelization op for ascend device (#2613)
dflhw Mar 3, 2023
126077d
[Feature] Make voxelization operator support the mlu290 platform (#2652)
mahxn0 Mar 10, 2023
9a671e4
[Fix] Prevent divide-by-zero error on Ascend device for bbox_overlaps…
dflhw Mar 15, 2023
7529068
[Enhancement] Refine the implementation of NMS op in Ascend device (#…
momo609 Mar 15, 2023
a3e9736
[Fix] nms_rotated_npu accepts angle parameter (#2670)
18251968697 Mar 17, 2023
01a0f53
[Feature] Add Ascend support for RoIAlign op (#2638)
momo609 Mar 20, 2023
06fa328
[Feature] Add MLU support for Sparse Convolution op (#2589)
duzekunKTH Mar 20, 2023
4e8972f
Move voxel_size to the device where points are (#2681)
dflhw Mar 20, 2023
1de3aef
Fix bbox_overlaps of parrots (#2684)
CokeDong Mar 22, 2023
e6f434c
[Enhance] Add a comment for the use of masked_conv on Ascend device (…
zcc9707 Mar 22, 2023
0d1b224
[Feature] Support NmsRotated with cambricon MLU backend (#2643)
liuyuan1-v Mar 23, 2023
9fcf48c
[Enhancement] Replace the implementation of deform_roi_pool with mlu-…
defei-coder Mar 24, 2023
5f1d558
[Enhance] Ignore mlu-ops files (#2691)
defei-coder Mar 24, 2023
4c4ba6c
[Fix] Force bbox_overlaps calculation with FP32 for ascend device (#2…
dflhw Mar 24, 2023
66c5515
[Enhance] Add a default value for MMCV_MLU_ARGS (#2688)
defei-coder Mar 24, 2023
8ceac93
Remove .owners.yml (#2712)
zhouzaida Mar 28, 2023
f946a93
[Enhancement] Add the dtype limit of nms_npu to maintain consistency …
momo609 Apr 3, 2023
a55f4b7
[Enhancement] Replace the implementation of three_nn_forward with mlu…
DanieeelLiu Apr 3, 2023
bc727f7
[Enhancement] Repalce the implementation of roiaware_pool3d with mlu-…
ZhangLearning Apr 3, 2023
bfdd1f9
[Fix] Fix boxes.scalar_type in nms_npu (#2731)
momo609 Apr 4, 2023
81163d5
[Feature] Add torch_npu optimizers (#2753)
luomaoling Apr 13, 2023
8d01bf6
[Fix] Fix torch_npu may not contain optim (#2766)
luomaoling Apr 19, 2023
595f8fd
[Feature] Add the MLU support for box_iou_rotated op (#2703)
ZhangLearning Apr 20, 2023
883d339
Replace the ubuntu-18.04 with 22.04 in CI (#2793)
zhouzaida May 11, 2023
e197eff
[Feature] Add the support of arf op for ascend device (#2789)
dflhw May 11, 2023
8725e68
[Refactor] Replace the MLU ops implementation with mlu-ops (#2750)
defei-coder May 18, 2023
445910e
DvcliveLoggerHook: use `by_epoch` for determining when to log (#2149)
daavoo May 22, 2023
8ca930c
[Refactor] Replace carafe op of MLU backend with mlu-ops (#2818)
qipengh May 31, 2023
515d541
[Refactor] Replace the implementation of psa_mask with mlu-ops. (#2756)
DanieeelLiu May 31, 2023
fd3fbfe
[Refactor] Repalce the implementation of rotated_feature_align with m…
tudejiang79 May 31, 2023
58e7c8c
[Refactor] Repalce the implementation of roi_align_rotated with mlu-o…
tudejiang79 May 31, 2023
e5dcfba
[Refactor] Simplify the logic of sparse_conv (#2683)
duzekunKTH Jun 1, 2023
16d52da
[Fix] keep the shape of iou op's parameter 2 smaller than parameter 1…
dflhw Jun 9, 2023
e439825
[Fix] Fix arf op's write conflict when num_orientations is not 1 (#2822)
dflhw Jun 9, 2023
9c0f9cb
Revert "[Fix] Fix arf op's write conflict when num_orientations is no…
dflhw Jun 10, 2023
f07ed6b
[Fix] Fix deform_conv ops on Ascend NPU (#2805)
Ginray Jun 15, 2023
cb4a484
Merge branch '1.x' of https://github.com/open-mmlab/mmcv into npu-dev
ckirchhoff2021 Jun 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ jobs:
pyenv install << parameters.python >>
pyenv global << parameters.python >>
- run:
name: Upgrade pip
name: Upgrade pip and wheel
command: |
python -m pip install pip --upgrade
python -m pip install pip wheel --upgrade
- run:
name: Install PyTorch
command: python -m pip install torch==<< parameters.torch >>+cpu torchvision==<< parameters.torchvision >>+cpu -f https://download.pytorch.org/whl/torch_stable.html
Expand All @@ -62,7 +62,7 @@ jobs:
command: |
rm -rf .eggs
python setup.py check -m -s
python -m pip install -e .
python -m pip install -e . -v
no_output_timeout: 20m
environment:
MMCV_WITH_OPS: 1
Expand Down Expand Up @@ -116,9 +116,9 @@ jobs:
pyenv install 3.7.0
pyenv global 3.7.0
- run:
name: Upgrade pip
name: Upgrade pip and wheel
command: |
python -m pip install pip --upgrade
python -m pip install pip wheel --upgrade
- run:
name: Install PyTorch
command: python -m pip install torch==1.8.1+cu102 torchvision==0.9.1+cu102 -f https://download.pytorch.org/whl/torch_stable.html
Expand All @@ -139,7 +139,7 @@ jobs:
command: |
rm -rf .eggs
python setup.py check -m -s
python -m pip install -e .
python -m pip install -e . -v
environment:
MMCV_WITH_OPS: 1
MMCV_WITH_ORT: 1
Expand Down
123 changes: 61 additions & 62 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ env:

jobs:
build_without_torch:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: [3.7]
Expand All @@ -38,6 +38,8 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and wheel
run: pip install pip wheel --upgrade
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y ffmpeg libturbojpeg
- name: Build and install
Expand Down Expand Up @@ -65,7 +67,7 @@ jobs:
--ignore=tests/test_utils/test_torch_ops.py

build_without_ops:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
env:
MMCV_WITH_OPS: 0
strategy:
Expand All @@ -85,12 +87,14 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and wheel
run: pip install pip wheel --upgrade
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y ffmpeg libturbojpeg
- name: Install PyTorch
run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/torch_stable.html
- name: Build and install
run: rm -rf .eggs && pip install -e .
run: rm -rf .eggs && pip install -e . -v
- name: Validate the installation
run: python -c "import mmcv"
- name: Run unittests
Expand All @@ -99,7 +103,7 @@ jobs:
pytest tests/ --ignore=tests/test_ops

build_cpu:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: [3.7]
Expand All @@ -121,13 +125,14 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and wheel
run: pip install pip wheel --upgrade
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y ffmpeg libturbojpeg
- name: Install PyTorch
run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/torch_stable.html
# pstuil is an optional package to detect the number of CPU for compiling mmcv
- name: Install psutil
run: pip install psutil
- name: Install ninja to speed the compilation
run: pip install ninja psutil
- name: Create sdist and untar
run: |
MMCV_WITH_OPS=1 python setup.py sdist
Expand All @@ -136,7 +141,7 @@ jobs:
- name: Build and install from sdist
run: |
pushd /tmp/mmcv-full*
pip install -e .
pip install -e . -v
popd
- name: Validate the installation
run: python -c "import mmcv"
Expand All @@ -148,7 +153,7 @@ jobs:
coverage report -m

build_cu101:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
container:
image: pytorch/pytorch:1.6.0-cuda10.1-cudnn7-devel
env:
Expand Down Expand Up @@ -182,36 +187,32 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and wheel
run: pip install pip wheel --upgrade
- name: Fetch GPG keys
run: |
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
- name: Install python-dev
run: apt-get update && apt-get install -y python${{matrix.python-version}}-dev
if: ${{matrix.python-version != '3.9'}}
- name: Install Pillow
run: python -m pip install Pillow==6.2.2
if: ${{matrix.torchvision == '0.4.2'}}
# When we use a third-party container, we need to add python -m to call
# the user-installed pip when we use the pip command, otherwise it will
# call the system pip
if: ${{matrix.python-version == '3.6'}}
- name: Install PyTorch
run: python -m pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html
run: pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html
- name: Install system dependencies
run: apt-get update && apt-get install -y ffmpeg libturbojpeg ninja-build
- name: Install dependencies for compiling onnx when python=3.9
run: python -m pip install protobuf && apt-get -y install libprotobuf-dev protobuf-compiler cmake
run: pip install protobuf && apt-get -y install libprotobuf-dev protobuf-compiler cmake
if: ${{matrix.python-version == '3.9'}}
# pstuil is an optional package to detect the number of CPU for compiling mmcv
- name: Install psutil
run: python -m pip install psutil
- name: Install ninja to speed the compilation
run: pip install ninja psutil
- name: Install pre-built opencv-python for python3.6
run: pip install opencv-python --prefer-binary
if: ${{matrix.python-version == '3.6'}}
- name: Build and install
run: rm -rf .eggs && python -m pip install -e .
- name: Validate the installation
run: python -c "import mmcv"
run: rm -rf .eggs && pip install -e . -v
- name: Run unittests and generate coverage report
run: |
python -m pip install -r requirements/test.txt
pip install -r requirements/test.txt
coverage run --branch --source=mmcv -m pytest tests/
coverage xml
coverage report -m
Expand All @@ -227,7 +228,7 @@ jobs:
fail_ci_if_error: false

build_cu102:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
container:
image: pytorch/pytorch:1.9.0-cuda10.2-cudnn7-devel
env:
Expand Down Expand Up @@ -260,47 +261,46 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and wheel
run: pip install pip wheel --upgrade
- name: Fetch GPG keys
run: |
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
- name: Add PPA
run: |
apt-get update && apt-get install -y software-properties-common
add-apt-repository -y ppa:deadsnakes/ppa
- name: Install python-dev
run: apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y python${{matrix.python-version}}-dev
- name: python -m Install PyTorch
run: python -m pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html
run: apt-get update && apt-get install -y python${{matrix.python-version}}-dev
if: ${{matrix.python-version == '3.6'}}
- name: Install PyTorch
run: pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html
- name: Install system dependencies
run: apt-get update && apt-get install -y ffmpeg libturbojpeg ninja-build
# pstuil is an optional package to detect the number of CPU for compiling mmcv
- name: Install psutil
run: python -m pip install psutil
- name: Install ninja to speed the compilation
run: pip install ninja psutil
# the directory for header files for the Python C-API could be wrong since setuptools>=65.2.0
- name: Install specified version for setuptools when python==3.10
run: python -m pip install 'setuptools<=65.1.0'
run: pip install 'setuptools<=65.1.0'
if: ${{matrix.python-version == '3.10'}}
- name: Install pre-built opencv-python for python3.6
run: pip install opencv-python --prefer-binary
if: ${{matrix.python-version == '3.6'}}
- name: Build and install
run: rm -rf .eggs && python -m pip install -e .
- name: Validate the installation
run: python -c "import mmcv"
run: rm -rf .eggs && pip install -e . -v
- name: Run unittests and generate coverage report
run: |
python -m pip install -r requirements/test.txt
pip install -r requirements/test.txt
coverage run --branch --source=mmcv -m pytest tests/
coverage xml
if: ${{matrix.python-version != '3.10'}}
# special treatment for python3.10 because onnx and onnxruntime don't provide python3.10 pre-built packages
- name: Run unittests and generate coverage report for python3.10
run: |
python -m pip install -r requirements/test.txt
pip install -r requirements/test.txt
coverage run --branch --source=mmcv -m pytest tests/ --ignore=tests/test_ops/test_onnx.py --ignore=tests/test_ops/test_tensorrt.py --ignore=tests/test_ops/test_tensorrt_preprocess.py
coverage xml
if: ${{matrix.python-version == '3.10'}}

build_cu116:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
container:
image: pytorch/pytorch:1.13.0-cuda11.6-cudnn8-devel
env:
Expand All @@ -319,34 +319,27 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and wheel
run: pip install pip wheel --upgrade
- name: Fetch GPG keys
run: |
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
- name: Add PPA
run: |
apt-get update && apt-get install -y software-properties-common
add-apt-repository -y ppa:deadsnakes/ppa
- name: Install python-dev
run: apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y python${{matrix.python-version}}-dev
- name: python -m Install PyTorch
run: python -m pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html
- name: Install PyTorch
run: pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html
- name: Install system dependencies
run: apt-get update && apt-get install -y ffmpeg libturbojpeg ninja-build
# pstuil is an optional package to detect the number of CPU for compiling mmcv
- name: Install psutil
run: python -m pip install psutil
- name: Install ninja to speed the compilation
run: pip install ninja psutil
# the directory for header files for the Python C-API could be wrong since setuptools>=65.2.0
- name: Install specified version for setuptools when python==3.10
run: python -m pip install 'setuptools<=65.1.0'
run: pip install 'setuptools<=65.1.0'
if: ${{matrix.python-version == '3.10'}}
- name: Build and install
run: rm -rf .eggs && python -m pip install -e .
- name: Validate the installation
run: python -c "import mmcv"
run: rm -rf .eggs && pip install -e . -v
- name: Run unittests and generate coverage report
run: |
python -m pip install -r requirements/test.txt
pip install -r requirements/test.txt
coverage run --branch --source=mmcv -m pytest tests/ --ignore=tests/test_ops/test_onnx.py --ignore=tests/test_ops/test_tensorrt.py --ignore=tests/test_ops/test_tensorrt_preprocess.py
coverage xml

Expand All @@ -370,10 +363,12 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Upgrade pip and wheel
run: python -m pip install pip wheel --upgrade
- name: Install PyTorch
run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu --no-cache-dir -f https://download.pytorch.org/whl/torch_stable.html
- name: Build and install
run: pip install -e .
run: pip install -e . -v
- name: Validate the installation
run: python -c "import mmcv"
- name: Run unittests
Expand All @@ -399,10 +394,12 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Upgrade pip and wheel
run: python -m pip install pip wheel --upgrade
- name: Install PyTorch
run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu --no-cache-dir -f https://download.pytorch.org/whl/torch_stable.html
- name: Build and install
run: pip install -e .
run: pip install -e . -v
- name: Validate the installation
run: python -c "import mmcv"
- name: Run unittests
Expand Down Expand Up @@ -434,6 +431,8 @@ jobs:
python-version: 3.7
- name: Install system dependencies
run: brew install ffmpeg jpeg-turbo
- name: Upgrade pip and wheel
run: pip install pip wheel --upgrade
- name: Install utils
run: pip install psutil
- name: Install Pillow
Expand All @@ -444,7 +443,7 @@ jobs:
- name: Build and install
run: |
rm -rf .eggs
CC=clang CXX=clang++ CFLAGS='-stdlib=libc++' pip install -e .
CC=clang CXX=clang++ CFLAGS='-stdlib=libc++' pip install -e . -v
- name: Validate the installation
run: python -c "import mmcv"
- name: Run unittests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_pat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:

jobs:
build_parrots:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
container:
image: ghcr.io/cokedong/parrots:pat0.21.0a0_cuda11
credentials:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ concurrency:

jobs:
lint:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ concurrency:

jobs:
build-n-publish:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
if: startsWith(github.event.ref, 'refs/tags')
steps:
- uses: actions/checkout@v2
Expand All @@ -26,7 +26,7 @@ jobs:
twine upload dist/* -u __token__ -p ${{ secrets.pypi_password }}

build-n-publish_with_ops:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
if: startsWith(github.event.ref, 'refs/tags')
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ wheels/
.installed.cfg
*.egg
MANIFEST
mlu-ops/
mlu-ops.*

# PyInstaller
# Usually these files are written by a python script from a template
Expand Down
Loading
Loading