On Sun, Aug 7, 2022 at 9:59 AM Matti Picus <matti.pi...@gmail.com> 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 <https://github.com/numpy/numpy/pull/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 > >> <http://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 <https://github.com/numpy/numpy/issues/14492> > >> (#14492) > >> [2] threadpoolctl <https://pypi.org/project/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