🪟 Windows TippsThe Gemini desktop app is now available for Windows(11.09.2026 um 17:06 Uhr)
🔧 AI Nachrichten ChatGPT automatically logged out [Fix](12.09.2026 um 17:09 Uhr)
⚠️ Malware / Trojaner / VirenWindows 11 just dropped the tool ransomware abused, Microsoft says don’t restore WMIC(10.09.2026 um 20:11 Uhr)
🪟 Windows TippsThe Gemini desktop app is now available for Windows(11.09.2026 um 17:06 Uhr)
🔧 AI Nachrichten ChatGPT automatically logged out [Fix](12.09.2026 um 17:09 Uhr)
⚠️ Malware / Trojaner / VirenWindows 11 just dropped the tool ransomware abused, Microsoft says don’t restore WMIC(10.09.2026 um 20:11 Uhr)

💾 Downloads 🕛 vor 3 Monaten 2 Min Lesezeit
0

trunk/9c77ff51b6b2a30dc0964289e54c55b3f1bcdf13: Fix functional accumulate_grad state modeling (#184082)

↗ Quelle (GitHub · github.com)
🗣️ Stimme:
🐙
$ git clone https://github.com/pytorch/pytorch.git

Make Inductor's accumulate_grad op take the current grad explicitly and return the updated grad, so functionalization and compiled autograd no longer rely on hidden Tensor.grad reads.


Remove the custom op output alias annotation and make the returned grad fresh: clone the current grad before accumulation, avoid aliasing new_grad on initialization, and keep the compiled-autograd grad write as the op side effect. Split the Dynamo polyfills so the three-arg op follows the no-alias contract while Tensor.backward(inputs=...) keeps eager-style in-place accumulation and preserves existing dense .grad object identity.


Fix Dynamo's two-arg accumulate_grad_ handler to realize lazy tensor arguments before .grad reads/writes and clear mutation metadata when storing the source-stripped grad. Apply the optional extraction review suggestion in the compiled-autograd C++ bridge.


Test Plan:



  • python -m py_compile torch/_dynamo/variables/torch.py torch/_dynamo/polyfills/init.py test/dynamo/test_fwd_loss_bwd.py test/inductor/test_compiled_autograd.py

  • git diff --check

  • git diff --cached --check

  • lintrunner -a

  • LD_LIBRARY_PATH=/data/users/jansel/pytorch-issue-fixer-2/env/lib:$LD_LIBRARY_PATH PYTHONPATH=/data/users/jansel/pytorch-issue-fixer-2/pytorch python test/dynamo/test_fwd_loss_bwd.py TestForwardLossBackward.test_tensor_backward_duplicate_inputs TestForwardLossBackward.test_tensor_backward_accumulates_grads TestForwardLossBackward.test_tensor_backward_preserves_existing_grad_reference

  • LD_LIBRARY_PATH=/data/users/jansel/pytorch-issue-fixer-2/env/lib:$LD_LIBRARY_PATH PYTHONPATH=/data/users/jansel/pytorch-issue-fixer-2/pytorch python test/inductor/test_compiled_autograd.py TestCompiledAutograd.test_inputs_aliasing_bytecode_attr_mutations TestCompiledAutograd.test_accumulate_grad_capture_lifts_current_grad TestCompiledAutograd.test_accumulate_grad_op_functional_contract TestCompiledAutograd.test_accumulate_grad_accuracy (functional contract skipped locally due old registered schema)

  • LD_LIBRARY_PATH=/data/users/jansel/pytorch-issue-fixer-2/env/lib:$LD_LIBRARY_PATH PYTHONPATH=/data/users/jansel/pytorch-issue-fixer-2/pytorch python test/dynamo/test_activation_checkpointing.py RematerializeACNodesPassTests.test_chunked_loss_remat

  • LD_LIBRARY_PATH=/data/users/jansel/pytorch-issue-fixer-2/env/lib:$LD_LIBRARY_PATH PYTHONPATH=/data/users/jansel/pytorch-issue-fixer-2/pytorch python test/inductor/test_compiled_autograd.py TestCompiledAutograd.test_accumulate_grad_polyfill_case_2_3_1 TestCompiledAutograd.test_accumulate_grad_polyfill_case_2_1 TestCompiledAutograd.test_accumulate_grad_polyfill_case_3_2

  • LD_LIBRARY_PATH=/data/users/jansel/pytorch-issue-fixer-2/env/lib:$LD_LIBRARY_PATH PYTHONPATH=/data/users/jansel/pytorch-issue-fixer-2/pytorch python test/dynamo/test_backward_higher_order_ops.py BackwardHigherOrderOpTests.test_invoke_in_pt2_compiled_autograd BackwardHigherOrderOpTests.test_invoke_in_pt2_compiled_autograd_side_effect


Fixes

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

Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf github.com.
↗ Original-Artikel auf github.com lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
2 Quellen
News alert: Bright Security launches AI PT, AI-powered penetration testing that cuts weeks to hours
1 Quelle
Case study: ManageWP Blocks 11.9M+ Threats in 6 Months with Patchstack
1 Quelle
Unauthenticated PHP Object Injection to Remote Code Execution on GiveWP
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten trunk/9c77ff51b6b2a30dc0964289e54c55b3f1bcdf13: Fix functional accumulate_grad state modeling (#184082)

Thematisch verwandte Begriffe: trunk9c77ff51b6b2a30dc0964289e54c55b3f1bcdf13, functional, accumulategrad, state · 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 ...