Closed CheukHinHoJerry closed 1 year ago
You could add a hyper dual extension, similar to the forward diff extension: https://github.com/JuliaLinearAlgebra/Octavian.jl/blob/master/ext/ForwardDiffExt.jl
The standard Julia implementation with Arrays uses a naive fall-back
Unfortunately, that naive fallback is extremely bad. A truly naive triple loop implementation is much better, at least for the small array sizes I've tried.
Thank you. I got this fixed.
Octavian won't actually work without an extension. So I'm not sure what your fix is. Perhaps you're just running another fallback?
I wrote a similar extension and use it to overload functions in my package. Do you think it is a proper fix?
Okay, yes, that sounds good. You're also welcome to contribute such an extension here, if you'd like.
Sure. It is almost the same as what you already have for ForwardDiff. I will put that in a separate PR in case it needs further fixes and tests.
I am work on a performance-demanding code with
HyperDualNumbers
andPtrArray
but I got an error withmul!
. This is a MWE reproducing the error:It looks like a bug and it seems that Octavian is analyzing the size of array elements and how it should do with the matrix multiplication. The standard Julia implementation with Arrays uses a naive fall-back instead of Octavian.