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

Compilation failed when using spdiagm #2108

Open
albertomercurio opened this issue Nov 18, 2024 · 0 comments
Open

Compilation failed when using spdiagm #2108

albertomercurio opened this issue Nov 18, 2024 · 0 comments

Comments

@albertomercurio
Copy link

albertomercurio commented Nov 18, 2024

The following code fails

function f(p)
    A = spdiagm(0 => 1:11, 1 => p)
    return sum(A)
end

p = rand(10)

f(p)

Enzyme.gradient(Reverse, f, p)

But it works if for example I use A = spdiagm(0 => ones(11), 1 => p).

The error is

ERROR: Enzyme compilation failed due to illegal type analysis.
Current scope: 
; Function Attrs: mustprogress willreturn
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

1 participant