Skip to content

Commit

Permalink
[Feature] Add carafe op for MLU (#2212)
Browse files Browse the repository at this point in the history
* [Feature] Support CARAFE with Cambricon MLU backend

* [Docs] Add comments for common funtions

* [Test] Add allclose test for carafe

* Remove print

Co-authored-by: zcyKTH <zcy19950525@gmail.com>
Co-authored-by: budefei <budefei@cambricon.com>
  • Loading branch information
3 people authored Aug 19, 2022
1 parent 90e19c1 commit 832b845
Show file tree
Hide file tree
Showing 14 changed files with 1,313 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/en/understand_mmcv/ops.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ We implement common ops used in detection, segmentation, etc.
| BBoxOverlaps | ||||
| BorderAlign | || | |
| BoxIouRotated ||| | |
| CARAFE | || | |
| CARAFE | || | |
| ChamferDistance | || | |
| CrissCrossAttention | || | |
| ContourExpand || | | |
Expand Down
2 changes: 1 addition & 1 deletion docs/zh_cn/understand_mmcv/ops.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ MMCV 提供了检测、分割等任务中常用的算子
| BBoxOverlaps | ||||
| BorderAlign | || | |
| BoxIouRotated ||| | |
| CARAFE | || | |
| CARAFE | || | |
| ChamferDistance | || | |
| CrissCrossAttention | || | |
| ContourExpand || | | |
Expand Down
2 changes: 0 additions & 2 deletions mmcv/ops/carafe.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,6 @@ def forward(ctx, features: Tensor, masks: Tensor, kernel_size: int,
def backward(
ctx,
grad_output: Tensor) -> Tuple[Tensor, Tensor, None, None, None]:
assert grad_output.is_cuda

features, masks, rfeatures = ctx.saved_tensors
kernel_size = ctx.kernel_size
group_size = ctx.group_size
Expand Down
Loading

0 comments on commit 832b845

Please sign in to comment.