-
Notifications
You must be signed in to change notification settings - Fork 631
[Maca] fix ray and memory sync #4164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -561,13 +561,15 @@ def _init_workers_ray(self, placement_group: PlacementGroup, worker_kwargs: dict | |
| def _init_distributed_environment_by_device(self, device_str: str): | ||
| """Init distributed environment.""" | ||
| driver_ip = _get_master_addr() | ||
| if device_str in ['cuda', 'maca']: | ||
| if device_str == 'cuda': | ||
| self.workers = self._sort_workers(driver_ip, self.workers) | ||
|
|
||
| elif device_str == 'ascend': | ||
| self._init_ascend_distributed_environment(driver_ip) | ||
| elif device_str == 'camb': | ||
| self._init_camb_distributed_environment(driver_ip) | ||
| elif device_str == 'maca': | ||
| self._init_maca_distributed_environment(driver_ip) | ||
| else: | ||
| raise ValueError(f'Unsupported device type: {device_str}') | ||
|
|
||
|
|
@@ -594,6 +596,11 @@ def _init_camb_distributed_environment(self, driver_ip): | |
| self.workers = self._sort_workers(driver_ip, self.workers) | ||
| ray.get([worker.set_device.remote(idx) for idx, worker in enumerate(self.workers)]) | ||
|
|
||
| def _init_maca_distributed_environment(self, driver_ip): | ||
| """Init maca distributed environment.""" | ||
| self.workers = self._sort_workers(driver_ip, self.workers) | ||
| ray.get([worker.set_device.remote(idx) for idx, worker in enumerate(self.workers)]) | ||
|
||
|
|
||
| """ PD Disaggregation API Begin """ | ||
|
|
||
| def p2p_initialize(self, init_request: DistServeInitRequest): | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.