Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
Sichere ProgrammierungWriting Native GPU Kernels in Rust with the CUDA-Rust Toolchain(01.10.2026 um 05:03 Uhr)
•
Sichere ProgrammierungSQL Window Functions Explained(01.10.2026 um 04:40 Uhr)
••••
Sichere ProgrammierungHi DEV! I’m Somya — Learning, Building & Figuring Things Out(01.10.2026 um 04:47 Uhr)
••••
Sichere ProgrammierungDeleting your AWS Copilot stacks can delete your database. Here's why.(01.10.2026 um 04:51 Uhr)
•
Sichere ProgrammierungWriting Native GPU Kernels in Rust with the CUDA-Rust Toolchain(01.10.2026 um 05:03 Uhr)
•
Sichere ProgrammierungSQL Window Functions Explained(01.10.2026 um 04:40 Uhr)
••••
Sichere ProgrammierungHi DEV! I’m Somya — Learning, Building & Figuring Things Out(01.10.2026 um 04:47 Uhr)
••••
Sichere ProgrammierungDeleting your AWS Copilot stacks can delete your database. Here's why.(01.10.2026 um 04:51 Uhr)
•
Intelligence View
⚡ tsecurity.de Intelligence

viable/strict/1780891878: Preserve aten.hardtanh meta semantics for export (#185298)

torch.export runs aten.hardtanh through FakeTensor/Meta dispatch. Without a Meta kernel, that path fell back to the _refs.nn.functional.hardtanh decomposition,…

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

torch.export runs aten.hardtanh through FakeTensor/Meta dispatch. Without a

Meta kernel, that path fell back to the _refs.nn.functional.hardtanh

decomposition, which intentionally follows the Python frontend and rejects

min_val > max_val. Native aten.hardtanh has legacy behavior that allows

inverted bounds and delegates the result to clamp, so export failed for a model

that eager ATen accepted.


Add dedicated Meta kernels for aten.hardtanh, aten.hardtanh.out, and

aten.hardtanh_ so export preserves the ATen operator semantics without

changing eager behavior or the Python frontend. The Meta implementation mirrors

native validation order for bool/complex inputs, integer scalar conversion,

unsigned negative limits, out device/dtype errors, scalar range checks, and

resized out strides.


The alternative of adding validation to native hardtanh was rejected because

it would be BC-breaking. Changing the functional/ref frontend would also blur

the existing distinction between torch.nn.functional.hardtanh and

torch.ops.aten.hardtanh. A dedicated Meta implementation keeps the fix scoped

to the path that was diverging.


Fixes #161081

Generated by my agent


Test Plan:



  • python test/test_meta.py -k hardtanh

  • python test/export/test_export.py -k test_export_allows_aten_hardtanh_with_inverted_bounds

  • lintrunner -a

    Pull Request resolved: #185298

    Approved by: https://github.com/yushangdi

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten viable/strict/1780891878: Preserve aten.hardtanh meta semantics for export (#185298)

Thematisch verwandte Begriffe: viablestrict1780891878, Preserve, atenhardtanh, meta · 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 ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
tsecurity.de Icon
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