Skip to content

bring back broadcasted rope branch, spmd.local_map - #3750

Merged
pianpwk merged 1 commit into
mainfrom
pianpwk/rope_view_mutation_inference
Jun 23, 2026
Merged

pianpwk merged 1 commit into
mainfrom
pianpwk/rope_view_mutation_inference

Conversation

@pianpwk

@pianpwk pianpwk commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor

for Cannot set version_counter for inference tensor fix

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jun 23, 2026
@pianpwk
pianpwk marked this pull request as ready for review June 23, 2026 21:17
@pianpwk
pianpwk force-pushed the pianpwk/rope_view_mutation_inference branch from 406be79 to bbf74b6 Compare June 23, 2026 22:00
@pianpwk pianpwk changed the title Cannot set version_counter for inference tensor fix bring back broadcasted rope branch, spmd.local_map Jun 23, 2026
Comment thread torchtitan/models/common/rope.py Outdated
Comment on lines +384 to +392
rope_cache_expanded = rope_cache.reshape(
1, rope_cache.shape[0], 1, cache_width
).expand(bsz, -1, -1, -1)
rope_cache = torch.gather(
rope_cache_expanded,
dim=1,
index=positions.view(bsz, seqlen, 1, 1).expand(bsz, seqlen, 1, cache_width),
index=positions.reshape(bsz, seqlen, 1, 1).expand(
bsz, seqlen, 1, cache_width
),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not changing this, right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops sorry

@pianpwk
pianpwk force-pushed the pianpwk/rope_view_mutation_inference branch from bbf74b6 to fd89eae Compare June 23, 2026 22:08
@pianpwk
pianpwk merged commit 739bb9a into main Jun 23, 2026
19 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/rl ciflow/8gpu CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants