Enable AVX3 option for highway #21850
Labels
component: build system
Bazel, CMake, dependencies, memory checkers, linters
priority: low
type: feature request
Is your feature request related to a problem? Please describe.
See this TODO:
drake/common/BUILD.bazel
Lines 379 to 382 in 50aa30c
We should add AVX3 support so that our software can run ever faster, in case the user has that hardware.
Describe the solution you'd like
As per the TODO:
(1) Uncomment the line, so that AVX3 becomes an option that's compiled into Drake.
(2) Amend
hwy_dynamic.cc
to consult the environment variablesDRAKE_DISABLE_CPU_FEATURES
andNPY_DISABLE_CPU_FEATURES
:(a) If neither are set, then just let highway do its natural thing (probe the CPU and use the best available option), exactly how it happens today. Skip the rest of these sub-steps (b)-(d).
(b) If one or both are set, then apply a trumping order to know which environment value to use: if
DRAKE_DISABLE_CPU_FEATURES
is non-null, then turn it into a string and use it. Otherwise, fall back to using theNPY_DISABLE_CPU_FEATURES
string.(c) Parse the string following numpy's semantics, to understand which CPU features are verboten:
(d) Invoke highway target detection in such a way as to account for both the present hardware, as well as the verboten instruction sets. The goal is that verboten instruction sets are never dispatched to by Drake.
(3) As a related clean-up, for ODR safety we should also move the
HWY_DISABLED_TARGETS
definition fromcommon
into@hwy
itself, so that we have a uniform definition across the entire Drake build.The text was updated successfully, but these errors were encountered: