Skip to content

Commit 77b05be

Browse files
Don't overlay mul! for sparse arrays
1 parent 3622657 commit 77b05be

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

ext/ReactantSparseArraysExt/ReactantSparseArraysExt.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ using SparseArrays:
77
include("Errors.jl")
88
include("ReadOnly.jl")
99

10+
Reactant.use_overlayed_version(::AbstractSparseArray) = false
11+
1012
end

src/Overlay.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ end
114114
## `mul!` goes through too many layers of abstractions and we aren't able to overload
115115
## without specializing on every possible combination of types
116116
for (cT, aT, bT) in (
117-
(:AbstractVector, :AbstractMatrix, :AbstractVector),
118-
(:AbstractMatrix, :AbstractMatrix, :AbstractVecOrMat),
117+
(:AbstractVector, :DenseMatrix, :AbstractVector),
118+
(:AbstractMatrix, :DenseMatrix, :AbstractVecOrMat),
119119
)
120120
@eval begin
121121
@reactant_overlay @noinline function LinearAlgebra.mul!(

0 commit comments

Comments
 (0)