try refactor of L2 on simd8float32#3794
try refactor of L2 on simd8float32#3794mengdilin wants to merge 2 commits intofacebookresearch:mainfrom
Conversation
Summary: Pull Request resolved: facebookresearch#3613 As a demo for Mengdi. The steps to fully migrate to simdlib are: 1. change all function interfaces to use the generic simd8float32 and friends prototypes -- make sure it compiles on fbcode. 2. make sure it also compiles on ARM 3. see which functions can be mirgrated to only use the generic codepath 4. benchmark if the simd emulated path is competitve with the scalar (for platforms without specific SIMD support) The rationale here is that there are many SIMD instructions that are straightforward, like adding or subtracting registers, they can be put in common between implementations. The only code that may remain with arch-specific intrinsics is where they way of doing things is very different between AVX and NEON. Differential Revision: D59395882
Differential Revision: D60925434
|
This pull request was exported from Phabricator. Differential Revision: D60925434 |
|
@mengdilin please use a standard term |
| // bit shift by 16 -> uint32_t(v) << 16 | ||
|
|
||
| // load 8 as i32 and bit shift by 16 | ||
| simd8uint32 code_256i = load8_16bits_as_uint32(code, i); |
There was a problem hiding this comment.
maybe easier to load as simd32uint8 and cast to simd8uint32
|
Hi @mengdilin! Thank you for your pull request. We require contributors to sign our Contributor License Agreement, and yours needs attention. You currently have a record in our system, but the CLA is no longer valid, and will need to be resubmitted. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
Differential Revision: D60925434