Skip to content

Handle ManualAllocator properly under AD - #327

Merged
kshyatt merged 1 commit into
mainfrom
ksh/allocator_ad
Nov 16, 2026
Merged

kshyatt merged 1 commit into
mainfrom
ksh/allocator_ad

Conversation

@kshyatt

@kshyatt kshyatt commented Nov 12, 2026

Copy link
Copy Markdown
Member

This should fix the examples run at QuantumKitHub/PEPSKit.jl#482. The existing rules were handling temporaries incorrectly leading to double-frees.

@kshyatt
kshyatt requested review from leburgel and lkdvos November 12, 2026 13:29
@codecov

codecov Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.72727% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...orOperationsEnzymeExt/TensorOperationsEnzymeExt.jl 93.33% 1 Missing ⚠️
Files with missing lines Coverage Δ
ext/TensorOperationsChainRulesCoreExt.jl 86.20% <100.00%> (+5.52%) ⬆️
...erationsMooncakeExt/TensorOperationsMooncakeExt.jl 98.48% <100.00%> (+1.84%) ⬆️
...orOperationsEnzymeExt/TensorOperationsEnzymeExt.jl 78.87% <93.33%> (+4.74%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kshyatt

kshyatt commented Nov 12, 2026

Copy link
Copy Markdown
Member Author

This did unblock the PEPSKit PR for me btw

@kshyatt

kshyatt commented Nov 14, 2026 via email

Copy link
Copy Markdown
Member Author

@lkdvos lkdvos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

@kshyatt

kshyatt commented Nov 14, 2026

Copy link
Copy Markdown
Member Author

The Enzyme fail is EnzymeAD/Enzyme.jl#4051

@wsmoses

wsmoses commented Nov 14, 2026

Copy link
Copy Markdown

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

@kshyatt
kshyatt merged commit 5492b9f into main Nov 16, 2026
17 of 20 checks passed
@kshyatt
kshyatt deleted the ksh/allocator_ad branch November 16, 2026 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants