未验证 提交 6a56bce7 编写于 作者: R Roc 提交者: GitHub

support mp on xpu (#49815)

1 update xccl lib
2 when using comm_ctx, the allocator should be set manually.
上级 090aa45d
......@@ -16,7 +16,7 @@ else()
endif()
set(XPU_XCCL_BASE_URL
"https://klx-sdk-release-public.su.bcebos.com/xccl/release/1.0.0")
"https://klx-sdk-release-public.su.bcebos.com/xccl/release/1.0.6")
if(WITH_AARCH64)
set(XPU_XRE_DIR_NAME "xre-kylin_aarch64")
......
......@@ -128,6 +128,11 @@ void ProcessGroupBKCL::CreateBKCLEnvCache(const Place& place,
platform::DeviceContextPool::Instance().Get(place));
// must use XPUDeviceContext here to make sure XPUContext::Init() is called
auto comm_ctx = std::make_unique<XPUDeviceContext>(place);
// set allocator
comm_ctx->SetAllocator(memory::allocation::AllocatorFacade::Instance()
.GetAllocator(place)
.get());
BKCLContext_t bkcl_comm;
BKCLCHECK(bkcl_init_rank(&bkcl_comm, GetRank(), GetSize(), &bkcl_id));
comm_ctx->SetBkclContext(bkcl_comm);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册