diff --git a/mmcv/ops/csrc/pytorch/npu/focal_loss_npu.cpp b/mmcv/ops/csrc/pytorch/npu/focal_loss_npu.cpp index da7b347d303..b7c995a223e 100644 --- a/mmcv/ops/csrc/pytorch/npu/focal_loss_npu.cpp +++ b/mmcv/ops/csrc/pytorch/npu/focal_loss_npu.cpp @@ -14,8 +14,6 @@ void sigmoid_focal_loss_forward_npu(Tensor input, Tensor target, Tensor weight, } else { target_y = at::one_hot(target, n_class); } - // target_y = - // at_npu::native::NPUNativeFunctions::npu_dtype_cast(target_y, at::kInt); target_y = target_y.to(at::kInt); int64_t weight_size = weight.size(0); at::Tensor weight_y = at::ones_like(input); diff --git a/mmcv/ops/csrc/pytorch/npu/voxelization_npu.cpp b/mmcv/ops/csrc/pytorch/npu/voxelization_npu.cpp index 2b22646b9eb..32b1a50cc1e 100644 --- a/mmcv/ops/csrc/pytorch/npu/voxelization_npu.cpp +++ b/mmcv/ops/csrc/pytorch/npu/voxelization_npu.cpp @@ -19,8 +19,7 @@ int hard_voxelize_forward_npu(const at::Tensor &points, at::Tensor &voxels, 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 = at_npu::native::NPUNativeFunctions::npu_dtype_cast( - voxel_num_tmp, at::kInt); + at::Tensor voxel_num = voxel_num_tmp.to(at::kInt); at::Tensor voxel_size_cpu = at::from_blob( const_cast(voxel_size.data()), {3}, dtype(at::kFloat));