Skip to content
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

Illegal type analysis #2279

Open
swilliamson7 opened this issue Jan 22, 2025 · 1 comment
Open

Illegal type analysis #2279

swilliamson7 opened this issue Jan 22, 2025 · 1 comment

Comments

@swilliamson7
Copy link
Collaborator

I see this error when I need to differentiate my model and the model uses a random number generator, in my case I was using MersenneTwister simply because this was the one used in the Lux.jl docs. The specific error is in the attached text file. It doesn't seem to be entirely the rng though, because

function temp(x)

    x[1] += 1
    rng = MersenneTwister(0)
    return nothing

end 

autodiff(Enzyme.ReverseWithPrimal, temp, Duplicated([1.0;2.0], [0.0;0.0]))

works just fine for me. My code also differentiates fine if I don't use the portion of the code that touches the MersenneTwister call. The code is in my eddy repo in the DJ4Earth repository, @wsmoses has access I believe

enzyme_error_012225.txt

@swilliamson7
Copy link
Collaborator Author

Happy to hop on a Zoom call or provide as much extra info as needed!

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

No branches or pull requests

1 participant