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

Crash: Assertion failed: (vec.back() == currentBlock) #1574

Closed
mhauru opened this issue Jun 26, 2024 · 2 comments
Closed

Crash: Assertion failed: (vec.back() == currentBlock) #1574

mhauru opened this issue Jun 26, 2024 · 2 comments

Comments

@mhauru
Copy link

mhauru commented Jun 26, 2024

MWE:

using Bijectors
using Enzyme
using Random, LinearAlgebra

Enzyme.API.runtimeActivity!(true)

_topd(x) = x * x' + I
d = 4
b = Bijectors.PDVecBijector()
z = randn(d, d)
x = _topd(z)
f(x) = sum(transform(b, _topd(reshape(x, d, d))))
Enzyme.gradient(Enzyme.Reverse, f, vec(z))

Output:

Assertion failed: (vec.back() == currentBlock), function addReverseBlock, file /workspace/srcdir/Enzyme/enzyme/Enzyme/GradientUtils.cpp, line 8952.

[75577] signal (6): Abort trap: 6
in expression starting at /Users/mhauru/projects/Enzyme-mwes/current_block_assertion_fail_crash/mwe.jl:15
__pthread_kill at /usr/lib/system/libsystem_kernel.dylib (unknown line)
Allocations: 57218916 (Pool: 57141228; Big: 77688); GC: 76
Abort trap: 6

Version info:

(current_block_assertion_fai...) pkg> status Bijectors
Status `~/projects/Enzyme-mwes/current_block_assertion_fail_crash/Project.toml`
  [76274a88] Bijectors v0.13.14

(current_block_assertion_fai...) pkg> status Enzyme
Status `~/projects/Enzyme-mwes/current_block_assertion_fail_crash/Project.toml`
  [7da242da] Enzyme v0.12.19

julia> versioninfo()
Julia Version 1.10.4
Commit 48d4fd48430 (2024-06-04 10:41 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (arm64-apple-darwin22.4.0)
  CPU: 10 × Apple M1 Pro
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1)
Threads: 1 default, 0 interactive, 1 GC (on 8 virtual cores)
@wsmoses
Copy link
Member

wsmoses commented Jun 26, 2024

Can you paste the whole error log and ideally a MWE without additional package dependencies?

IIRC it looked likt the issue was coming from an syrk call

@wsmoses
Copy link
Member

wsmoses commented Jun 26, 2024

Fixed by pending jll bump here: JuliaPackaging/Yggdrasil#8973

@wsmoses wsmoses closed this as completed Jun 27, 2024
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

2 participants