Conversation
|
So instead of being marked as |
|
I agree, I'm trying to figure out where the problem comes from (I have a MWE) and will file an issue with Enzyme. |
|
Here's the issue EnzymeAD/Enzyme.jl#3623 |
|
actually it's a doc issue rather than a real issue, see https://enzymead.github.io/Enzyme.jl/dev/faq/#faq-runtime-activity. So I think we'll still want this because we may need runtime activity turned on for the Enzyme equivalent of |
|
Ok, so should the check be |
|
Ideally the fix would be to have no RA at all, which I'm trying to get set up on my PEPSKit branch. I think perhaps we should get Enzyme.jl to add the helper (I could try to add it) then just use that? |
|
If you want it fixed already I'd probably propose already adding our own helper and then swapping it out once the upstream version is released, makes it also easier to swap out since it is a single function/signature |
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 7 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Under runtime activity, Enzyme can pass an argument that is inactive at run time as a `Duplicated` whose shadow aliases the primal. Replace the inline `dval !== val` guards with a single helper, `is_inactive(config, x)`, which checks `x isa Const || (runtime_activity(config) && x.dval === x.val)`, and apply it to all tensor arguments (A, B, C) in the forward and reverse rules of `tensorcontract!`, `tensoradd!` and `tensortrace!`. This also skips copying `C` for `Δβ` when `C` is inactive. The helper is meant to be replaced by an upstream EnzymeRules equivalent once available. Add a regression test adapted from EnzymeAD/Enzyme.jl#3623. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
New |
EnzymeMy doc reading ability currently has a strange issue where some objects that should beConstdon't appear to be marked that way. Adding a guard here (which should be a pretty cheap check) prevents things from being overwritten until that gets fixed.