Skip to content

Rewrote to_register utility - #41

Open
danieltowner wants to merge 1 commit into
mainfrom
to_register
Open

danieltowner wants to merge 1 commit into
mainfrom
to_register

Conversation

@danieltowner

Copy link
Copy Markdown
Contributor

Previously to_register would return a builtin with enough elements to fill a complete register of the appropriate size, but this often wouldn't be allowed as a parameter to an intrinsic. The new version converts the register type to the one of the common intrinsic types (e.g., __m256i, __m512d, __m128h). This simplifies intrinsic calls by allowing to_register to handle the type conversion without also requiring an explicit cast at the intrinsic call site.

This work is an important step in eliminating the use of flax-vector-conversions since it allows intrinsic calls without implicit conversions.

Previously `to_register` would return a builtin with enough elements to fill a complete register of the appropriate
size, but this often wouldn't be allowed as a parameter to an intrinsic. The new version converts the register type
to the one of the common intrinsic types (e.g., __m256i, __m512d, __m128h). This simplifies intrinsic calls by
allowing `to_register` to handle the type conversion without also requiring an explicit cast at the intrinsic call site.

This work is an important step in eliminating the use of `flax-vector-conversions` since it allows intrinsic calls
without implicit conversions.

This branch has not been deployed

No deployments
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.

1 participant