Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/193707
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (2 Unrelated Failures)As of commit 56c9555 with merge base 1f4b1ff ( CRCR (non-blocking) - The following CRCR downstream CI jobs failed but are non-blocking:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Route non-antialiased bicubic interpolation through the existing decomposition when deterministic algorithms are enabled on a non-CPU tensor. Its backward uses deterministic index_put accumulation instead of the native CUDA atomic scatter. Add a non-square, nonuniform-gradient test that checks bitwise repeatability while retaining the existing native-backward alert test.
weifengpy
force-pushed
the
codex/deterministic-bicubic-cuda
branch
from
August 16, 2026 04:15
ed961ad to
56c9555
Compare
weifengpy
marked this pull request as ready for review
August 16, 2026 04:48
weifengpy
requested review from
albanD,
jbschlosser and
mikaylagawarecki
as code owners
August 16, 2026 04:48
Skylion007
approved these changes
Aug 16, 2026
Contributor
Author
|
@pytorchmergebot merge |
Collaborator
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Skylion007
reviewed
Aug 16, 2026
| # The decomposition accumulates through deterministic index_put. | ||
| # Import it lazily: a top-level import creates a cycle, while a | ||
| # nested import statement is unsupported by TorchScript. | ||
| return importlib.import_module( |
Collaborator
There was a problem hiding this comment.
Quick question, this can't be a normal import statement here?
Contributor
Author
There was a problem hiding this comment.
I double checked why import torch._decomp.decompositions wasn't working for 2 reasons
- top-level import creates a cycle
- nested import statement is unsupported by TorchScript. one repro is following
def fn(x: torch.Tensor) -> torch.Tensor:
if not torch.jit.is_scripting():
import math # torch.jit.frontend.UnsupportedNodeError: import statements aren't supported
return x
orrangetabby17
pushed a commit
to orrangetabby17/pytorch
that referenced
this pull request
Sep 2, 2026
…93707) TorchTitan's Kimi K2.7 vision encoder resizes its learnable positional table here: https://github.com/pytorch/torchtitan/blob/85c549b9332067f7615241e73e0c4a28d44b065f/torchtitan/models/kimi_k2_7/vision_encoder.py#L90-L106 ```python grid_table = pos_embed.permute(2, 0, 1).unsqueeze(0).float() ... F.interpolate(grid_table, size=(h, w), mode=bicubic) ``` this PR make sure `--debug.deterministic` / `torch.use_deterministic_algorithms(True)` work. Fix is similar to to pytorch#101115 * direct ATen calls, TorchScript, and `antialias=True` are unchanged * deterministic decomposition is slower and can have small forward rounding differences Pull Request resolved: pytorch#193707 Approved by: https://github.com/Skylion007
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.
TorchTitan's Kimi K2.7 vision encoder resizes its learnable positional table here:
https://github.com/pytorch/torchtitan/blob/85c549b9332067f7615241e73e0c4a28d44b065f/torchtitan/models/kimi_k2_7/vision_encoder.py#L90-L106
this PR make sure
--debug.deterministic/torch.use_deterministic_algorithms(True)work. Fix is similar to to #101115antialias=Trueare unchanged