[Triton] `is_triton_supported()` semantics for non-CUDA Triton backends
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Domain
- machine-learning
Research direction
Start with the hardcoded False in accelerator/xpu_accelerator.py and the three call sites listed in the issue: deepspeed/ops/fp_quantizer/fp8_gemm.py, deepspeed/ops/transformer/inference/triton/attention.py, and deepspeed/sequence/cross_entropy.py. The open question is whether the flag means a generic Triton backend or CUDA-tuned kernel safety, so get a maintainer decision before editing. Done means the agreed semantics are implemented and the Liger CE test in tests/unit/v1/sequence_parallelism/test_liger_vocab_parallel_cross_entropy.py passes on XPU.
Written by the indexing model from the issue text.
Description
Background
is_triton_supported() gates every Triton kernel in DeepSpeed, but today it is effectively a
CUDA check: XPU_Accelerator returns False unconditionally (a stub from #4547), and other
accelerators were hard-coded the same way. Triton now has working non-CUDA backends
(pytorch-triton-xpu for Intel GPUs, triton-ascend for NPU), so the question is no longer
"XPU yes/no" but what the flag should mean for any accelerator.
Motivating example (XPU): tensor_parallel.vocab_parallel_ce_backend: "liger" (#8540, #8173)
silently falls back to the PyTorch CE on XPU. With the gate forced on, on 8x Intel Arc Pro B70
(PyTorch 2.14 XPU, Triton 3.8.0, liger-kernel 0.8.4), loss and gradients match the PyTorch
reference and peak memory of LM-head + CE fwd/bwd (vs gather_output=True, hidden 4096, BF16) is:
| TP | backend="torch" (XPU today) |
backend="liger" |
|---|---|---|
| 2 | 0.58x | 0.25x |
| 4 | 0.29x | 0.125x |
| 8 | 0.15x | 0.063x |
Proposal
- Return
Truewhen an XPU device is available and a Triton XPU backend is importable,
instead of a hardcodedFalse. - Audit the other call sites, because the flag currently carries CUDA-specific meaning
(the inference attention comment says "compute capability >= 8.0"):- run the FP8 GEMM and Triton inference attention unit tests on XPU, or
- narrow those call sites to CUDA if their kernels are not device-ready.
Questions for maintainers
- Should
is_triton_supported()mean "a Triton backend exists for this device" (generic), or
continue to mean "DeepSpeed's CUDA-tuned Triton kernels are safe here"? If the latter, a
separate capability flag may be cleaner for portable Triton kernels such as Liger's.
- Dominant language
- Python
- Stars
- 43.3k
- Forks
- 5.1k
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 69
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from deepspeedai/DeepSpeed
-
[BUG] Universal checkpoint resume puts CPU `step` into fused/capturable optimizer statePossibly taken @ArjunPakhan claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
deepspeedai/DeepSpeed#8884 · 1 comment ·
Maintainers usually reply within 3 days
-
init_inference rejects dtype=torch.int8 on every acceleratorMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
deepspeedai/DeepSpeed#8577 ·
Maintainers usually reply within 3 days
-
[BUG] AutoTP checkpoint load raises AttributeError on a model containing nn.InstanceNorm1dPossibly taken @vineethsaivs claimed this 41 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
deepspeedai/DeepSpeed#8514 ·
Maintainers usually reply within 3 days
-
[BUG] Python checkpoint writers fail to reload full ZeRO-3 state with default torch.loadPossibly taken @ai-yang claimed this 42 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
deepspeedai/DeepSpeed#8500 ·
Maintainers usually reply within 3 days
-
[BUG] set_norm_for_param_grad_in_gpu's grad_accum fallback is dead in both accumulation modesPossibly taken @LOGO127 claimed this 51 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
deepspeedai/DeepSpeed#8371 ·
Maintainers usually reply within 3 days
All issues in deepspeedai/DeepSpeed
Similar issues
-
The changelog workflow excludes otelbot but not dependabot, so every Dependabot pull request fails the changelog checkPossibly taken @ocelotl claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 82/100
open-telemetry/opentelemetry-python#5825 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
cuga-project/cuga-agent#1020 ·
Maintainers usually reply within 2 days
-
Difficulty 1/5 Under an hour Newbie friendliness 70/100
microsoft/playwright#43640 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
stac-utils/stac-fastapi-elasticsearch-opensearch#965 ·
Maintainers usually reply within 2 days
-
from-review-extraction library privacy python severity:suggested
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
LearningCircuit/local-deep-research#7951 ·
Maintainers usually reply within 2 days