From f0a35dcd5b7b971c4c0d3c3c7a2c2b22b250a238 Mon Sep 17 00:00:00 2001 From: CokeDong <408244909@qq.com> Date: Mon, 9 Jan 2023 19:41:48 +0800 Subject: [PATCH] Update parrots image (#2522) * Update image * Bugfix for parrots ext ops * Move parrots ci task to build_pat.yml * Fix on:push * Remove commets and fix * Fix beautiful job name --- .github/workflows/build_pat.yml | 22 ++++++++++++------- .../ops/csrc/parrots/border_align_parrots.cpp | 2 ++ .../parrots/rotated_feature_align_parrots.cpp | 4 ++-- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build_pat.yml b/.github/workflows/build_pat.yml index 9b02c3f41a..33daded7ec 100644 --- a/.github/workflows/build_pat.yml +++ b/.github/workflows/build_pat.yml @@ -1,6 +1,13 @@ name: build_pat -on: push +on: + push: + paths-ignore: + - 'README.md' + - 'README_zh-CN.md' + - 'docs/**' + - 'examples/**' + - '.dev_scripts/**' concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -13,14 +20,13 @@ jobs: build_parrots: runs-on: ubuntu-18.04 container: - image: ghcr.io/zhouzaida/parrots-mmcv:1.3.4 + image: ghcr.io/cokedong/parrots:pat0.21.0a0_cuda11 credentials: - username: zhouzaida - password: ${{ secrets.CR_PAT }} - + username: cokedong + password: ${{ secrets.PARROTS_CI_TOKEN }} steps: - uses: actions/checkout@v2 - - name: Install unittest dependencies - run: pip install -r requirements/test.txt - name: Build and install - run: rm -rf .eggs && MMCV_WITH_OPS=1 pip install -e . + run: | + source /usr/local/env/pat_latest + MMCV_WITH_OPS=1 pip install -e . -v diff --git a/mmcv/ops/csrc/parrots/border_align_parrots.cpp b/mmcv/ops/csrc/parrots/border_align_parrots.cpp index 9a075a1096..8c3bea58cc 100644 --- a/mmcv/ops/csrc/parrots/border_align_parrots.cpp +++ b/mmcv/ops/csrc/parrots/border_align_parrots.cpp @@ -7,6 +7,7 @@ using namespace parrots; +#ifdef MMCV_WITH_CUDA void border_align_forward_cuda_parrots(CudaContext& ctx, const SSElement& attr, const OperatorBase::in_list_t& ins, OperatorBase::out_list_t& outs) { @@ -49,3 +50,4 @@ PARROTS_EXTENSION_REGISTER(border_align_backward) .output(1) .apply(border_align_backward_cuda_parrots) .done(); +#endif diff --git a/mmcv/ops/csrc/parrots/rotated_feature_align_parrots.cpp b/mmcv/ops/csrc/parrots/rotated_feature_align_parrots.cpp index ad11a9d2fe..d4efaf1d3a 100644 --- a/mmcv/ops/csrc/parrots/rotated_feature_align_parrots.cpp +++ b/mmcv/ops/csrc/parrots/rotated_feature_align_parrots.cpp @@ -40,6 +40,7 @@ void rotated_feature_align_backward_cuda_parrots( rotated_feature_align_backward(grad_output, best_bboxes, grad_input, spatial_scale, points); } +#endif void rotated_feature_align_forward_cpu_parrots( HostContext& ctx, const SSElement& attr, const OperatorBase::in_list_t& ins, @@ -57,7 +58,6 @@ void rotated_feature_align_forward_cpu_parrots( rotated_feature_align_forward(features, best_bboxes, output, spatial_scale, points); } -#endif void rotated_feature_align_backward_cpu_parrots( HostContext& ctx, const SSElement& attr, const OperatorBase::in_list_t& ins, @@ -92,7 +92,7 @@ PARROTS_EXTENSION_REGISTER(rotated_feature_align_backward) .attr("points") .input(2) .output(1) - .apply(rotated_feature_align_forward_cpu_parrots) + .apply(rotated_feature_align_backward_cpu_parrots) #ifdef MMCV_WITH_CUDA .apply(rotated_feature_align_backward_cuda_parrots) #endif