Skip to content

Commit f2439cd

Browse files
authored
Fix modulated_deform_conv for torch_npu v2.1 (#2941)
1 parent 8523eee commit f2439cd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mmcv/ops/modulated_deform_conv.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ def _npu_forward(ctx, input_tensor, offset, mask, weight, bias):
5858
kernel_w, kernel_h, ctx.deform_groups)
5959
select_offset = offset.index_select(1, sort_index_fp)
6060
offset_all = torch.cat([select_offset, mask], dim=1)
61-
output, offset_out = torch.npu_deformable_conv2d(
61+
import torch_npu
62+
output, offset_out = torch_npu.npu_deformable_conv2d(
6263
input_tensor,
6364
weight,
6465
offset_all,

0 commit comments

Comments
 (0)