Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Sichere ProgrammierungRefreshed repository pull requests page generally available(22.09.2026 um 03:25 Uhr)
Sichere ProgrammierungThe Joy of Learning the Basics Again(22.09.2026 um 03:28 Uhr)
Sichere ProgrammierungZero-Code OpenTelemetry Tracing for Dagster(22.09.2026 um 03:39 Uhr)
Linux Tipps & Hardening`prime-all`(22.09.2026 um 02:28 Uhr)
IT Security Toolsopensoho v0.15.2(22.09.2026 um 03:33 Uhr)
IT Security NachrichtenUS Proposes AI Incident Alert System in Talks With China, Bessent Says(22.09.2026 um 04:01 Uhr)
Sichere ProgrammierungRefreshed repository pull requests page generally available(22.09.2026 um 03:25 Uhr)
Sichere ProgrammierungThe Joy of Learning the Basics Again(22.09.2026 um 03:28 Uhr)
Sichere ProgrammierungZero-Code OpenTelemetry Tracing for Dagster(22.09.2026 um 03:39 Uhr)
Linux Tipps & Hardening`prime-all`(22.09.2026 um 02:28 Uhr)
IT Security Toolsopensoho v0.15.2(22.09.2026 um 03:33 Uhr)
IT Security NachrichtenUS Proposes AI Incident Alert System in Talks With China, Bessent Says(22.09.2026 um 04:01 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

ciflow/torchtitan/187116: Update on "Add stable tie handling to topk"

The reverted deterministic-topk change made topk pick stable tie indices when global deterministic algorithms were enabled. That changed default user-visible tie behavior for existing deterministic-mode callers, including internal…

0
↗ Quelle (github.com)
Reagiere als Erste:r — dein Feedback zählt!

The reverted deterministic-topk change made topk pick stable tie indices when

global deterministic algorithms were enabled. That changed default user-visible

tie behavior for existing deterministic-mode callers, including internal model

checks that had recorded the previous unspecified tie order.


This change makes stable topk an explicit opt-in instead. The default

stable=False path keeps the existing topk kernels and their existing tie

semantics. stable=True asks topk to preserve the original index order among

equal values, matching the stable-sort convention, and is exposed as a

keyword-only argument so existing positional callsites are not reinterpreted.


The implementation keeps the default fast paths unchanged. CPU and quantized

CPU switch from the existing partial-sort/nth-element selection to stable-sort

only when requested. CUDA and MPS route the requested stable case through their

sort implementations, then narrow to k. The CuTeDSL override declines the stable

case so the canonical implementation handles the stronger tie-order contract.

ONNX export rejects stable=True because ONNX TopK does not specify stable tie

semantics. AOTI gets versioned topk v2 shims so existing compiled ABI entry

points remain unchanged.


This change was authored with assistance from an AI assistant.


Test Plan:


python torchgen/gen.py --update-aoti-c-shim

lintrunner -a

pip install -e . -v --no-build-isolation --no-deps

python test/test_sort_and_select.py -k topk_stable -v

python test/test_sort_and_select.py -k topk -v

python - <<'PY'
import torch
print(torch.ops.aten.topk.default._schema)
x = torch.tensor([[5., 5., 5., 4.], [0., 1., 1., 1.]])
assert torch.topk(x, 2, stable=True).indices.tolist() == [[0, 1], [1, 2]]
try:
torch.topk(x, 2, -1, True, True, True)
except TypeError:
pass
else:
raise AssertionError('stable unexpectedly accepted positionally')
if torch.cuda.is_available():
y = x.cuda()
assert torch.topk(y, 2, stable=True).indices.cpu().tolist() == [[0, 1], [1, 2]]
def f(t):
return torch.topk(t, 2, stable=True).indices
compiled_f = torch.compile(f, fullgraph=True)
assert compiled_f(y[:1]).cpu().tolist() == [[0, 1]]
PY

[ghstack-poisoned]

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten ciflow/torchtitan/187116: Update on "Add stable tie handling to topk"

Thematisch verwandte Begriffe: ciflowtorchtitan187116, Update, quotAdd, stable · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-49449 | Joplin is an open source note-taking and to-do application that organise…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick