ChainRules.jl icon indicating copy to clipboard operation
ChainRules.jl copied to clipboard

BLAS.gemm and BLAS.gemv pullbacks are type-unstable

Open sethaxen opened this issue 4 years ago • 0 comments

As identified by https://github.com/JuliaDiff/ChainRulesTestUtils.jl/pull/78, the pullbacks for BLAS.gemm and BLAS.gemv are type-unstable because a different InplaceableThunk is returned based on the value of the input parameters. For the norm functions, I worked around this by pushing the condition check to within the thunk, which in this case looks like it will produce a lot of duplicate code. Do we expect that this type-instability to cause decreased efficiency?

sethaxen avatar Dec 15 '20 21:12 sethaxen