Repository navigation
Handle ManualAllocator properly under AD - #327
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
Member
Author
|
This did unblock the PEPSKit PR for me btw |
lkdvos
reviewed
Nov 13, 2026
Member
Author
|
Yeah let's try it
…On Sat, Nov 14, 2026 at 1:12 PM Lukas Devos ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In ext/TensorOperationsChainRulesCoreExt.jl
<#327 (comment)>
:
> @@ -46,6 +44,26 @@ function ChainRulesCore.rrule(
return output, tensoralloc_pullback
end
+function ChainRulesCore.rrule(
Aha I see, because the add and contract variants were marked
non-differentiable, the alloc was never reached? Isn't the smaller fix then
not to just unmark them, and only define the rule for tensoralloc?
—
Reply to this email directly, view it on GitHub
<#327?email_source=notifications&email_token=AAGKJY7KBPAK3ENVIZXEJOT5ZBD2JA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTKOJQGQZDQMRZGYZ2M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#discussion_r4573457385>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGKJY63ZKQD77JCBV4FRV35ZBD2JAVCNFSNUABEKJSXA33TNF2G64TZHMYTQMRZGY2TCMZ3JFZXG5LFHM3DGNJQHA2DMNJVHGQXMAQ>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/AAGKJY3NNR3VCTLYI2PRAG35ZBD2JA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTKOJQGQZDQMRZGYZ2M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KUZTPN52GK4S7NFXXG>
and Android
<https://github.com/notifications/mobile/android/AAGKJY6HDJUOF4WQ6TSPA2L5ZBD2JA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTKOJQGQZDQMRZGYZ2M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2K4ZTPN52GK4S7MFXGI4TPNFSA>.
Download it today!
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
lkdvos
reviewed
Nov 14, 2026
kshyatt
force-pushed
the
ksh/allocator_ad
branch
from
November 14, 2026 15:15
9d3e960 to
7ca0785
Compare
kshyatt
force-pushed
the
ksh/allocator_ad
branch
from
November 14, 2026 15:46
7ca0785 to
2d05ba1
Compare
lkdvos
approved these changes
Nov 14, 2026
lkdvos
left a comment
Member
There was a problem hiding this comment.
I see what you did with the pointers, I thought they were still allocated through malloc, which is not the case here. My mistake ;) looks good otherwise!
Member
Author
|
The Enzyme fail is EnzymeAD/Enzyme.jl#4051 |
|
or rather actually a julia problem, where 1.13.4 broke otherwise functional code in 1.13.3. I'd rec to pinning 1.13.3 for now |
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.
This should fix the
examplesrun at QuantumKitHub/PEPSKit.jl#482. The existing rules were handling temporaries incorrectly leading to double-frees.