From 55fced3858338e84f22c1af50dfd98bbc33b023c Mon Sep 17 00:00:00 2001 From: l00800044 Date: Thu, 28 Mar 2024 11:03:06 +0800 Subject: [PATCH] fix --- torch_npu/csrc/aten/common/ChangeDataPtr.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/torch_npu/csrc/aten/common/ChangeDataPtr.cpp b/torch_npu/csrc/aten/common/ChangeDataPtr.cpp index ea7fd1ac0db..5db2e19e94c 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_; -- Gitee