[Fix] Stringify torch.device annotations for Paddle - #4
Merged
SigureMo merged 1 commit intoJul 30, 2026
Merged
Conversation
huangjiyi
force-pushed
the
agent/stringify-torch-device-annotations
branch
from
July 30, 2026 12:45
bc67ddf to
887c82f
Compare
SigureMo
approved these changes
Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stringify all 26
torch.deviceannotations underfla/so Paddle compat does not resolve type hints through the proxiedtorchmodule. Runtime expressions and defaults, includingtorch.device("cpu")inprepare_split_cu_seqlens, remain unchanged. This targets the PaddleFleet PR #1578 wheel import failure in Actions job 90814641372.Test plan
UNQUOTED=0.tests/paddle/test_kimi_delta_attention.py: 6 passed, including dense/mask training forward/backward.git diff --check: passed.Benchmark / NCU
Not applicable; this changes type annotations only.
Breaking changes
None.