Repository navigation
[Core] Mobilint Accelerator Support - #61898
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds support for Mobilint (MBLT) accelerators to Ray. The changes include documentation updates, integration into the accelerator management framework, and the core implementation of the MBLTAcceleratorManager. The overall approach is sound and follows the patterns of other accelerator integrations in Ray. However, I've found a critical issue in the accelerator manager implementation that would cause device detection to fail silently, and the accompanying tests are broken due to an incorrect mock setup. Please address these points to ensure the feature is robust and well-tested.
6399f15 to
e3bef2c
Compare
516f2e4 to
55ddd59
Compare
c455e62 to
7214cdb
Compare
d5c5434 to
68aa19e
Compare
…rtError Signed-off-by: Minsu Kang <[email protected]>
Signed-off-by: Minsu Kang <[email protected]>
Signed-off-by: Minsu Kang <[email protected]>
…antities Signed-off-by: Minsu Kang <[email protected]>
Signed-off-by: Minsu Kang <[email protected]>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4d9e4e3. Configure here.
The upstream Apple Silicon accelerator constants and the Mobilint constants both need to remain in ray.util.accelerators.__all__ after resolving the master merge conflict. Add a focused export regression check so future conflict resolutions catch this API-surface drop. Constraint: PR ray-project#61898 conflict resolution overlapped with upstream Apple accelerator additions. Rejected: Keep only the Mobilint exports | That fixes the PR addition but drops existing public Apple accelerator exports. Confidence: high Scope-risk: narrow Directive: When merging accelerator constant additions, preserve both imported constants and __all__ exports for every accelerator family. Tested: ruff check on changed files; py_compile on changed files; AST check confirmed Apple and Mobilint constants are imported and present in __all__. Not-tested: pytest could not run locally because ray._raylet is not built in this checkout.
The upstream Apple Silicon accelerator constants and the Mobilint constants both need to remain in ray.util.accelerators.__all__ after resolving the master merge conflict. Add a focused export regression check so future conflict resolutions catch this API-surface drop. Constraint: PR ray-project#61898 conflict resolution overlapped with upstream Apple accelerator additions. Rejected: Keep only the Mobilint exports | That fixes the PR addition but drops existing public Apple accelerator exports. Confidence: high Scope-risk: narrow Directive: When merging accelerator constant additions, preserve both imported constants and __all__ exports for every accelerator family. Tested: ruff check on changed files; py_compile on changed files; AST check confirmed Apple and Mobilint constants are imported and present in __all__. Not-tested: pytest could not run locally because ray._raylet is not built in this checkout. Signed-off-by: Minsu Kang <[email protected]>
The latest master merge added MBLT exports in the same section that now contains Apple Silicon accelerator constants. Restore the Apple entries in __all__ and add a small regression check for both Apple and Mobilint public exports. Constraint: Upstream Apple accelerator constants landed on master before this PR was rebased. Tested: python -m ruff check python/ray/util/accelerators/__init__.py python/ray/tests/accelerators/test_accelerators.py Tested: python -m py_compile python/ray/util/accelerators/__init__.py python/ray/util/accelerators/accelerators.py python/ray/tests/accelerators/test_accelerators.py Not-tested: pytest locally, because ray._raylet is not built in this checkout. Signed-off-by: Minsu Kang <[email protected]>
dstrodtman
left a comment
There was a problem hiding this comment.
Docs review: style and conventions only.
Reviewed by Douglas Strodtman (@dstrodtman), Anyscale docs team, against commit 6052917. Claude Code assisted with this review; I read and stand behind every statement in it.
My scope is prose, formatting, and Ray documentation conventions in doc/source/ray-core/scheduling/accelerators.rst. I haven't reviewed the Python or the accelerator-manager behavior, and final approval on anything technical belongs to the Ray Core maintainers. @Yicheng-Lu-llll's approval already covers the code, and @beomsu-mobilint's validation on real Aries hardware covers the runtime behavior.
No changes requested. The documentation change is a clean instantiation of the page's existing per-accelerator template:
- Mobilint MBLT appears in the summary table and in all three tab-sets (starting Ray nodes, using accelerators in tasks and actors, and fractional accelerators), matching the coverage every one of the ten sibling accelerators has. Nothing missing, nothing extra.
- The
.. tip::follows the sibling wording, and the:sync:value is identical across all three tab-items, so the tabs track together as a reader moves down the page. - The identifiers the prose asserts match this PR's implementation: resource name
MBLTand visibility environment variableQBRUNTIME_VISIBLE_DEVICES.
Approving the documentation side. That clears the open ray-docs code-owner request. It isn't a merge gate and it says nothing about the code.
Pre-existing page debt, noted while reading. Not this PR's problem.
All of this predates this PR and none of it should hold it up. Recording it so the docs team can pick it up in a separate PR:
RuntimeContext.get_accelerator_ids()returnsDict[str, List[str]], so the illustrative outputs should read['0']rather than[0]. Every sibling tab except FuriosaAI writes[0], so this PR is correctly following the majority. The page needs one consistent pass rather than a per-PR fix. These blocks carry:options: +MOCK, so the outputs are never compared and nothing is broken either way.- The
**Note:**bold lead-in in the fractional-accelerators section should be a.. note::directive. - Several
e.g.instances that the Ray style guide asks to spell out as "for example." - The
.. note::that follows the first tab-set isn't preceded by a blank line. Bugbot flagged this on this PR as a regression, butmasterhas the same shape, so it isn't one, and this PR doesn't make it worse.
dstrodtman
left a comment
There was a problem hiding this comment.
Docs review: style and conventions only.
Reviewed by Douglas Strodtman (@dstrodtman), Anyscale docs team, against commit 6052917. Claude Code assisted with this review; I read and stand behind every statement in it.
My scope is prose, formatting, and Ray documentation conventions in doc/source/ray-core/scheduling/accelerators.rst. I haven't reviewed the Python or the accelerator-manager behavior, and final approval on anything technical belongs to the Ray Core maintainers. @Yicheng-Lu-llll's approval already covers the code, and @beomsu-mobilint's validation on real Aries hardware covers the runtime behavior.
No changes requested. The documentation change is a clean instantiation of the page's existing per-accelerator template:
- Mobilint MBLT appears in the summary table and in all three tab-sets (starting Ray nodes, using accelerators in tasks and actors, and fractional accelerators), matching the coverage every one of the ten sibling accelerators has. Nothing missing, nothing extra.
- The
.. tip::follows the sibling wording, and the:sync:value is identical across all three tab-items, so the tabs track together as a reader moves down the page. - The identifiers the prose asserts match this PR's implementation: resource name
MBLTand visibility environment variableQBRUNTIME_VISIBLE_DEVICES.
Approving the documentation side. That clears the open ray-docs code-owner request. It isn't a merge gate and it says nothing about the code.
Pre-existing page debt, noted while reading. Not this PR's problem.
All of this predates this PR and none of it should hold it up. Recording it so the docs team can pick it up in a separate PR:
RuntimeContext.get_accelerator_ids()returnsDict[str, List[str]], so the illustrative outputs should read['0']rather than[0]. Every sibling tab except FuriosaAI writes[0], so this PR is correctly following the majority. The page needs one consistent pass rather than a per-PR fix. These blocks carry:options: +MOCK, so the outputs are never compared and nothing is broken either way.- The
**Note:**bold lead-in in the fractional-accelerators section should be a.. note::directive. - Several
e.g.instances that the Ray style guide asks to spell out as "for example." - The
.. note::that follows the first tab-set isn't preceded by a blank line. Bugbot flagged this on this PR as a regression, butmasterhas the same shape, so it isn't one, and this PR doesn't make it worse.
## Description
This PR adds first-class support for Mobilint MBLT NPUs to Ray's
accelerator abstraction by introducing a new `MBLTAcceleratorManager`
under `ray/_private/accelerators/mblt.py`.
This integration is developed and contributed by ETRI (Electronics and
Telecommunications Research Institute) in collaboration with Mobilint.
Based on the SDKs provided by Mobilint, ETRI has implemented this
software integration to align with Ray's official accelerator policies
and architectural standards.
The goal is to make MBLT resources natively schedulable in Ray (e.g.,
`resources={"MBLT": 1}`) and to provide per-worker/actor device
isolation via a conventional "visible devices" environment variable,
consistent with Ray's existing accelerator patterns (GPU, TPU, Neuron,
etc.).
**Key behaviors:**
- Resource name: `MBLT`
- Scheduling unit: Whole cards only (no fractional sharing).
- Visibility isolation: Ray sets `MBLT_DEVICES` (comma-separated IDs)
for worker/actor processes.
- Runtime IDs: Users can access assigned IDs via
`ray.get_runtime_context().get_accelerator_ids()`.
## Motivation
Mobilint MBLT devices are increasingly utilized in heterogeneous
clusters for specialized AI workloads. Currently, users must rely on
custom resources and manual environment variable management to use these
NPUs with Ray. This manual process is error-prone and breaks the
seamless Ray-native experience.
By introducing this PR, ETRI aims to provide a standardized interface
for the MBLT lifecycle within the Ray ecosystem so that:
- Ray's internal scheduler treats MBLT cards as first-class
accelerators.
- Cluster-wide resource management and isolation remains consistent
across different hardware types.
- Research and industrial users at ETRI and beyond can deploy MBLT-based
workloads with minimal configuration.
## Usage example
```python
import ray
# Requesting 1 MBLT NPU card
@ray.remote(resources={"MBLT": 1})
class MBLTWorker:
def get_info(self):
return ray.get_runtime_context().get_accelerator_ids()
w = MBLTWorker.remote()
# Expected output: {"MBLT": ["0"]}
print(ray.get(w.get_info.remote()))
```
## Contributors
- Software Implementation: ETRI (Electronics and Telecommunications
Research Institute)
- Hardware/SDK Support: Mobilint
---------
Signed-off-by: Minsu Kang <[email protected]>
Signed-off-by: 400Ping <[email protected]>
## Description
This PR adds first-class support for Mobilint MBLT NPUs to Ray's
accelerator abstraction by introducing a new `MBLTAcceleratorManager`
under `ray/_private/accelerators/mblt.py`.
This integration is developed and contributed by ETRI (Electronics and
Telecommunications Research Institute) in collaboration with Mobilint.
Based on the SDKs provided by Mobilint, ETRI has implemented this
software integration to align with Ray's official accelerator policies
and architectural standards.
The goal is to make MBLT resources natively schedulable in Ray (e.g.,
`resources={"MBLT": 1}`) and to provide per-worker/actor device
isolation via a conventional "visible devices" environment variable,
consistent with Ray's existing accelerator patterns (GPU, TPU, Neuron,
etc.).
**Key behaviors:**
- Resource name: `MBLT`
- Scheduling unit: Whole cards only (no fractional sharing).
- Visibility isolation: Ray sets `MBLT_DEVICES` (comma-separated IDs)
for worker/actor processes.
- Runtime IDs: Users can access assigned IDs via
`ray.get_runtime_context().get_accelerator_ids()`.
## Motivation
Mobilint MBLT devices are increasingly utilized in heterogeneous
clusters for specialized AI workloads. Currently, users must rely on
custom resources and manual environment variable management to use these
NPUs with Ray. This manual process is error-prone and breaks the
seamless Ray-native experience.
By introducing this PR, ETRI aims to provide a standardized interface
for the MBLT lifecycle within the Ray ecosystem so that:
- Ray's internal scheduler treats MBLT cards as first-class
accelerators.
- Cluster-wide resource management and isolation remains consistent
across different hardware types.
- Research and industrial users at ETRI and beyond can deploy MBLT-based
workloads with minimal configuration.
## Usage example
```python
import ray
# Requesting 1 MBLT NPU card
@ray.remote(resources={"MBLT": 1})
class MBLTWorker:
def get_info(self):
return ray.get_runtime_context().get_accelerator_ids()
w = MBLTWorker.remote()
# Expected output: {"MBLT": ["0"]}
print(ray.get(w.get_info.remote()))
```
## Contributors
- Software Implementation: ETRI (Electronics and Telecommunications
Research Institute)
- Hardware/SDK Support: Mobilint
---------
Signed-off-by: Minsu Kang <[email protected]>

Description
This PR adds first-class support for Mobilint MBLT NPUs to Ray's accelerator abstraction by introducing a new
MBLTAcceleratorManagerunderray/_private/accelerators/mblt.py.This integration is developed and contributed by ETRI (Electronics and Telecommunications Research Institute) in collaboration with Mobilint. Based on the SDKs provided by Mobilint, ETRI has implemented this software integration to align with Ray's official accelerator policies and architectural standards.
The goal is to make MBLT resources natively schedulable in Ray (e.g.,
resources={"MBLT": 1}) and to provide per-worker/actor device isolation via a conventional "visible devices" environment variable, consistent with Ray's existing accelerator patterns (GPU, TPU, Neuron, etc.).Key behaviors:
MBLTMBLT_DEVICES(comma-separated IDs) for worker/actor processes.ray.get_runtime_context().get_accelerator_ids().Motivation
Mobilint MBLT devices are increasingly utilized in heterogeneous clusters for specialized AI workloads. Currently, users must rely on custom resources and manual environment variable management to use these NPUs with Ray. This manual process is error-prone and breaks the seamless Ray-native experience.
By introducing this PR, ETRI aims to provide a standardized interface for the MBLT lifecycle within the Ray ecosystem so that:
Usage example
Contributors