Forward and reverse Enzyme tests and rules for linalg#449
Conversation
|
Your PR no longer requires formatting changes. Thank you for your contribution! |
|
The test on 1.12 is passing locally for me! I assume it's getting OOMed or something... |
|
OK, everything looks happy now except the GPU stuff which is unrelated. Are we good to go? |
|
Do we think the test failure is a problem with how LRU interacts with Enzyme? From the stacktrace, I seem to read this as not finding a key, even though being in an if-clause that explicitly checks this: https://github.com/JuliaCollections/LRUCache.jl/blob/1dad9fef75fef51ea1b7e984e5850ad4e374a7e0/src/LRUCache.jl#L172-L175 The really confusing part to me is that it seems to originate from a forward call, which should just be a regular function call, so I'm not sure what is really going on there. I also don't think this can really be a race condition, since 1) I don't think we are multithreading, 2) LRU protects against this? |
|
It also seems to only happen in the CompatCheck tests, not the main ones |
|
Let me just see if bumping the LRUCache compat helps at all... |
|
OK that makes CompatCheck pass and the min test fail. It seems the failures only happen on 1.10 regardless, but they are intermittent. Really annoying. |
|
Also locally I can see it happen in reverse calls so I think it's not to do with fwd mode really |
|
Removing the |
|
OK so after more digging, it looks like the problem here is 1.10 + Enzyme + the |
|
Some more strangeness: the missing key error only ever occurs with |
|
I would be fine disabling this for now and leaving an issue open, it's a bit silly to block ourselves for this |
|
FWIW I have noticed that if I force TensorKit to empty the global caches after each |
|
Actually on 1.10, we could just test with a slightly more "slender" domain which has only 2 complex spaces in the product space, no cache emptying needed. I think that works best and I will leave comments in the file explaining as well. |
|
Anyone have more comments here? |
Trying to make these a little more manageable and pick up the fwd rules where possible