Skip to content
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

feat: Enable SIMD optimizations #107

Conversation

matthewfeickert
Copy link
Member

@matthewfeickert matthewfeickert commented Sep 7, 2024

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • [N/A] Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

@matthewfeickert
Copy link
Member Author

@conda-forge-admin, please rerender

@conda-forge-webservices
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipe/meta.yaml) and found some lint.

Here's what I've got...

For recipe/meta.yaml:

  • Selectors are suggested to take a <two spaces>#<one space>[<expression>] form. See lines [29]

* Add x86_64-microarch-level as a 'build' requirement.
   - microarch_level 4 not supported yet so only add level 1 to 3.
* Set the build number based on the microarch_level.
* Add conda_build_config.yaml with microarch_level.
* c.f. https://prefix.dev/blog/building_cpu_optimized_packages
* Bump build number.
@matthewfeickert matthewfeickert force-pushed the feat/add-simd-optimizations branch from f8c62a0 to e5501cd Compare September 7, 2024 21:30
@conda-forge-webservices
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe/meta.yaml) and found it was in an excellent condition.

@matthewfeickert matthewfeickert marked this pull request as ready for review September 7, 2024 21:48
@matthewfeickert
Copy link
Member Author

@conda-forge/iminuit this is ready for review. Let me know if you have any questions. 👍

@henryiii
Copy link
Contributor

henryiii commented Sep 7, 2024

Do you know if PR's are actually making anything faster? Some code bases can effectively use vector instructions and get a nice 2x+ speed up and some don't see much benefit.

@matthewfeickert
Copy link
Member Author

Do you know if PR's are actually making anything faster? Some code bases can effectively use vector instructions and get a nice 2x+ speed up and some don't see much benefit.

@henryiii Good question. I don't have any explict checks to show at the moment. I'll defer to you if you think this is worth doing here (and for the other ones that I've opened up), and if so I'll do some custom builds and test comparisons when I'm back from work travel in a few weeks.

@matthewfeickert
Copy link
Member Author

Placed into draft given that needs to be rebased following PR #108 and needs conda-forge/microarch-level-feedstock#10 to be resolved before can be merged.

Copy link
Contributor

@HDembinski HDembinski left a comment

Choose a reason for hiding this comment

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

I cannot review this, but I appreciate the effort and I think it sound all good.

@HDembinski
Copy link
Contributor

That being said, iminuit will not profit from such optimizations, because the minimizing algorithm is typically not the bottleneck, it is the calculation of the cost function, which ideally should be JIT-compiled for the specific architecture.

@matthewfeickert
Copy link
Member Author

That being said, iminuit will not profit from such optimizations, because the minimizing algorithm is typically not the bottleneck

Sounds good. No need to add more build complexity if it won't help, so closing this. 👍 Thanks, Hans, for the info!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants