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

Fat binary that optimizes execution path with respect to CPU features at runtime instead of at compile time #10

Open
ugermann opened this issue Nov 27, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@ugermann
Copy link
Member

The current setup optimizes Marian to exploit CPU features at compile time. This is fine as long as we assume that Marian is re-compiled from scratch for each architecture it runs on. For distributable binaries, this is not possible.

Instead, Marian should determine CPU features at run time and optimize its execution path at that time by setting function pointers to functions optimized for the respective architecture / CPU type.

Google provides a library for detecting CPU features at run time: https://github.com/google/cpu_features

In my preliminary assessment it seems to be that the biggest hurdle will be to rework avx_mathfun.h and sse_mathfun.h.

@ugermann ugermann added the enhancement New feature or request label Nov 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant