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

No rules for typed_hvcat #743

Open
MasonProtter opened this issue Sep 29, 2023 · 1 comment
Open

No rules for typed_hvcat #743

MasonProtter opened this issue Sep 29, 2023 · 1 comment

Comments

@MasonProtter
Copy link
Contributor

This causes problems with Zygote:

julia> using Zygote

julia> gradient(x -> sum([x x]), pi/2)
(2.0,)

julia> gradient(x -> sum(Float32[x x]), pi/2)
ERROR: Mutating arrays is not supported -- called setindex!(Matrix{Float32}, ...)
...
  [7] typed_hcat
    @ Zygote ./abstractarray.jl:1610 [inlined]

Ideally we'd teach ChainRules how to handled this statement without going through to the implementation.

@mcabbott
Copy link
Member

See also #695

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