MCPcopy
hub / github.com/PaddlePaddle/PaddleNLP / create_hcg

Function create_hcg

llm/gpt-3/utils.py:120–128  ·  view source on GitHub ↗
(strategy, hcg_name="HybridCommunicateGroup")

Source from the content-addressed store, hash-verified

118
119
120def create_hcg(strategy, hcg_name="HybridCommunicateGroup"):
121 if hcg_name == "HybridCommunicateGroup":
122 fleet.init(is_collective=True, strategy=strategy)
123 hcg = fleet.get_hybrid_communicate_group()
124 else:
125 dist.init_parallel_env()
126 hcg = eval("{}".format(hcg_name))(strategy)
127
128 return hcg
129
130
131def init_dist_env(

Callers 1

init_dist_envFunction · 0.70

Calls 2

evalFunction · 0.50
initMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…