question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BUG: AVX-512 path for `ufunc.accumulate` is broken

See original GitHub issue

We use np.minimum.accumulate in statsmodels. Recent pre-release tests have started failing on after calls to np.minimum.accumulate.

This code only fails on systems with AVX-512. Passes on systems with AVX and AVX2.

Reproducing code example:

import numpy as np
ntests = 10
pvals = np.random.random_sample(10)
pvals_corrected_raw = np.arange(ntests, 0, -1) * pvals
pvals_corrected = np.minimum.accumulate(pvals_corrected_raw[::-1])[::-1]

Failing job:

https://travis-ci.org/statsmodels/statsmodels/jobs/651893167

Error message:

No error, but wrong results. Likely strides are off since we often seem empty-like values in places.

Numpy/Python version information:

Python: 3.7.5.final.0
cython: 3.0a0
numpy: 1.19.0.dev0+4d2b585
scipy: 1.5.0.dev0+f614064 
pandas: 1.1.0.dev0+500.g06eb8db97 

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
r-devulapcommented, Feb 18, 2020

yup, taking a look …

0reactions
r-devulapcommented, Feb 19, 2020

I brought up this question when I submitted the patch (see comments https://github.com/numpy/numpy/pull/14867#issuecomment-560984763). There are no tests covering np.maximum.accumulate. Can someone help me understand under what scenarios do we expect input and output arrays to overlap in memory to ensure we haven’t missed all the use cases.

Read more comments on GitHub >

github_iconTop Results From Across the Web

used in the ufunc SIMD functions resulting in the floatstatus flags ...
The greedy path has been updated to contain more dynamic programming ideas ... Enable AVX2/AVX512 at compile timeChange to simd.inc.src to allow use...
Read more >
Release Notes — Numba 0.51.1-py3.7-linux-x86_64.egg ...
This is a bugfix release for 0.51.0, it fixes a critical bug in caching, ... Leonardo Uieda fixed a broken link to the...
Read more >
Release notes — NumPy v1.24 Manual
Release notes# · Ufunc behavior for overlapping inputs · Partial support for 64-bit f2py extensions with MinGW · Performance improvements for packbits and ......
Read more >
Release Notes — NumPy v1.15 Manual
Currently, this writeback occurs when the array objects are garbage collected, which makes this API error-prone on CPython and entirely broken ...
Read more >
New ARM MicroOS snapshot 20210927 released! - openSUSE Kubic
Update to version 2.0.30: * Remove unreachable code path * exit: report if the ... + udpsrc: Plug leaks of saddr in error...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found