Unverified Commit ea53ed02 authored by sherie's avatar sherie Committed by GitHub
Browse files

Use unified interface in Ascend kernel (#2945)

parent f2439cd7
...@@ -18,7 +18,7 @@ int hard_voxelize_forward_npu(const at::Tensor &points, at::Tensor &voxels, ...@@ -18,7 +18,7 @@ int hard_voxelize_forward_npu(const at::Tensor &points, at::Tensor &voxels,
const std::vector<float> coors_range, const std::vector<float> coors_range,
const int max_points, const int max_voxels, const int max_points, const int max_voxels,
const int NDim = 3) { const int NDim = 3) {
at::Tensor voxel_num_tmp = OpPreparation::ApplyTensor(points, {1}); at::Tensor voxel_num_tmp = at::empty({1}, points.options());
at::Tensor voxel_num = voxel_num_tmp.to(at::kInt); at::Tensor voxel_num = voxel_num_tmp.to(at::kInt);
at::Tensor voxel_size_cpu = at::from_blob( at::Tensor voxel_size_cpu = at::from_blob(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment