Use unified interface in Ascend kernel (#2945)

pull/2958/head
sherie 2023-10-08 15:55:39 +08:00 committed by GitHub
parent f2439cd73e
commit ea53ed02d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ int hard_voxelize_forward_npu(const at::Tensor &points, at::Tensor &voxels,
const std::vector<float> coors_range,
const int max_points, const int max_voxels,
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_size_cpu = at::from_blob(