Skip to content

ENH: Add SIMD implementation for deg2rad #19779

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

Closed
wants to merge 1 commit into from

Conversation

howjmay
Copy link
Contributor

@howjmay howjmay commented Aug 29, 2021

No description provided.

@howjmay howjmay changed the title ENHL: Add SIMD operation deg2rad ENHL: Add SIMD implementation for deg2rad Aug 29, 2021
@howjmay howjmay marked this pull request as draft August 29, 2021 08:48
@howjmay howjmay force-pushed the simd-deg2rad branch 7 times, most recently from 56a43a8 to b87609d Compare August 29, 2021 10:44
@mattip mattip changed the title ENHL: Add SIMD implementation for deg2rad ENH: Add SIMD implementation for deg2rad Aug 30, 2021
@mattip mattip added the component: SIMD Issues in SIMD (fast instruction sets) code or machinery label Aug 30, 2021
@mattip
Copy link
Member

mattip commented Aug 30, 2021

When you reach the stage of asking for review, please include a benchmark that shows the impact of this PR. For an example, see the benchmarking done in #18766

@howjmay
Copy link
Contributor Author

howjmay commented Sep 1, 2021

Hi @mattip thank you for pointing out the benchmark issue. I am actually meeting problems on running the benchmark.
The only machine I have now is x86 machine with ubuntu. Is it ok to run only it?

@mattip
Copy link
Member

mattip commented Sep 1, 2021

The only machine I have now is x86 machine with ubuntu

Sure, as long as it has the needed SIMD features to run the code. You may want to throttle the machine to 80% full speed to get more consistent results.

Copy link
Member

@seiko2plus seiko2plus left a comment

Choose a reason for hiding this comment

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

similar to #19780, there's no need to implement new universal intrinsics for deg2rad, just implemented directly inside the source file that defines ufunc inner loop.

Note implement a new universal intrinsic to the interface wouldn't affect on the performance, you have to put it in context.

In the case of deg2rad, there's no need to create a new dispatch-able source for it, you can put just your implementation inside https://github.com/numpy/numpy/blob/main/numpy/core/src/umath/loops_unary_fp.dispatch.c.src.

You will have to edit the following files too:

@howjmay howjmay closed this Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
01 - Enhancement component: SIMD Issues in SIMD (fast instruction sets) code or machinery
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants