Skip to content

Commit 44eab26

Browse files
[NPU] npu msda supports aclnn (#3149)
1 parent 8f23a0b commit 44eab26

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

mmcv/ops/csrc/pytorch/npu/ms_deform_attn_npu.cpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,9 @@ Tensor ms_deform_attn_forward_npu(const Tensor &value,
5757
value.size(0), sampling_locations.size(1), value.size(2) * value.size(3)};
5858
at::Tensor output = at::zeros(output_size, value_fp32.options());
5959

60-
OpCommand cmd;
61-
cmd.Name("MultiScaleDeformableAttnFunction")
62-
.Input(value_fp32)
63-
.Input(value_spatial_shapes_int32)
64-
.Input(value_level_start_index_int32)
65-
.Input(sampling_locations_fp32)
66-
.Input(attention_weights_fp32)
67-
.Output(output)
68-
.Run();
60+
EXEC_NPU_CMD(aclnnMultiScaleDeformableAttnFunction, value_fp32,
61+
value_spatial_shapes_int32, value_level_start_index_int32,
62+
sampling_locations_fp32, attention_weights_fp32, output)
6963

7064
at::Tensor real_output = output;
7165
if (value.scalar_type() != at::kFloat) {

0 commit comments

Comments
 (0)