Skip to content

Commit

Permalink
Fix modulated_deform_conv for torch_npu v2.1 (#2941)
Browse files Browse the repository at this point in the history
  • Loading branch information
6Vvv authored Sep 26, 2023
1 parent 8523eee commit f2439cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mmcv/ops/modulated_deform_conv.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ def _npu_forward(ctx, input_tensor, offset, mask, weight, bias):
kernel_w, kernel_h, ctx.deform_groups)
select_offset = offset.index_select(1, sort_index_fp)
offset_all = torch.cat([select_offset, mask], dim=1)
output, offset_out = torch.npu_deformable_conv2d(
import torch_npu
output, offset_out = torch_npu.npu_deformable_conv2d(
input_tensor,
weight,
offset_all,
Expand Down

0 comments on commit f2439cd

Please sign in to comment.