-
Notifications
You must be signed in to change notification settings - Fork 61
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
Arbor SIMD Library Refactoring #1772
Comments
Thanks for the proposal @antonf. I feel that refactoring to use
As a rule in Arbor, we have implemented future standard library features internally, and used them when they can be replaced by mature implementations in our minimum compiler versions. Given this, I think it is too early to refactor the SIMD library to be based around |
I certainly like the idea of splitting out the SVE side; it's really incompatible with the rest of the API. Regarding
For our implementations of e.g. |
Hi, just happened across this issue while searching. Have you seen https://github.com/google/highway ? It's a C++ wrapper over intrinsics that supports SVE, RISC-V, AVX-512 and others. Would be happy to discuss if you're interested. |
Hi @jan-wassenberg, thanks for the suggestion. Highway looks pretty interesting, but it's unlikely we'll change our Just to note our requirements (mostly in terms of performant operations, since this is the motivator)
|
Hi @thorstenhater , got it. Yes, RISC-V looks to be gathering momentum.
I very much respect Agner's work but he is clear that no instruction sets other than x86 will be supported.
Good to know. We have all of those except pow, and can help add that or other math functions if required. (For pow it really depends how much accuracy you want. A simple version can use log+exp already.) |
Motivation
Eventually factor out
Arbor SIMD
into a separate project and make it useful for the users outside of Arbor.Current state
Arbor SIMD
provides an API that is a variation ofstd::experimental::simd
API. It is neither subset or superset ofexperimental
.Distinctive features of
Arbor SIMD
:gather/scatter
support.SVE backend
.Observations
std::experimental::simd
provides explicit conversions from/to underlined type:std::experimetal::simd
backend model fundamentallyProposal
Let us split
Arbor SIMD
into two libraries:arbor-simd-indirect. It will depend on
std::experimental::simd
and will providegather/scatter
API in the form of free functions that acceptstd::experimental::simd
parameters. Based on the compilation target, scalar type and width it will dispatch to the proper intrinsic, usingstatic_cast
's to do simd wrapping/unwrapping. The library will not supportSVE
.arbor-simd-sve. It will depend on
std::experimental::simd
andarbor-simd-indirect
and will provide adapted to SVE simd API. This API will consist of makers that return vectors (like:arbsve::broadcast(42)
orarbsve::copy_from(ptr)
) and functions that accept vectors. If the compilation target has sve intrinsics implemetation will forward directly to them, otherwise it will fall back tostd::experimental::simd
+arbor-simd-indirect
.The text was updated successfully, but these errors were encountered: