[spmd_types] raise on SAC + Flex + typechecking - #3672
Merged
Conversation
[ghstack-poisoned]
This was referenced Jun 14, 2026
[ghstack-poisoned]
tianyu-l
approved these changes
Jun 15, 2026
| from torchtitan.tools.logging import logger | ||
|
|
||
|
|
||
| def _checkpoint_contexts_without_recompute_typecheck(context_fn): |
Contributor
There was a problem hiding this comment.
maybe
Suggested change
| def _checkpoint_contexts_without_recompute_typecheck(context_fn): | |
| def _no_spmd_typecheck_in_recompute(context_fn): |
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
submartingales
pushed a commit
to botcanlearn/torchtitan-upstream
that referenced
this pull request
Jun 16, 2026
ghstack-source-id: 99bcd05 Pull Request resolved: pytorch/torchtitan#3672
[ghstack-poisoned]
pianpwk
marked this pull request as ready for review
June 16, 2026 23:30
[ghstack-poisoned]
tianyu-l
approved these changes
Jun 17, 2026
Comment on lines
+114
to
+116
| @staticmethod | ||
| def _uses_flex_attention(config: Configurable.Config) -> bool: | ||
| return any(config.traverse(FlexAttention.Config)) |
Contributor
There was a problem hiding this comment.
no need to introduce this function
| and self.model_spec is not None | ||
| and self._uses_flex_attention(self.model_spec.model) | ||
| ): | ||
| raise ValueError( |
Contributor
There was a problem hiding this comment.
add a TODO, o/w sounds defeated
[ghstack-poisoned]
submartingales
pushed a commit
to botcanlearn/torchtitan-upstream
that referenced
this pull request
Jun 17, 2026
ghstack-source-id: 4781b87 Pull Request resolved: pytorch/torchtitan#3672
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.
SAC + Flex, or SAC + typecheck + non-flex, or typecheck + Flex + full/no AC is fine, but this is not (likely SAC + regional inductor issue, cache missing on flex region during recompute, due to typechecking global state change? No sure, raising temporarily while we figure this out, asking to use the other available options
Stack from ghstack (oldest at bottom):