-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
feat: Add explicit simd implementation for one pass svd in large action spaces. #4261
Conversation
vowpalwabbit/core/src/reductions/cb/details/large_action/compute_dot_prod_simd.h
Outdated
Show resolved
Hide resolved
vowpalwabbit/core/src/reductions/cb/cb_explore_adf_large_action_space.cc
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A separate CI job should be added that turns on the compile time flag and runs the related tests (like we had for LAS while it was behind a compile time flag). It can run only for linux architectures
|
Add an explicit SIMD implementation using AVX-512 for the one pass svd part in large actions. For now, it only works with quadratic interactions.
By default, VW builds with
VW_BUILD_LAS_WITH_SIMD=ON
so it includes the SIMD binaries. The compile flag can be turned off, for example when some CI runs on unsupported architectures (or when someone building on really old platforms), but all tests should build and pass on a recent CPU.To enable vectorization at runtime, pass in
--explicit_simd
on vw command line. This flag is advisory: it only works if the program detects that the platform actually supports the needed instructions.Next steps include adding alternative implementations using other extension sets (e.g. AVX2)
, and adding automatic switching between scalar and simd code paths using CPUID info at runtime, instead of using the command-line flag.