diff --git a/torch_npu/csrc/utils/TensorType.cpp b/torch_npu/csrc/utils/TensorType.cpp index a65bc681f5a435e4b1b48e8a79a6b10b81ee6405..2fa18eb9b6fb75a6180f590913e18061b35f7504 100644 --- a/torch_npu/csrc/utils/TensorType.cpp +++ b/torch_npu/csrc/utils/TensorType.cpp @@ -55,8 +55,8 @@ static_assert(std::is_standard_layout::value, "PyTensorType must b static void py_bind_tensor_types(const std::vector& tensor_types); -static TypeError unavailable_type(const PyTensorType& type) { - return TypeError( +static torch::TypeError unavailable_type(const PyTensorType& type) { + return torch::TypeError( "type %s not available. Torch not compiled with npu enabled. %s", type.name, PTA_ERROR(ErrCode::TYPE).c_str()); }