[Numpy-discussion] Re: Display runtime information through a new function: `show_runtime`

2022-08-09 Thread Ralf Gommers
On Sun, Aug 7, 2022 at 9:59 AM Matti Picus  wrote:

> My assumption in advising Ganesh to create a new function was that there
> may be some people who find show_config useful. Personally I do not find
> it useful. If there is agreement that what matters is runtime and not
> build-time then we should replace the current show_config. Otherwise we
> should have two functions, since the lengthy output of build-time values
> will confuse people looking for only runtime values.
>

Both are useful, at least to me. I think either separate functions or a
combined one (perhaps with a keyword) would be fine.



>
> Matti
>
>
> On 7/8/22 07:08, Stefan van der Walt wrote:
> > Hi Ganesh,
> >
> > If the aim is to merge these functions (show_config/runtime)
> > eventually, why not merge them now and avoid introducing another
> > function into the root namespace?
>

I'm guessing that the reason is that `show_config` is defined in
`numpy/__config__.py`, which is a file that is generated by
`numpy.distutils (deprecated). So adding to it now means having to
reimplement it soon. For runtime info there's also no need to put that in a
build system component, while for build-time info there must be such a
connection somewhere. Hence I think the PR is fine as is.

Cheers,
Ralf



> >
> > Stéfan
> >
> > On Sat, Aug 6, 2022, at 20:55, Ganesh Kathiresan wrote:
> >> Hi Team,
> >>
> >> We are planning on adding a new function called `np.show_runtime` to
> >> display the runtime information of the machine in addition to
> >> `np.show_config` which displays the build-related information.
> >> Relevant PR: ENH: Use threadpoolctl in show_runtime (a new function)
> >> #21468 
> >>
> >> Reasons for new function:
> >> 1. Will be helpful in root-causing issuing with information from the
> >> acceleration frameworks.
> >> 2. Build time information alone is not always helpful [1]
> >>
> >> Sample Output of new function
> >> >>> np.show_runtime() [{'simd_extensions': {'baseline': ['SSE', 'SSE2',
> >> 'SSE3'], 'found': ['SSSE3', 'SSE41', 'POPCNT', 'SSE42', 'AVX',
> >> 'F16C', 'FMA3', 'AVX2'], 'not_found': ['AVX512F', 'AVX512CD',
> >> 'AVX512_KNL', 'AVX512_KNM', 'AVX512_SKX', 'AVX512_CLX', 'AVX512_CNL',
> >> 'AVX512_ICL']}}, {'architecture': 'Zen', 'filepath':
> >> '/usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so
> >> ', 'internal_api': 'openblas',
> >> 'num_threads': 12, 'prefix': 'libopenblas', 'threading_layer':
> >> 'pthreads', 'user_api': 'blas', 'version': '0.3.20'}]
> >> Under the hood
> >> `np.show_runtime` will use `threadpoolctl` [2] to get the runtime
> >> information of the frameworks. In addition to this, we will also
> >> display useful SIMD extensions that are supported.
> >>
> >> Future Scope
> >> 1. When we move towards meson, we can leverage the additional
> >> information and revamp `np.show_config` to utilize it.
> >> 2. If needed, we can gradually merge `show_runtime` and `show_config`
> >> to display information in sections and various other formats.
> >>
> >> Please do let us know if you have any suggestions on improving this
> >> function or concerns about the information provided by the new function.
> >>
> >> Thanks,
> >> Ganesh
> >>
> >> [1] show_config displays useless info when installed through
> >> conda-forge channel 
> >> (#14492)
> >> [2] threadpoolctl 
> >
> > ___
> > NumPy-Discussion mailing list -- numpy-discussion@python.org
> > To unsubscribe send an email to numpy-discussion-le...@python.org
> > https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
> > Member address: matti.pi...@gmail.com
> ___
> NumPy-Discussion mailing list -- numpy-discussion@python.org
> To unsubscribe send an email to numpy-discussion-le...@python.org
> https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
> Member address: ralf.gomm...@googlemail.com
>
___
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com


[Numpy-discussion] Request to review a PR

2022-08-09 Thread Ivan Tsybulin
Hello,

I kindly ask someone to join as a reviewer to my PR
https://github.com/numpy/numpy/pull/21814 about handling np.float32 arrays
in ma.mean and ma.std functions. The PR is aimed to fix different behaviour
between np.core and ma variants of these functions.

-- 
Ivan Tsybulin
___
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com


[Numpy-discussion] Re: Display runtime information through a new function: `show_runtime`

2022-08-09 Thread Stefan van der Walt
On Tue, Aug 9, 2022, at 04:10, Ralf Gommers wrote:
>> 
>> On 7/8/22 07:08, Stefan van der Walt wrote:
>> >
>> > If the aim is to merge these functions (show_config/runtime) 
>> > eventually, why not merge them now and avoid introducing another 
>> > function into the root namespace?
> 
> I'm guessing that the reason is that `show_config` is defined in 
> `numpy/__config__.py`, which is a file that is generated by `numpy.distutils 
> (deprecated). So adding to it now means having to reimplement it soon. For 
> runtime info there's also no need to put that in a build system component, 
> while for build-time info there must be such a connection somewhere. Hence I 
> think the PR is fine as is.

That makes sense. +1 from me then. 

Stéfan ___
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com


[Numpy-discussion] next NumPy Newcomers' Hour

2022-08-09 Thread Inessa Pawson
Our next Newcomers' Hour will be held this Thursday, August 11th, at 2 pm
UTC. (Please note the new time!) Stop by to ask questions or just to say hi.

To add to the meeting agenda the topics you’d like to discuss, follow the
link: https://hackmd.io/3f3otyyuTte3FU9y3QzsLg?both

Join the meeting via Zoom: https://us02web.zoom.us/j/87192457898

Cheers,
Inessa

Inessa Pawson
Contributor Experience Lead | NumPy
https://numpy.org/
Twitter: @inessapawson
___
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com