-
Notifications
You must be signed in to change notification settings - Fork 68
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
Enzyme Assertion with ComponentArrays #1447
Comments
Can you minimize the error by chance? |
@avik-pal would you be able to reduce this? If so I can try to fix this later today. |
Tried minimizing but #1451 (comment) is where I could get, but that is a different error |
@avik-pal with the linked comment resolved, any chance you can see if this is reducible? |
bumping here @avik-pal |
bump @avik-pal |
1 similar comment
bump @avik-pal |
This comment was marked as outdated.
This comment was marked as outdated.
Here is a reduced version using just LinearAlgebra and ComponentArrays using LinearAlgebra, ComponentArrays, Random, Enzyme
rng = Random.MersenneTwister(1234)
ps = (; weight=rand(Float32, 5, 5), bias=rand(Float32, 5))
xtest = rand(Float64, 5)
dx = zero.(xtest)
Enzyme.API.runtimeActivity!(true)
function test_function(x, ps)
x_ = reshape(x, :, 1)
y = muladd(ps.weight, x_, ps.bias)
return sum(y)
end
ps_ca = ComponentArray(ps)
@time test_function(xtest, ps)
@time autodiff(Reverse, test_function, Active, Duplicated(xtest, dx), Const(ps_ca)) It might have something to do with mixed-precision, I don't get any assertion if xtest is Float32 |
This is working in the latest releases |
If the parameters are NamedTuple it works as expected, changing them to ComponentArray gives an Assertion Error
Stacktrace
The text was updated successfully, but these errors were encountered: