-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add Enzyme tests #254
base: master
Are you sure you want to change the base?
Add Enzyme tests #254
Conversation
The fact that it doesn't segfault in so many tests is a good sign. Related: TuringLang/Turing.jl#1887 |
@devmotion can you rerun on latest Enzyme main? |
fyi the test failures appear to be due to currently unimplemented derivatives of lapack functions. probably should disable those tests. |
@devmotion @yebai at this point, everything in this PR works except:
Moreover all the errors are relatively nice. at this point there aren't Enzyme bugs here and merging this is now on your end (presumably marking the code using lapack as unsupported atm, and fixing your test handler to not use an active vector for that input) |
Thank you, I'll try to have a look at and fix the remaining issues this week. |
The latest commit added a way to mark some Enzyme tests as broken (and I also introduced a bug in the test setup 😄) but it also reveals that there are many more issues - so far only a tiny initial testset was run but no tests of the log densities of the uni-, multi- and matrixvariate distributions we're actually interested in. |
@wsmoses Is this an enzyme bug or did I call autodiff incorrectly? https://github.com/TuringLang/DistributionsAD.jl/actions/runs/5872312798/job/15923610267?pr=254#step:6:303 |
Definitely seems like a bug (that we need a minimal reproducer for)
…On Wed, Aug 16, 2023 at 4:26 PM David Widmann ***@***.***> wrote:
@wsmoses <https://github.com/wsmoses> Is this an enzyme bug or did I call
autodiff incorrectly?
https://github.com/TuringLang/DistributionsAD.jl/actions/runs/5872312798/job/15923610267?pr=254#step:6:303
—
Reply to this email directly, view it on GitHub
<#254 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJTUXBUFJ5TP4AJUKMV3ADXVRY3HANCNFSM6AAAAAA2LPVOW4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
One slightly annoying thing I found about the Enzyme error message is printing a large amount of |
@devmotion did you have a chance to isolate that 1.6 error that crashes Julia (so we can ensure it does not)? |
@devmotion can you repush (its not letting me rerun tests for some reason) |
@devmotion hm I still can't retrigger this, if you can have the tests run again. |
@wsmoses you should have the priveledges to trigger CI (re-)runs -- can you try again? |
I reran CI against the latest Enzyme.jl v0.12.19. They are now failing with either (mac os)
or (ubuntu)
See the failed CI runs for details. @wsmoses, is this an issue you are aware of? |
Nope not aware of please open MWE |
Gathering links to some related Enzyme issues: |
@yebai Looks like the issues here are that Enzyme actually passes tests it was marked as failing? |
yes, most tests are passing with most recent Enzyme. |
@devmotion do you know why we are testing Enzyme only on Others tests? |
test/ad/utils.jl
Outdated
# Disable Enzyme warnings | ||
Enzyme.API.typeWarning!(false) | ||
# Enable runtime activity (workaround) | ||
Enzyme.API.runtimeActivity!(true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Disable Enzyme warnings | |
Enzyme.API.typeWarning!(false) | |
# Enable runtime activity (workaround) | |
Enzyme.API.runtimeActivity!(true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typewarning shouldnt need to be set [it is presently the default]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this commit is for removing them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, you may still need the runtimeactivity one for now [and looks like tests concur]
I think Enzyme might still struggle with a few |
open issues and we'll get those sorted! |
Oh yeah runtime activity isn't supported yet for forward mode blas, so my recommendation here is to turn on runtime activity more selectively for which tests need it |
I had tried to run Enzyme tests, and it seems currently quite a few tests fail/error.