From f91658780f8cadb7f29f9d3bf135f99ce9f87699 Mon Sep 17 00:00:00 2001 From: houj04 <35131887+houj04@users.noreply.github.com> Date: Mon, 8 Aug 2022 10:24:47 +0800 Subject: [PATCH] [XPU] fleet collective support bkcl. (#44929) --- python/paddle/distributed/collective.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/paddle/distributed/collective.py b/python/paddle/distributed/collective.py index 620f23b9e19..bf36015f894 100644 --- a/python/paddle/distributed/collective.py +++ b/python/paddle/distributed/collective.py @@ -476,6 +476,10 @@ def new_group(ranks=None, backend=None): place = core.MLUPlace(genv.device_id) core.CNCLParallelContext(strategy, place).init_with_ring_id(ring_id) + elif core.is_compiled_with_xpu(): + place = core.XPUPlace(genv.device_id) + core.BKCLParallelContext(strategy, + place).init_with_ring_id(ring_id) else: assert False, ("no cuda device found") else: -- GitLab