-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ActivityAnalysis] Remove isConstantValue call in activity analysis #1608
Conversation
Do you have an example of a failing test? Cc @pengmai |
@wsmoses Sorry in advance even our simplest example produces a lot of code. But you can find the
We use register gradient for the quantum part and the classical part is done entirely (here x*4) by backprop. The thing that is curious is that the wrong values only happen when we have the classical part. |
By looking at the activity analysis and just keeping relevant information I noticed some differences for the value
From what I can understand there is no more search UP for %12. (full activity here https://gist.github.com/rmoyard/a8f9f0821d9611734f69aece7380d001) Could someone tell me how is the |
Probably a bit longer than you wanted, but a few months back I did a deep dive on the internals of the analyses that may be helpful: https://www.youtube.com/watch?v=VTyHPKR5dDQ&ab_channel=EnzymeAD We definitely should add more docs to this (PRs welcome). We also are hoping to write a lot of this up in a few papers, but we haven't gotten to that yet. |
I think activity analysis starts here: https://www.youtube.com/watch?v=VTyHPKR5dDQ&t=47m43s&ab_channel=EnzymeAD |
Hi @wsmoses ! I have added the integration test, let me know if there is a better folder where to put it. You can review the changes |
Hello!
I am trying to update Catalyst (https://github.com/PennyLaneAI/catalyst) to the latest LLVM, MLIR and Enzyme version. I have noticed since this change was introduced
#1558 that we do not get correct results. I am not familiar with your codebase but I could identify that
!Hypothesis->isConstantValue(TR, SI->getPointerOperand());
is the problematic line. I think there is some side effect calling this line, because removingcop2
from the conditional is not sufficient, the call toisConstantValue
has to be removed for us to get correct results.I would appreciate your help to solve this issue :)