Re: [Numpy-discussion] Dot + add operation

2021-03-31 Thread Guillaume Bethouart
Thanks for the quick reply. A was not aware of the fact that this kind of "fuse" function is not compatible with Numpy API. I understand the point. FYI, numba is not able to simplify this kind of calculus: C += A @ B. Nor numexpr which is not compatible with dot product. I did not test pythran.

[Numpy-discussion] Dot + add operation

2021-03-30 Thread Guillaume Bethouart
Is it possible to add a method to perform a dot product and add the result to an existing matrix in a single operation ? Like C = dot_add(A, B, C) equivalent to C += A @ B.This behavior is natively proposed by the Blas *gemm primitive. The goal is to reduce the peak memory consumption. Indeed,