()
| 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() |
no test coverage detected