[Numpy-discussion] Steering Council membership updates

2021-03-31 Thread Ralf Gommers
Hi all,

On behalf of the NumPy Steering Council (SC) I have a number of membership
changes to announce.

We're excited to welcome Inessa Pawson and Melissa Mendonça as new SC
members. Inessa has been contributing for close to two years, and has been
a driving force behind the new website, the user survey, and other content
and community initiatives. Melissa has been contributing since the start of
last year, she leads the documentation team, co-maintains f2py, does a lot
of mentoring, and is the PI on our current CZI grant.

A number of people are moving to "emeritus SC member" status: Nathaniel
Smith, Pauli Virtanen, Julian Taylor, Allan Haldane, and Jaime Fernández
del Río. They have been in low (or no) activity mode for a while, and this
membership update reflects that. They all still have commit rights, and if
they get more active we'll of course welcome them back with open arms. With
these changes the SC now consists of the people who have been most active
across the projects' activities and decision-making.

A PR with changes to the governance/people page is up at
https://github.com/numpy/numpy/pull/18705.

While the list of SC members is shrinking, it does feel like the NumPy
project itself is growing. There are a lot of people getting involved, from
new maintainers focusing on technical topics like type annotations and SIMD
acceleration to tutorial writers and people working on website content and
accessibility. Which is awesome to see.

Cheers,
Ralf
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Dot + add operation

2021-03-31 Thread Ralf Gommers
On Wed, Mar 31, 2021 at 2:35 AM Guillaume Bethouart <
guillaume.bethou...@eshard.com> wrote:

> 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, during the
> computation of C += A @ B, the maximum allocated memory is twice the size
> of C.Using *gemm to add directly the result , the maximum memory
> consumption is less than 1.5x the size of C.
> This difference is significant for large matrices.
>
> Any people interested in it ?
>

Hi Guillaume, such fused operations cannot easily be done with NumPy alone,
and it does not make sense to add separate APIs for that purpose because
there are so many combinations of function calls that one might want to
fuse.

Instead, Numba, Pythran or numexpr can add this to some extent for numpy
code. E.g. search for "loop fusion" in the Numba docs.

Cheers,
Ralf
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Dot + add operation

2021-03-31 Thread Kevin Sheppard
Or just use SciPy's  get_blas_funcs

to access *gemm, which directly exposes this function:

https://docs.scipy.org/doc/scipy/reference/generated/scipy.linalg.blas.dgemm.html

Kevin


On Wed, Mar 31, 2021 at 12:35 PM Ralf Gommers 
wrote:

>
>
> On Wed, Mar 31, 2021 at 2:35 AM Guillaume Bethouart <
> guillaume.bethou...@eshard.com> wrote:
>
>> 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, during the
>> computation of C += A @ B, the maximum allocated memory is twice the size
>> of C.Using *gemm to add directly the result , the maximum memory
>> consumption is less than 1.5x the size of C.
>> This difference is significant for large matrices.
>>
>> Any people interested in it ?
>>
>
> Hi Guillaume, such fused operations cannot easily be done with NumPy
> alone, and it does not make sense to add separate APIs for that purpose
> because there are so many combinations of function calls that one might
> want to fuse.
>
> Instead, Numba, Pythran or numexpr can add this to some extent for numpy
> code. E.g. search for "loop fusion" in the Numba docs.
>
> Cheers,
> Ralf
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@python.org
> https://mail.python.org/mailman/listinfo/numpy-discussion
>
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


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.

Thus, the only solution is to use the Blas functions through scipy, as
recalled by Kevin.
I'll play a bit with transposition and alignment issues ...

Regards,



--
Sent from: http://numpy-discussion.10968.n7.nabble.com/
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Steering Council membership updates

2021-03-31 Thread Stefan van der Walt
On Wed, Mar 31, 2021, at 03:18, Ralf Gommers wrote:
> We're excited to welcome Inessa Pawson and Melissa Mendonça as new SC 
> members. Inessa has been contributing for close to two years, and has been a 
> driving force behind the new website, the user survey, and other content and 
> community initiatives. Melissa has been contributing since the start of last 
> year, she leads the documentation team, co-maintains f2py, does a lot of 
> mentoring, and is the PI on our current CZI grant.

Thank you for your service, Inessa and Melissa!  Welcome to the steering 
council.

Best regards,
Stéfan
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion