(self, config: dict = {})
| 494 | |
| 495 | class GPUsTesting(unittest.TestCase): |
| 496 | def init_dist_env(self, config: dict = {}): |
| 497 | world_size = paddle.distributed.get_world_size() |
| 498 | strategy = fleet.DistributedStrategy() |
| 499 | hybrid_configs = { |
| 500 | "dp_degree": 1, |
| 501 | "mp_degree": world_size, |
| 502 | "pp_degree": 1, |
| 503 | "sharding_degree": 1, |
| 504 | } |
| 505 | hybrid_configs.update(config) |
| 506 | strategy.hybrid_configs = hybrid_configs |
| 507 | |
| 508 | fleet.init(is_collective=True, strategy=strategy) |
| 509 | fleet.get_hybrid_communicate_group() |
| 510 | |
| 511 | |
| 512 | def set_proxy(download_hub: DownloadSource = None): |
nothing calls this directly
no test coverage detected