diff --git a/torch_npu/csrc/aten/common/ChangeDataPtr.cpp b/torch_npu/csrc/aten/common/ChangeDataPtr.cpp index ea7fd1ac0db850f9d05f559f1754374aa4e861fa..5db2e19e94c6bc303d16a46e98ed5534210511a0 100644 --- a/torch_npu/csrc/aten/common/ChangeDataPtr.cpp +++ b/torch_npu/csrc/aten/common/ChangeDataPtr.cpp @@ -18,12 +18,6 @@ int64_t NPUNativeFunctions::npu_change_data_ptr(const at::Tensor& dst, const at: "Expect src and dst tensors having the same dtype, got: ", "src with dtype ", src_scalar_type, ", dst with dtype ", dst_scalar_type, PTA_ERROR(ErrCode::TYPE)); - TORCH_CHECK( - (src_scalar_type == at::ScalarType::Half) || - (src_scalar_type == at::ScalarType::Float) || - (src_scalar_type == at::ScalarType::BFloat16), - "Only supports src and dst tensors with dtype float32, float16 or bfloat16, got: ", src_scalar_type, - PTA_ERROR(ErrCode::NOT_SUPPORT)); auto dst_sizes = torch_npu::NPUBridge::GetNpuStorageImpl(dst)->npu_desc_.storage_sizes_; auto src_sizes = torch_npu::NPUBridge::GetNpuStorageImpl(src)->npu_desc_.storage_sizes_;