forked from open-mmlab/mmcv
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
41 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#include "pytorch_npu_helper.hpp" | ||
|
||
using namespace NPU_NAME_SPACE; | ||
using namespace std; | ||
|
||
void stack_ball_query_forward_npu(float max_radius, int nsample, | ||
const Tensor new_xyz, | ||
const Tensor new_xyz_batch_cnt, | ||
const Tensor xyz, const Tensor xyz_batch_cnt, | ||
Tensor idx) { | ||
at::Tensor xyz_transpose = xyz.transpose(0, 1).contiguous(); | ||
double max_radius_double = double(max_radius); | ||
EXEC_NPU_CMD(aclnnStackBallQuery, xyz_transpose, new_xyz, xyz_batch_cnt, | ||
new_xyz_batch_cnt, max_radius_double, nsample, idx); | ||
} | ||
|
||
void stack_ball_query_forward_impl(float max_radius, int nsample, | ||
const Tensor new_xyz, | ||
const Tensor new_xyz_batch_cnt, | ||
const Tensor xyz, const Tensor xyz_batch_cnt, | ||
Tensor idx); | ||
|
||
REGISTER_NPU_IMPL(stack_ball_query_forward_impl, stack_ball_query_forward_npu); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters