Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@zpzim
Copy link
Owner

@zpzim zpzim commented Jan 18, 2022

This PR does a couple of things:

  1. Significantly increases the chance that a compiler will be able to autovectorize the inner loops of SCAMP
  2. Adds compiler output for popular compilers (MSVC/clang/gcc) indicating which loops from the kernel were vectorized
  3. Only handles NaNs in the CPU kernel when needed, as processing the nans can cause signifigant slowdown on less sophisticated compilers (MSVC)

Overall CPU performance in situations where these benefits were not already observed is 2-4x. Further optimization may be possible (e.g. explicitly enabling AVX code generation on MSVC on platforms that support it).

Platform specific optimizations are also possible on MSVC, as it does not support -march=native which we use everywhere else. Enabling AVX on MSVC

@zpzim zpzim merged commit 0f8c54a into master Jan 19, 2022
@zpzim zpzim deleted the cpu-kernel-performance branch February 12, 2022 22:45
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