Skip to content

[Fix] spec: Give the mocked draft decode backend a cache_loc_dtype in the inkling test - #47860

Merged
DarkSharpness merged 2 commits into
sgl-project:mainfrom
DarkSharpness:fix-inkling-draft-backend-dtype
Nov 2, 2026
Merged

DarkSharpness merged 2 commits into
sgl-project:mainfrom
DarkSharpness:fix-inkling-draft-backend-dtype

Conversation

@DarkSharpness

@DarkSharpness DarkSharpness commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

(auto generated by Claude)

#47173 changed EAGLEDraftExtendCudaGraphRunner._cache_loc_dtype() from torch.int64 to self.backend.cache_loc_dtype. test_inkling_checkpoint_indices.py builds that runner with resolve_decode_backend patched to a bare Mock(), so the dtype is now a Mock and the test fails on main with TypeError: ones(): argument 'dtype' must be torch.dtype, not Mock. Since it is a base-b-kernel-unit 1-gpu-large test, jit-kernel-unit-test-1-gpu-large fails for every PR.

The mocked backend now carries cache_loc_dtype=torch.int64, the value the runner used before #47173.

Validation: /rerun-test of the file on CI.

🤖 Generated with Claude Code


CI States

Latest PR Test (Base): ⏳ Run #41417735547
Latest PR Test (Extra): ❌ Run #41417735498
Latest PR Test (AMD ROCm 10): ⏳ Run #41417735520

Tip

Base CI only covers the core cases, and its workload may not exercise your change. Use /rerun-test to run the tests your change touches, or copy this prompt for an agent:

Find the registered tests this PR affects and run them with /rerun-test, following https://github.com/sgl-project/sglang/blob/main/.agents/skills/rerun-test/SKILL.md

@claude claude 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.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@DarkSharpness DarkSharpness added the run-ci CI: run the baseline test suite on this PR label Nov 2, 2026
@DarkSharpness

Copy link
Copy Markdown
Collaborator Author

/rerun-test test/registered/kernels/ops/attention/test_inkling_checkpoint_indices.py

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

🚀 1-gpu-h100 (1 test): ✅ View workflow run

cd test/ && python3 registered/kernels/ops/attention/test_inkling_checkpoint_indices.py

@github-actions

This comment has been minimized.

@DarkSharpness

Copy link
Copy Markdown
Collaborator Author

@BBuf for review

Copy link
Copy Markdown
Contributor

Additional CI evidence from #43786 confirming the same fixture failure.

The failure is in TestInklingCheckpointIndices.test_draft_runners_capture_and_replay_checkpoint_destinations with (multilayer=False, static=False, tracking=False):

test_inkling_checkpoint_indices.py:763
    return eagle.EAGLEDraftExtendCudaGraphRunner(worker).buffers
eagle_draft_extend_cuda_graph_runner.py:172
    out_cache_loc = torch.ones(..., dtype=self._cache_loc_dtype())
TypeError: ones(): argument 'dtype' must be torch.dtype, not Mock

I compared the actual CI merge with its upstream main parent. Both files have identical blob SHAs on the two revisions, and neither is modified by #43786:

File Matching blob SHA
test/registered/kernels/ops/attention/test_inkling_checkpoint_indices.py 4710016ace05091fe7a77566cf52c7ae08ed07d3
python/sglang/srt/speculative/eagle_draft_extend_cuda_graph_runner.py bb3a791c0962efa6a38f23fc538808a8fc3f449a

The fixture's resolve_decode_backend returns a bare Mock(), so the Mock(cache_loc_dtype=torch.int64) change here directly addresses the observed dtype error.

This also caused four subsequent Base GPU jobs to stop at check-pr-test-health fail-fast rather than execute their tests; wait-for-base-b then failed as a consequence. Separately, #43786's B200 wo_a quantization test file passed all 7 tests, including its new numerical-equivalence and CUDA Graph tests.

Sharing this as another affected PR and a concrete reproduction of the baseline blocker. Thanks for the fix!

@DarkSharpness
DarkSharpness merged commit c0c7af4 into sgl-project:main Nov 2, 2026
157 of 171 checks passed
@DarkSharpness
DarkSharpness deleted the fix-inkling-draft-backend-dtype branch November 2, 2026 11:03
ByronHsu added a commit to ByronHsu/sglang that referenced this pull request Nov 3, 2026
Pick up main's fix for the Inkling checkpoint test (sgl-project#47860).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-ci CI: run the baseline test suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants