recent changes in np.maximum.accumulate ?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

recent changes in np.maximum.accumulate ?

josef.pktd
I'm trying to track down test failures of statsmodels against recent master dev versions of numpy and scipy.

The core computation is the following in one set of tests that fail

        pvals_corrected_raw = pvals * np.arange(ntests, 0, -1)
        pvals_corrected = np.maximum.accumulate(pvals_corrected_raw)

this numpy version 
numpy-1.19.0.dev0%2B20200214184618_1f9ab28-cp38-cp38-manylinux2010_x86_64.whl
is in the test run with failures (the first time statsmodel master failed)

the previous version in the test runs didn't have these failures
 numpy-1.19.0.dev0%2B20200212232857_af0dfce-cp38-cp38-manylinux1_x86_64.whl


I'm right now just fishing for candidates for the failures. And I'm not running any dev versions on my computer.

Were there any recent changes that affect np.maximum.accumulate?

Josef




_______________________________________________
NumPy-Discussion mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/numpy-discussion
Reply | Threaded
Open this post in threaded view
|

Re: recent changes in np.maximum.accumulate ?

Sebastian Berg
On Tue, 2020-02-18 at 10:14 -0500, [hidden email] wrote:
> I'm trying to track down test failures of statsmodels against recent
> master dev versions of numpy and scipy.
>
> The core computation is the following in one set of tests that fail
>
>         pvals_corrected_raw = pvals * np.arange(ntests, 0, -1)
>         pvals_corrected = np.maximum.accumulate(pvals_corrected_raw)
>

Hmmm, the two git hashes indicate few changes between the two versions
(mainly unicode related).

However, recently there was also the addition of AVX-512F loops to
maximum, so that seems like the most reasonable candidate (although I
am unsure it changed exactly between those versions, it is also more
complex maybe due to needing a machine that supports the instructions).

Some details about the input could be nice. But if this is all that is
as input, it sounds like it should be a contiguous array? I guess it
might include subnormal numbers or NaN?

Can you open an issue with some of those details if you have them?

- Sebastian



> this numpy version
> numpy-1.19.0.dev0%2B20200214184618_1f9ab28-cp38-cp38-
> manylinux2010_x86_64.whl
> is in the test run with failures (the first time statsmodel master
> failed)
>
> the previous version in the test runs didn't have these failures
>  numpy-1.19.0.dev0%2B20200212232857_af0dfce-cp38-cp38-
> manylinux1_x86_64.whl
>
>
> I'm right now just fishing for candidates for the failures. And I'm
> not running any dev versions on my computer.
>
> Were there any recent changes that affect np.maximum.accumulate?
>
> Josef
>
>
>
> _______________________________________________
> NumPy-Discussion mailing list
> [hidden email]
> https://mail.python.org/mailman/listinfo/numpy-discussion

_______________________________________________
NumPy-Discussion mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/numpy-discussion

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: recent changes in np.maximum.accumulate ?

bashtage
In reply to this post by josef.pktd

I have tried to locally reproduce this but cannot.  I do not have AVX-512 on my machine.

 

Fortunately we dump CPU info on travis and lo and behold it has AVX-512.

 

*-cpu:0

       description: CPU

       product: Intel(R) Xeon(R) CPU

       vendor: Intel Corp.

       physical id: 1001

       bus info: cpu@0

       slot: CPU 1

       size: 2GHz

       capacity: 2GHz

       width: 64 bits

       capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp x86-64 constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves arat avx512_vnni md_clear arch_capabilities

 

Sounds like the AVX-512 path is bugged.

 

Kevin

 

 

From: [hidden email]
Sent: Tuesday, February 18, 2020 3:42 PM
To: [hidden email]
Subject: Re: [Numpy-discussion] recent changes in np.maximum.accumulate ?

 

On Tue, 2020-02-18 at 10:14 -0500, [hidden email] wrote:

> I'm trying to track down test failures of statsmodels against recent

> master dev versions of numpy and scipy.

>

> The core computation is the following in one set of tests that fail

>

>         pvals_corrected_raw = pvals * np.arange(ntests, 0, -1)

>         pvals_corrected = np.maximum.accumulate(pvals_corrected_raw)

>

 

Hmmm, the two git hashes indicate few changes between the two versions

(mainly unicode related).

 

However, recently there was also the addition of AVX-512F loops to

maximum, so that seems like the most reasonable candidate (although I

am unsure it changed exactly between those versions, it is also more

complex maybe due to needing a machine that supports the instructions).

 

Some details about the input could be nice. But if this is all that is

as input, it sounds like it should be a contiguous array? I guess it

might include subnormal numbers or NaN?

 

Can you open an issue with some of those details if you have them?

 

- Sebastian

 

 

 

> this numpy version

> numpy-1.19.0.dev0%2B20200214184618_1f9ab28-cp38-cp38-

> manylinux2010_x86_64.whl

> is in the test run with failures (the first time statsmodel master

> failed)

>

> the previous version in the test runs didn't have these failures

>  numpy-1.19.0.dev0%2B20200212232857_af0dfce-cp38-cp38-

> manylinux1_x86_64.whl

>

>

> I'm right now just fishing for candidates for the failures. And I'm

> not running any dev versions on my computer.

>

> Were there any recent changes that affect np.maximum.accumulate?

>

> Josef

>

>

>

> _______________________________________________

> NumPy-Discussion mailing list

> [hidden email]

> https://mail.python.org/mailman/listinfo/numpy-discussion

 


_______________________________________________
NumPy-Discussion mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/numpy-discussion
Reply | Threaded
Open this post in threaded view
|

Re: recent changes in np.maximum.accumulate ?

josef.pktd
In reply to this post by Sebastian Berg


On Tue, Feb 18, 2020 at 10:43 AM Sebastian Berg <[hidden email]> wrote:
On Tue, 2020-02-18 at 10:14 -0500, [hidden email] wrote:
> I'm trying to track down test failures of statsmodels against recent
> master dev versions of numpy and scipy.
>
> The core computation is the following in one set of tests that fail
>
>         pvals_corrected_raw = pvals * np.arange(ntests, 0, -1)
>         pvals_corrected = np.maximum.accumulate(pvals_corrected_raw)
>

Hmmm, the two git hashes indicate few changes between the two versions
(mainly unicode related).

However, recently there was also the addition of AVX-512F loops to
maximum, so that seems like the most reasonable candidate (although I
am unsure it changed exactly between those versions, it is also more
complex maybe due to needing a machine that supports the instructions).

Some details about the input could be nice. But if this is all that is
as input, it sounds like it should be a contiguous array? I guess it
might include subnormal numbers or NaN?

The test failures are on a Travis machine

I can extract the numbers and examples from the unit test on my Windows computer.
But, if it's machine dependent, then that might not be enough.

The main reason why maximum.accumulate might be the problem is that in some tests
we don't get monotonically increasing values, e.g.

E            x: array([0.012, 0.02 , 0.024, 0.024, 0.02 , 0.012])
E            y: array([0.012, 0.02 , 0.024, 0.024, 0.024, 0.024])

first row is computed, second row is expected

Josef

 

Can you open an issue with some of those details if you have them?

- Sebastian



> this numpy version
> numpy-1.19.0.dev0%2B20200214184618_1f9ab28-cp38-cp38-
> manylinux2010_x86_64.whl
> is in the test run with failures (the first time statsmodel master
> failed)
>
> the previous version in the test runs didn't have these failures
>  numpy-1.19.0.dev0%2B20200212232857_af0dfce-cp38-cp38-
> manylinux1_x86_64.whl
>
>
> I'm right now just fishing for candidates for the failures. And I'm
> not running any dev versions on my computer.
>
> Were there any recent changes that affect np.maximum.accumulate?
>
> Josef
>
>
>
> _______________________________________________
> NumPy-Discussion mailing list
> [hidden email]
> https://mail.python.org/mailman/listinfo/numpy-discussion
_______________________________________________
NumPy-Discussion mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/numpy-discussion

_______________________________________________
NumPy-Discussion mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/numpy-discussion