Compilation failed when using `spdiagm`
Open
- Dominant language
- Julia
- Stars
- 586
- Forks
- 108
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 44
Description
The following code fails
```julia
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
```julia
ERROR: Enzyme compilation failed due to illegal type analysis.
Current scope:
; Function Attrs: mustprogress willreturn
```
Contributor guide
Assessment
This issue has not been assessed yet.