Skip to content

Move test_klxpu_accelerator.py to tests/unit/v1/accelerator/ - #8867

Merged
delock merged 4 commits into
deepspeedai:masterfrom
GuCarpenter:move-klxpu-test
Nov 12, 2026
Merged

delock merged 4 commits into
deepspeedai:masterfrom
GuCarpenter:move-klxpu-test

Conversation

@GuCarpenter

Copy link
Copy Markdown
Contributor

No description provided.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T09:33:51.064411Z bfa5526 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@sfc-gh-truwase
sfc-gh-truwase added this pull request to the merge queue Oct 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 20, 2026
@sfc-gh-truwase
sfc-gh-truwase added this pull request to the merge queue Oct 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 20, 2026
@PKUWZP
PKUWZP self-requested a review October 31, 2026 16:09
@hwchen2017
hwchen2017 added this pull request to the merge queue Oct 31, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 31, 2026
@pengdurice
pengdurice added this pull request to the merge queue Nov 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 7, 2026
@sfc-gh-truwase
sfc-gh-truwase added this pull request to the merge queue Nov 10, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 10, 2026
@delock
delock added this pull request to the merge queue Nov 10, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 10, 2026
These tests exercise pure-Python accelerator logic (identity/device
strings, runtime-override flags, env-driven timer selection, op-builder
resolution) and a pure-PyTorch FusedAdam fallback checked against
torch.optim.AdamW. None need the KUNLUNXIN XPU runtime, so gating the
whole module on torch_xmlir only caused it to skip in CPU CI where it
would otherwise run. Also drop the now-unused pytest import.

Signed-off-by: guhangsong <[email protected]>
banxingmjj pushed a commit to openanolis/DeepSpeed that referenced this pull request Nov 11, 2026
…pspeedai#9053)

The modal-torch-latest GPU controller (ci/torch_latest.py) runs pytest
remotely in a Modal sandbox / AWS instance and treats any nonzero pytest
exit as a candidate failure. A diff-selected (subset) run whose only
targets skip on the runner collects nothing, so pytest exits 5 ("no
tests collected") and the job fails red even though the run is a
legitimate green no-op.

Observed on run 42921207259 (merge_group for deepspeedai#8867): the selector picked
only tests/unit/v1/accelerator/test_klxpu_accelerator.py, which is
module-level skipped on NVIDIA runners, so pytest reported "4 workers [0
items]" / "1 skipped" and the controller raised RemoteCommandError: run
pytest failed with exit code 5.

This mirrors the merged sibling fix for cpu-torch-latest-v1-multirank
(deepspeedai#9032), which maps pytest exit 5 to a green skip for subset selections.
That fix only touched the CPU workflow's shell step; the GPU controller
delegates all run/classify logic to ci/torch_latest.py, so the
equivalent guard belongs there and must cover both the Modal and AWS
backends.

- Add EXIT_NO_TESTS = 5 and a shared EMPTY_SELECTION_MESSAGE.
- run_controller (Modal): a "run pytest" failure with code 5 in subset
mode returns 0 with the message instead of raising.
- run_aws_controller (AWS): same guard on test_code.
- Gate on selection_mode == "subset"; mode=all runs the whole
tests/unit/v1 scope, where an empty collection means the selector or a
collection guard broke and must still fail. Other exit codes (1, 124)
are unchanged.
- Add controller/AWS tests for the subset no-op and the mode=all guard.

AI assistance was used to analyze the failing run and draft this patch.

Signed-off-by: guhangsong <[email protected]>
Co-authored-by: Ma, Guokai <[email protected]>
@delock
delock added this pull request to the merge queue Nov 12, 2026
Merged via the queue into deepspeedai:master with commit c289ad6 Nov 12, 2026
19 checks passed
@auto-pr-labeler-with-jev auto-pr-labeler-with-jev Bot added the skip-gpu-test Requires positive evidence that every changed behavior can be validated without a GPU. label Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-gpu-test Requires positive evidence that every changed behavior can be validated without a GPU. will-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants