Skip to content

Commit

Permalink
Update parrots image (open-mmlab#2522)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
CokeDong authored and root committed Jan 30, 2023
1 parent 5250fe1 commit f0a35dc
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/build_pat.yml
Original file line number Diff line number Diff line change
@@ -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 }}
Expand All @@ -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
2 changes: 2 additions & 0 deletions mmcv/ops/csrc/parrots/border_align_parrots.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -49,3 +50,4 @@ PARROTS_EXTENSION_REGISTER(border_align_backward)
.output(1)
.apply(border_align_backward_cuda_parrots)
.done();
#endif
4 changes: 2 additions & 2 deletions mmcv/ops/csrc/parrots/rotated_feature_align_parrots.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f0a35dc

Please sign in to comment.