-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
1 changed file
with
19 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include "pytorch_npu_helper.hpp" | ||
|
||
using namespace NPU_NAME_SPACE; | ||
using namespace std; | ||
|
||
void points_in_boxes_all_forward_impl_npu(int batch_size, int boxes_num, | ||
int pts_num, const Tensor boxes, | ||
const Tensor pts, | ||
Tensor box_idx_of_points) { | ||
c10::SmallVector<int64_t, 8> output_size = {pts.size(0), pts.size(1), boxes.size(1)}; | ||
auto boxes_trans = boxes.transpose(1, 2).contiguous(); | ||
EXEC_NPU_CMD(aclnnPointsInBoxAll, boxes_trans, pts, box_idx_of_points); | ||
} | ||
void points_in_boxes_all_forward_impl(int batch_size, int boxes_num, | ||
int pts_num, const Tensor boxes, | ||
const Tensor pts, | ||
Tensor box_idx_of_points); | ||
REGISTER_NPU_IMPL(points_in_boxes_all_forward_impl, | ||
points_in_boxes_all_forward_impl_npu); |