Skip to content

Commit

Permalink
[Enhance] Add a comment for the use of masked_conv on Ascend device (o…
Browse files Browse the repository at this point in the history
…pen-mmlab#2689)

* Update masked_conv.py

* Update mmcv/ops/masked_conv.py

---------

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
  • Loading branch information
2 people authored and CokeDong committed Apr 6, 2023
1 parent 5ee8aad commit 8304b43
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mmcv/ops/masked_conv.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ def forward(ctx,
out_channel, in_channel, kernel_h, kernel_w = weight.size()

if features.device.type == 'npu':
# For the NPU implementation of the masked_conv operator, it is
# not recommended to use the scenario where bias=false.
import torch_npu
output = torch_npu.npu_conv2d(
features,
Expand Down

0 comments on commit 8304b43

Please sign in to comment.