Zum Hauptinhalt springen
•••
YouTube Security VideosAndroid Developers: Decoding Play Policy AMA(29.10.2026 um 21:21 Uhr)
••
AI & KI NachrichtenAndroid Developers: App security in the agentic era(29.10.2026 um 21:25 Uhr)
••••••••
YouTube Security VideosAndroid Developers: Decoding Play Policy AMA(29.10.2026 um 21:21 Uhr)
••
AI & KI NachrichtenAndroid Developers: App security in the agentic era(29.10.2026 um 21:25 Uhr)
•••••
Intelligence View
⚡ tsecurity.de Intelligence

ciflow/torchtitan/186653: Make topk deterministic under deterministic algorithms

When torch.use_deterministic_algorithms(True) is enabled, make topk resolve tied values with stable index tie-breaking. CPU topk now compares by value and then…

Beitrag
0
Seite
0
↗ Quelle (github.com)
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!

When torch.use_deterministic_algorithms(True) is enabled, make topk resolve tied values with stable index tie-breaking.


CPU topk now compares by value and then index in deterministic mode. CUDA keeps the existing top-k selection path and uses stable sorting for the selected top-k outputs so threshold ties preserve input-index order without falling back to a full sort on NVIDIA. ROCm uses stable sort in deterministic mode because its current top-k gather reserves tie slots through atomics.


This gives deterministic mode a topk behavior analogous to scatter_add: fast default kernels remain available, while deterministic mode uses stable algorithms when requested.


Test Plan:




  • Rebuilt PyTorch from source with CUDA enabled.




  • python -m py_compile test/test_sort_and_select.py torch/init.py torch/_torch_docs.py




  • python test/test_sort_and_select.py -k topk_deterministic




  • python test/test_sort_and_select.py -k topk




  • git diff --check HEAD^




  • lintrunner --config=.lintrunner.toml --skip=PYREFLY aten/src/ATen/native/TopKImpl.h aten/src/ATen/native/cuda/TensorTopK.cpp test/test_sort_and_select.py torch/init.py torch/_torch_docs.py




ghstack-source-id: c9b62071c22c09c660e34d957311c6d0234300c8


Pull Request resolved: #186653

Intelligence Digest — free The top security news daily · unsubscribe anytime
Community Rating & Social Proof
⭐ Leser-Wertung
–
Ø / 5.0
No reader ratings yet
Was this page helpful?
0
Jetzt Bewertung abgeben
🟢 Niedrig (1-3.9) 🟡 Mittel (4.0-6.9) 🔴 Hoch (7.0-8.9) Kritisch (9.0-10.0)

Related story clusters & sources (vector AI)

2 sources
GitHub Release: microsoft/WSL v3.0.5 (29.10.2026)
1 more source
Similar posts
🔍 Verwandte News

Auch interessante Nachrichten ciflow/torchtitan/186653: Make topk deterministic under deterministic algorithms

Thematisch verwandte Begriffe: ciflowtorchtitan186653, Make, topk, deterministic · 6 Treffer

Laden...

Loading videos ...

Laden...

Loading posts ...

Laden...

Loading videos ...

Laden...

Loading posts ...

Laden...

Loading videos ...

Laden...

Loading posts ...

Laden...

Loading videos ...

Laden...

Loading posts ...

Laden...

Loading videos ...

💬 Loading comments…
Pull to refresh
Nächster Beitrag