MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / _init_context

Function _init_context

python/paddle/hapi/model.py:281–292  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

279 if not _parallel_context_initialized and isinstance(place, base.CUDAPlace):
280
281 def _init_context():
282 communicator_prog = base.Program()
283 init_communicator(
284 communicator_prog,
285 strategy.local_rank,
286 strategy.nranks,
287 True,
288 strategy.current_endpoint,
289 strategy.trainer_endpoints,
290 )
291 exe = base.Executor(place)
292 exe.run(communicator_prog)
293
294 if in_dynamic_mode():
295 base.disable_dygraph()

Callers 1

Calls 4

runMethod · 0.95
init_communicatorFunction · 0.70
ProgramMethod · 0.45
ExecutorMethod · 0.45

Tested by

no test coverage detected