diff --git a/cmake/external/xpu.cmake b/cmake/external/xpu.cmake index 7eee112036adcba0de5ccfe1d1b966cf14e8b8b5..0030c2e108fd6d76d47815324ecd21474ec62ee7 100644 --- a/cmake/external/xpu.cmake +++ b/cmake/external/xpu.cmake @@ -7,8 +7,8 @@ set(XPU_PROJECT "extern_xpu") set(XPU_API_LIB_NAME "libxpuapi.so") set(XPU_RT_LIB_NAME "libxpurt.so") -set(XPU_BASE_DATE "20230119") -set(XPU_XCCL_BASE_VERSION "1.0.7") +set(XPU_BASE_DATE "20230215") +set(XPU_XCCL_BASE_VERSION "1.0.8") if(NOT DEFINED XPU_BASE_URL) set(XPU_BASE_URL_WITHOUT_DATE diff --git a/paddle/fluid/platform/device/xpu/bkcl_helper.h b/paddle/fluid/platform/device/xpu/bkcl_helper.h index 7bd1b67efd6144df3cb925ec517a123a1d0f7caa..e7c968bd34f1e62f2652bb6686b2aabbebb657f5 100644 --- a/paddle/fluid/platform/device/xpu/bkcl_helper.h +++ b/paddle/fluid/platform/device/xpu/bkcl_helper.h @@ -51,10 +51,12 @@ inline BKCLDataType ToBKCLDataType(framework::proto::VarType::Type type) { return BKCL_FLOAT64; } else if (type == framework::proto::VarType::FP16) { return BKCL_FLOAT16; + } else if (type == framework::proto::VarType::UINT8) { + return BKCL_UINT8; } else { PADDLE_THROW(platform::errors::Unimplemented( - "BKCL currently only support FP32, INT64, INT32, FP64 and FP16, other " - "data types are not supported.")); + "BKCL currently only support FP32, INT64, INT32, FP64, FP16 and UINT8, " + "other data types are not supported.")); } } diff --git a/paddle/fluid/pybind/process_group_utils.h b/paddle/fluid/pybind/process_group_utils.h index 4e5af25f26d92c566ac546ccf2490ee44e385db2..6e71984b043d7f4925a56e0603791fdd2be711c7 100644 --- a/paddle/fluid/pybind/process_group_utils.h +++ b/paddle/fluid/pybind/process_group_utils.h @@ -149,6 +149,9 @@ void ConcatDenseTensorWithType(const phi::XPUContext &dev_ctx, case phi::DataType::INT64: ConcatDenseTensor()(dev_ctx, t_list, p_out); break; + case phi::DataType::UINT8: + ConcatDenseTensor()(dev_ctx, t_list, p_out); + break; default: PADDLE_THROW(platform::errors::Unimplemented( "Data type (%s) is not supported when it concats tensors.", type)); @@ -217,6 +220,9 @@ void SplitDenseTensorWithType(const phi::XPUContext &dev_ctx, case phi::DataType::INT64: SplitDenseTensor()(dev_ctx, t_in, p_list); break; + case phi::DataType::UINT8: + SplitDenseTensor()(dev_ctx, t_in, p_list); + break; default: PADDLE_THROW(platform::errors::Unimplemented( "Data type (%s) is not supported when it splits tensors.", type)); diff --git a/paddle/phi/backends/xpu/enforce_xpu.h b/paddle/phi/backends/xpu/enforce_xpu.h index 71bea73634bf6aa8891312627e00deaf4f296b79..853001b1897456c6fc5e7c3321d3cd446726c5f6 100644 --- a/paddle/phi/backends/xpu/enforce_xpu.h +++ b/paddle/phi/backends/xpu/enforce_xpu.h @@ -95,7 +95,7 @@ inline const char* xpuGetErrorString(int stat) { case XPUERR_INTERRUPTED: return "Execution interrupted by user"; default: - return "unkonwn error"; + return "unknown error"; } } diff --git a/paddle/phi/kernels/xpu/concat_and_split_functor.cc b/paddle/phi/kernels/xpu/concat_and_split_functor.cc index 8cb24859c7811fc7bcd0a27d5964cc6266dd9b42..edff1e90143b63796825364c79c0636d30170786 100644 --- a/paddle/phi/kernels/xpu/concat_and_split_functor.cc +++ b/paddle/phi/kernels/xpu/concat_and_split_functor.cc @@ -129,6 +129,7 @@ DEFINE_XPU_FUNCTOR(float) DEFINE_XPU_FUNCTOR(phi::dtype::float16) DEFINE_XPU_FUNCTOR(int32_t) DEFINE_XPU_FUNCTOR(int64_t) +DEFINE_XPU_FUNCTOR(uint8_t) } // namespace funcs } // namespace phi