Repository navigation
Conversation
|
@sglang Merge Oncall could you please add the |
|
/tag-and-rerun-ci |
Add first-class detection and a platform scaffold for Biren SUPA (BR-series) accelerators. SUPA is exposed to PyTorch as the `supa` PrivateUse1 backend once the vendor `torch_br` plugin is imported. - utils/common.py: add is_supa() and wire it into get_device, get_device_count, get_device_name, get_device_core_count and get_device_capability - platforms/supa.py: SupaDeviceMixin + SupaSRTPlatform (SCCL distributed backend, device and memory queries), registered as an in-tree SRT platform fallback - platforms/__init__.py: detect SUPA when no platform plugin activates - check_env.py: add SUPAEnv reporting devices, brcc and brsmi versions - tests: add SUPA platform unit tests and cover the new fallback Signed-off-by: Max <129373179+Dashener2@users.noreply.github.com>
177eca8 to
ecfe09c
Compare
|
@merrymercy could you add the |
|
Hi @merrymercy, would you mind taking a look at this PR when you have a moment? This is the first step towards in-tree Biren SUPA (BR-series) support. Currently SUPA accelerators are only usable through an out-of-tree monkey-patch package; this PR teaches SGLang how to detect the It's detection + platform scaffold only — no model computation, kernels, or forward code are touched. The 12 new unit tests are mock-based and run on CPU CI. Verified locally on 8x Biren166M (SUPA 1.12, torch 2.9 + torch_br). Happy to address any feedback. Thanks! |
Add first-class detection and a platform scaffold for Biren SUPA (BR-series)
accelerators. SUPA is exposed to PyTorch as the
supaPrivateUse1 backendonce the vendor
torch_brplugin is imported.utils/common.py: addis_supa()and wire it intoget_device,get_device_count,get_device_name,get_device_core_count,get_device_capabilityplatforms/supa.py:SupaDeviceMixin+SupaSRTPlatform(SCCLdistributed backend, device and memory queries), registered as an in-tree
SRT platform fallback
platforms/__init__.py: detect SUPA when no platform plugin activatescheck_env.py: addSUPAEnvreporting devices, brcc and brsmi versionstests: add SUPA platform unit tests and cover the new fallbackMotivation
Biren SUPA (BR-series) accelerators are currently usable only through an
out-of-tree monkey-patch package. This PR is the first step towards in-tree
support: it teaches SGLang how to detect the
supaPrivateUse1 backend andregisters a minimal
SupaSRTPlatform, so device selection, memory queries andenvironment diagnostics work without vendor patches. It provides the
foundation for follow-up PRs (attention backend, KV pool, graph runner,
communicator, CI).
Modifications
python/sglang/srt/utils/common.pyis_supa()detection (importstorch_bron demand; returnsFalsewhen absent).get_device,get_device_count,get_device_name,get_device_core_countandget_device_capability, and add SUPA to the"no accelerator" error message.
python/sglang/srt/platforms/supa.py(new)SupaDeviceMixin: device identity (supa), memory/device queries viatorch.supa,sccldistributed backend, capability from deviceproperties.
SupaSRTPlatform: in-tree platform scaffold with conservative capabilitydefaults.
python/sglang/srt/platforms/__init__.py_is_supa_available()and SUPA as an auto-discovery fallback.python/sglang/check_env.pySUPAEnv: device list/capabilities,SUPA_PATH/FULLSTACK_HOME,brccversion,brsmi --versiondriver info andbrsmi topo -mtopology.
test/registered/unit/platforms/test_supa_platform.py(12 cases,mock-based so it runs on CPU CI).
SUPA branch.
Accuracy Tests
N/A — this PR only adds device detection and a platform scaffold. No model
computation, kernels or forward code are modified.
Speed Tests and Profiling
N/A — no inference path is changed.
Checklist
Verified on 8x Biren166M (BR1xx, SUPA 1.12, torch 2.9 +
torch_br):python -m sglang.check_envreports 8 devices with compute capability 10.4,BRCC/brsmi driver 1.12 and the topology matrix; the 12 new unit tests pass and
ruff format/ruff checkare clean.CI States
Latest PR Test (Base): ❌ Run #36100460183
Latest PR Test (Extra): ❌ Run #36100460117
Latest PR Test (AMD ROCm 10): ❌ Run #36100460167