Skip to content

Commit 35d9842

Browse files
Don't overlay mul! for sparse arrays
1 parent bb8835c commit 35d9842

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
@@ -112,8 +112,8 @@ end
112112
## `mul!` goes through too many layers of abstractions and we aren't able to overload
113113
## without specializing on every possible combination of types
114114
for (cT, aT, bT) in (
115-
(:AbstractVector, :AbstractMatrix, :AbstractVector),
116-
(:AbstractMatrix, :AbstractMatrix, :AbstractVecOrMat),
115+
(:AbstractVector, :DenseMatrix, :AbstractVector),
116+
(:AbstractMatrix, :DenseMatrix, :AbstractVecOrMat),
117117
)
118118
@eval begin
119119
@reactant_overlay @noinline function LinearAlgebra.mul!(

0 commit comments

Comments
 (0)