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

Avoid constructing `MulAddMul`s on Julia v1.12+

Open dkarrasch opened this issue 1 year ago • 1 comments

This is a companion PR to https://github.com/JuliaLang/julia/pull/52439. Basically, it avoids the construction of MulAddMuls and simply passes the factors alpha and beta forward.

dkarrasch avatar Feb 28 '24 18:02 dkarrasch

I changed things such that there are two methods of each signature type: first a legacy method, that has MulAddMuls in their final argument. Those get destructured and the call is forward to the second method, that has alpha, beta in their final places. On older versions, the pathway is via the first one, on upcoming versions after the above mentioned PR is merged, the second method will simply overload the upstream generic_matmatmul! and step in the place of the first method directly in the call chain. Altogether, this should be non-breaking, so if tests pass, this could be merged and released, and then we see how it goes on current Julia master.

dkarrasch avatar Mar 02 '24 10:03 dkarrasch

Thanks!

maleadt avatar May 23 '24 07:05 maleadt