Skip to content

feat(core): add Biren SUPA GPU support (CUDA Compatible GPU) - #66449

Open
hongquW wants to merge 5 commits into
ray-project:masterfrom
hongquW:master
Open

hongquW wants to merge 5 commits into
ray-project:masterfrom
hongquW:master

Conversation

@hongquW

@hongquW hongquW commented Sep 24, 2026

Copy link
Copy Markdown

Description

Add native Ray Core support for Biren SUPA GPUs.

This change:

  • Adds SupaGPUAcceleratorManager.
  • Detects Biren devices through /dev/biren/card_*.
  • Supports SUPA_VISIBLE_DEVICES.
  • Propagates visible device IDs to worker processes.
  • Supports fractional GPU resource requests.
  • Reports the Biren accelerator type through torch.supa.
  • Adds unit tests for device detection, visibility, resource registration, and Ray integration.
  • Adds Biren SUPA usage examples to the accelerator scheduling documentation.

This enables Ray scheduling and device visibility management for Biren SUPA GPUs while reusing Ray's existing GPU resource model.

Related issues

Not related to an existing issue or pull request.

Additional information

This change is not duplicating an existing open issue or pull request. It adds support for the Biren SUPA GPU backend, which is not currently covered by Ray's accelerator managers.

Testing was performed after loading the Biren SUPA runtime environment:

python -m pytest -v -s python/ray/tests/accelerators/test_supa_gpu.py

Test result:

10 passed, 2 warnings in 25.12s

AI assistance was used during development. The author reviewed the changes and test results.

@hongquW
hongquW requested review from a team as code owners September 24, 2026 06:03

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for Biren SUPA GPU accelerators in Ray, including documentation, the SupaGPUAcceleratorManager implementation, and associated unit tests. The review feedback focuses on improving robustness and compliance with the AcceleratorManager interface. Key recommendations include implementing the missing abstract method get_current_node_additional_resources (and adding corresponding tests), changing the logging level from exception to debug during Biren type detection to prevent log pollution on non-Biren nodes, and stripping whitespaces when parsing SUPA_VISIBLE_DEVICES to make the environment variable parsing more resilient.

@ray-gardener ray-gardener Bot added docs An issue or change related to documentation core Issues that should be addressed in Ray Core community-contribution Contributed by the community labels Sep 24, 2026
@hongquW hongquW changed the title feat(core): add Biren SUPA GPU support feat(core): add Biren SUPA GPU support (CUDA Compatible GPU) Sep 24, 2026
@hongquW hongquW changed the title feat(core): add Biren SUPA GPU support (CUDA Compatible GPU) feat(core): add Biren SUPA GPU support (CUDA Compatible GPU) Sep 24, 2026

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@dstrodtman

Copy link
Copy Markdown
Contributor

Hi @hongquW, heads-up: master converted a doc page this PR edits from reStructuredText to MyST Markdown, so that edit needs to move to the .md file when you rebase:

If you'd like help translating your edits to Markdown, DM me (Douglas Strodtman) on the Ray Slack and I'll help. If you'd rather handle it yourself, the repo has a Claude Code skill for this conversion at doc/.claude/skills/rst-to-myst/. Most small edits don't need it, though: any coding agent can translate them without the skill loaded.

@hongquW
hongquW force-pushed the master branch 2 times, most recently from 8a46e0c to b0d32d5 Compare September 28, 2026 03:26

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ 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 b0d32d5. Configure here.

@hongquW
hongquW force-pushed the master branch 5 times, most recently from 452ec50 to 57f25ed Compare September 28, 2026 08:26
@hongquW

hongquW commented Sep 28, 2026 •

Copy link
Copy Markdown
Author

@Yicheng-Lu-llll @andrewsykim @edoakes @dstrodtman

Would appreciate a review of this PR. Biren SUPA is a CUDA-compatible GPU, and this PR reuses Ray's existing GPU resource model — analogous to previously merged accelerator PRs:

The Biren CI is green (all 10 test_supa_gpu.py tests pass). Thanks!

dstrodtman added a commit that referenced this pull request Oct 7, 2026
…es (#66672)

## Why are these changes needed?

Style and grammar pass over the 13 Ray Core pages under
`doc/source/core/fault-tolerance/` and `doc/source/core/scheduling/`,
against `doc/source/ray-contribute/writing-style.md` and its "Writing
Ray Core docs" terms. This is the fourth prose layer of the Ray Core
stack. It's stacked on #66667 (design patterns), which is stacked on
#66666 (tasks, actors, and objects), #66642 (top-level pages), #66640
(Core Vale term library), and #66605 (the `ray-core/` to `core/` move).
A later layer covers `compiled-graph/`, `direct-transport/`,
`internals/`, and the remaining pages.

The edits are voice, person, tense, word choice, and list structure.
First-person plural is now "you" or an imperative. Per the Core terms
table, "Fault Tolerance", "Placement Group", and "Object Store" are now
lowercase, prose uses of `ObjectRef` are now "object ref", and
"retriable" is now "retryable". Inline enumerations and parenthetical
asides are now lists or separate sentences, and the three bold
`**Note:**` labels on `accelerators.md` are now note admonitions. On the
fault tolerance landing page, the MyST conversion had collapsed the two
failure classes into one paragraph ("two classes: 1\. application-level
failures 2. system-level failures Bugs in..."). That's now a two-item
list.

Headings changed only in case, except two on `labels.md`: "Specify label
requirements for a local RayCluster" now says "Ray cluster", because the
section is about a local `ray.init` cluster rather than the KubeRay
custom resource, and "Using labels with autoscaler" is now "Use labels
with the autoscaler". Both keep their old URL fragments through MyST
labels named after the old slugs. No link in `doc/source` targets any
changed slug. No code block, role target, or URL changed beyond the
fixes below.

### Fixes

Each of these is checked against the source tree or the page's own
output:

- `labels.md`: the example ran `ray start --head --labels-files=...`.
The flag is `--labels-file` (`python/ray/scripts/scripts.py`), as the
prose above it already said.
- `labels.md`: the `label_selector` example used `"test-lable-key"`,
which didn't match the `test-label-key` in the sample output.
- `placement-group.md`: the inline span `{"CPU": 1, "GPU: 1"}` had a
misplaced quote. It's now `{"CPU": 1, "GPU": 1}`.
- `accelerators.md`: "never release it" in a code comment is now "never
releases it".

### Lines left for open PRs

Four open PRs edit these pages, so the lines they touch or insert next
to are unchanged here. Each PR's change still applies cleanly on top of
this branch in a 3-way merge:

- #66550 (label selector operators): the operator table in `labels.md`
and the paragraph after it. That table still has curly quotes inside its
code spans, such as `{“key”: “value”}`, which aren't valid Python, and
"Label matches anything by one value" probably means "but". Fixing
either here would conflict with #66550, so they're left for that PR or a
follow-up.
- #66449 and #66368 (Biren and Cambricon accelerators): the
supported-accelerators table rows and the tab-items they insert between.
The "Inside a task or actor" paragraph in `accelerators.md` still has an
"e.g." and a parenthetical for the same reason.
- #65974 (resource dictionary keys): the bundle paragraph and its list
in `placement-group.md`, and the "You can also explicitly specify..."
paragraph in `resources.md`, which still says "via".

### Pre-existing claims, tracked separately

These claims were already on the pages, and this pass kept them as
written. They don't block this PR. #66790 fixes the mechanical ones and
#66791 corrects the ones that the source settles, both stacked on
#66677. The rest need a Core engineering decision and are tracked
separately:

- `scheduling/index.md`: the DEFAULT strategy "first favors nodes that
already have tasks or actors scheduled, for locality". The
locality-aware scheduling section describes locality as task-argument
locality that takes precedence over DEFAULT. Is "for locality" in the
DEFAULT description the same concept? The page also says "By default,
`k` is 20% of the total number of nodes", but the table above it
describes a `RAY_scheduler_top_k_absolute` floor.
- `placement-group.md`: the PACK example says "both bundles have to be
created on the same node", and the next sentences say PACK is a soft
policy that spreads bundles when they don't fit. Is "have to" right for
PACK?
- `fault-tolerance/gcs.md`: the KubeRay tab is titled "KubeRay
(officially supported)", but the note and the comparison table limit
official support to KubeRay for Ray Serve fault tolerance. Should the
title name that scope?
- `scheduling/memory-management.md`: the prose names a "Reference
Creation Site" column, but the `ray memory` sample output labels that
column "Call Site". The page also says each entry shows "the size of the
object in bytes", while the sample shows MiB.
- `scheduling/ray-oom-prevention.md`: the active-worker policy
prioritizes retryable "tasks", defined as `max_retries` or
`max_restarts` greater than 0. `max_restarts` applies to actors. Should
"tasks" be "workers"? Separately, "how to address memory issues" links
to the `addressing-memory-issues` label, which sits on a section of help
links only.
- `scheduling/resources.md`: the lead-in says Ray configures "logical
resources" with the rules that follow, but the last rule says object
store memory isn't a logical resource.
- `scheduling/labels.md`: the opening says labels control scheduling
"for KubeRay", but the page also covers `ray start` and local
`ray.init`. Are labels KubeRay-specific?

## Related issue number

None. Not a duplicate. #66550, #66449, #66368, and #65974 edit these
pages; see above.

## Checks

- `vale` on the 13 pages from the repo root: 687 alerts before the pass,
111 after. The remaining alerts are intentional passives where the page
names no actor, accelerator vendor acronyms in tab titles, "currently"
where it marks a temporary limitation or alpha feature, the "What is"
and "How do I" question headings on `ray-oom-prevention.md`, "cannot"
and "It is" inside warning admonitions, and alerts on the protected
lines above. The second commit adds `retryability` and `reconstructable`
to the `Core` accept list. Across `doc/source` that removes 3 alerts and
adds none.
- `codespell` on the 13 pages: clean. Curly quotes outside the protected
table are now ASCII.
- Per-file invariant check against the pre-edit files: fenced-code
count, role-target multiset, and URLs unchanged. The only anchor change
is the two legacy-slug labels on `labels.md`. Line-count changes come
from the new lists, the three note admonitions, and the definition-list
restructures in `memory-management.md` and `resources.md`.
- `doc/.claude/skills/ray-soft-wrap/scripts/softwrap.py --check`: clean.
Two `{ref}` roles in `fault-tolerance/` were hard-wrapped and are now
joined.
- 3-way merge of each open PR's change onto this branch: clean for all
four.
- Meaning review
([review](#66672 (review))):
of 365 changed blocks, 55 were cosmetic, and 306 of the other 310
preserved their meaning against the Ray source tree. The third commit
(8b782c4) restores the four that shifted a claim.
- Full `-W` doc build: relying on the Read the Docs preview.

AI assistance (Claude Code) was used to draft these edits.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Add a Biren SUPA accelerator manager (detects cards via /dev/biren/card_N,
reports GPU resource, respects SUPA_VISIBLE_DEVICES) plus tests and docs.

Rename supa_gpu -> biren_gpu and SupaGPUAcceleratorManager ->
BirenGPUAcceleratorManager. The SUPA_VISIBLE_DEVICES env var and torch.supa
detection semantics are unchanged since they are runtime contract.

Co-Authored-By: Claude Code <[email protected]>
Signed-off-by: wanghongqu <[email protected]>
Move BirenGPUAcceleratorManager import after apple_gpu and
test_biren_gpu.py after test_amd_gpu.py to satisfy isort/buildifier
ordering.

Co-Authored-By: Claude Code <[email protected]>
Signed-off-by: wanghongqu <[email protected]>
@hongquW

hongquW commented Oct 9, 2026

Copy link
Copy Markdown
Author

@Yicheng-Lu-llll Could you please review this PR? It adds support for Biren SUPA GPUs (CUDA-compatible GPUs) as a new accelerator in Ray Core. Thanks!

@hongquW

hongquW commented Oct 19, 2026

Copy link
Copy Markdown
Author

Hi @Yicheng-Lu-llll @dstrodtman @jjyao @ryanaoleary — gentle ping for review.

Biren SUPA accelerator support for Ray Core, reusing the existing GPU resource model (same shape as merged #61898 Mobilint / #58338 Metax). 5 files, +297/−0. test_biren_gpu.py passes 10/10 on Biren hardware; docs already rebased onto the post-#66430 MyST accelerators.md.

Needed to merge: a code owner approval from ray-core/ray-docs (only bots have reviewed so far), and buildkite/premerge to report — it's stuck at "Waiting for status to be reported" while microcheck/release show "passed and blocked". Any guidance on the CI side would help too.

Thanks!

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had
any activity for 14 days. It will be closed in another 14 days if no further activity occurs.
Thank you for your contributions.

You can always ask for help on our discussion forum or Ray's public slack channel.

If you'd like to keep this open, just leave any comment, and the stale label will be removed.

@github-actions github-actions Bot added the stale The issue is stale. It will be closed within 7 days unless there are further conversation label Nov 2, 2026
@github-actions github-actions Bot added unstale A PR that has been marked unstale. It will not get marked stale again if this label is on it. and removed stale The issue is stale. It will be closed within 7 days unless there are further conversation labels Nov 4, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Contributed by the community core Issues that should be addressed in Ray Core docs An issue or change related to documentation unstale A PR that has been marked unstale. It will not get marked stale again if this label is on it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants