Thanks to visit codestin.com
Credit goes to github.com

Skip to content

SIMD, BUG: fix reuses the previous values during the fallback to libc #17763

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 14, 2020

Conversation

seiko2plus
Copy link
Member

closes #17761

@charris charris added 00 - Bug 09 - Backport-Candidate PRs tagged should be backported component: SIMD Issues in SIMD (fast instruction sets) code or machinery labels Nov 12, 2020
@charris charris added this to the 1.19.5 release milestone Nov 12, 2020
Copy link
Member

@seberg seberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, not fluid with SIMD, but this looks good to me! Also good you noticed the sincos issue. I guess the last test could do an exact check, but probably no good reason either.

@mattip
Copy link
Member

mattip commented Nov 13, 2020

ping @r-devulap

@r-devulap
Copy link
Member

Wouldn't preventing the store from writing to these elements be a simpler and efficient fix? That is, change
_mm512_mask_storeu_pd(op, load_mask, res); to _mm512_mask_storeu_pd(op, or(glibc_mask, load_mask) , res); I think that might fix it or am I missing something?

@seiko2plus
Copy link
Member Author

@r-devulap,

I think that might fix it or am I missing something?

yes, sure it will fix it but I just tried to take advantage and slightly improve performance.

I removed unlikely hint to avoid flush the pipe and I added a constant hint
which leads to increase the performance in between 10 to 20% for mixed and out-ranged values.

@seiko2plus
Copy link
Member Author

seiko2plus commented Nov 14, 2020

actually using unlikely leads to a roughly 10% increase in performance for in-ranged values but it has a bad impact on
out-ranged values. I will update #17587 after this pr getting merged.

@charris charris merged commit 0dfbc05 into numpy:master Nov 14, 2020
@charris
Copy link
Member

charris commented Nov 14, 2020

Thanks Sayed. I expect we will be tweaking the SIMD code going forward once it is all working.

@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Nov 14, 2020
@r-devulap
Copy link
Member

actually using unlikely leads to a roughly 10% increase in performance for in-ranged values but it has a bad impact on
out-ranged values.

Very surprising to see any measurable difference with just the use of __builtin_expect .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
00 - Bug component: SIMD Issues in SIMD (fast instruction sets) code or machinery
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Invalid value in inplace log
5 participants