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

Bijectors, reverse mode hangs #2033

Closed
mhauru opened this issue Oct 31, 2024 · 5 comments
Closed

Bijectors, reverse mode hangs #2033

mhauru opened this issue Oct 31, 2024 · 5 comments

Comments

@mhauru
Copy link
Contributor

mhauru commented Oct 31, 2024

MWE:

module MWE
import Bijectors, Enzyme
b = Bijectors.CorrBijector()
binv = Bijectors.inverse(b)
f(x) = sum(b(binv(x)))
x = randn((0, 0))
Enzyme.gradient(Enzyme.Reverse, f, x)
end

Output:

WARNING: replacing module MWE.
 ** On entry to DTRMM  parameter number  9 had an illegal value
 ** On entry to DLASCL parameter number  9 had an illegal value
 ** On entry to DTRSM  parameter number  9 had an illegal value
 ** On entry to DTRSM  parameter number  9 had an illegal value

It seems to just hang after that. I ran out of patience after 5 minutes.

Enzyme current main branch.

@wsmoses
Copy link
Member

wsmoses commented Nov 3, 2024

Okay this one requires minimization and isn't resolved by current dev branches

@wsmoses
Copy link
Member

wsmoses commented Nov 4, 2024

@penelopeysm and also would you be able to help reduce this one too?

@mhauru
Copy link
Contributor Author

mhauru commented Nov 5, 2024

Giving this a shot now

@mhauru
Copy link
Contributor Author

mhauru commented Nov 5, 2024

It's an issue with Cholesky on a zero-dim matrix:

module MWE
import Enzyme, LinearAlgebra

function cholesky!(A)
    C, info = LinearAlgebra._chol!(A, LinearAlgebra.UpperTriangular)
    return C
end

f(x) = sum(cholesky!(copy(x)))
x = zeros((0, 0))
Enzyme.gradient(Enzyme.Reverse, f, x)
end

@wsmoses
Copy link
Member

wsmoses commented Nov 6, 2024

fixed on main

@wsmoses wsmoses closed this as completed Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants