Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Matrix multiplication fails #22

Closed
MaximilianJHuber opened this issue Mar 11, 2020 · 5 comments
Closed

Matrix multiplication fails #22

MaximilianJHuber opened this issue Mar 11, 2020 · 5 comments

Comments

@MaximilianJHuber
Copy link

using SparsityDetection, SparseArrays

function f(out,in)
    A = rand(length(in), length(in))
    out .= A * in
    return nothing
end

x = [1.0:10;]
out = similar(x)
f(out, x)
sparsity!(f, out, x)

fails with unsupported or misplaced expression "replaceglobalref" in function recurse.

The expected outcome is a full matrix with ones.

@shashi
Copy link
Collaborator

shashi commented Mar 11, 2020

I think it needs to be added here:

https://github.com/JuliaDiffEq/SparsityDetection.jl/blob/master/src/blas.jl

@ChrisRackauckas
Copy link
Member

Is reroute only on Hessians?

@ChrisRackauckas
Copy link
Member

And if that's the right way to forward it, then we need to do:

https://github.com/JuliaLang/julia/blob/master/stdlib/LinearAlgebra/src/blas.jl#L13-L62

@dpo dpo mentioned this issue Mar 14, 2020
@shashi
Copy link
Collaborator

shashi commented Mar 20, 2020

Some of those will be trickier... like mul!, so it would have to be done on a case by case basis.

shashi added a commit that referenced this issue Apr 2, 2020
@shashi
Copy link
Collaborator

shashi commented Apr 2, 2020

Hmm I think it's not trickier, we can do the list, but can't really generate the code. Need to find generic alternatives which may have different argument order etc.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants