-
Notifications
You must be signed in to change notification settings - Fork 64
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
Compilation fails with named sparse arrays #1471
Comments
┌ Error: Exception while generating log record in module Main at /Users/johannes/mwe.jl:26 |
Can you post the error log and version
…On Sat, May 25, 2024 at 6:24 PM JohannesNaegele ***@***.***> wrote:
Hi, this example fails only if I use named arrays. With sparse arrays
alone it works:
using Enzyme
using SparseArrays
using NamedArrays
foo(x, y) = sum(x .* y)
named(x) = NamedArray(x, ([1, 2], ["a"]), ("Rows", "Cols"))
function test_gradient()
x = named(sparse(
[1.0, 2.0],
[1, 1],
[1, 2]
))
y = deepcopy(x)
dx = Enzyme.make_zero(x)
dy = Enzyme.make_zero(y)
Enzyme.autodiff(Reverse, foo, Duplicated(x, dx), Duplicated(y, dy))
return dx, dy
end
test_gradient()
—
Reply to this email directly, view it on GitHub
<#1471>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJTUXABRQISJTCZ7SUSLETZEEFR7AVCNFSM6AAAAABIJHHVUWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGMYTOMRXGYYDQNQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
It didn't fit into the initial comment, that's why I added the error seperately...
|
Yeah sorry we had a race condition where I was responding asking about a
log at the same time that you were uploading the log xD
…On Sat, May 25, 2024 at 7:30 PM JohannesNaegele ***@***.***> wrote:
It didn't fit into the initial comment, that's why I added the error
seperately...
I upgraded Enzyme.jl now (I was 0.12.6) but this doesn't change the
behavior. I will change the error log above to the new version.
***@***.***) pkg> status Enzyme
Status `~/.julia/environments/v1.10/Project.toml`
[7da242da] Enzyme v0.12.8
julia> versioninfo()
Julia Version 1.10.3
Commit 0b4590a5507 (2024-04-30 10:59 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: macOS (arm64-apple-darwin22.4.0)
CPU: 8 × Apple M2
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1)
Threads: 12 default, 0 interactive, 4 GC (on 4 virtual cores)
Environment:
JULIA_EDITOR = code
JULIA_NUM_THREADS = 12
—
Reply to this email directly, view it on GitHub
<#1471 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJTUXCBFFNF2CRSIHNJPJLZEENH5AVCNFSM6AAAAABIJHHVUWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZRGY3TIMJRGU>
.
You are receiving this because you commented.Message ID: <EnzymeAD/Enzyme.
***@***.***>
|
xd |
@JohannesNaegele #1473 should fix the error from the log |
Yes it does! |
Hi, this example fails only if I use named arrays. With sparse arrays alone it works:
The text was updated successfully, but these errors were encountered: