CPU Dispatch incompatible with higher CPU baselines
Our CC toolchain supports (in at least 1 production deployment) AVX by default but not AVX2. Using CPU dispatch in this case seemingly requires patching the CPU dispatch mechanism. In this case we don't need to compile lower architectures at all, and then the CPU dispatch mechanism should ellide architectures that are lower than the baseline. Otherwise we get undefined symbols, because the way kernel.cc decides which header to include is based on the capabilities of the compiler. An alternative solution would be to pass defines ourselves indicating which dispatch we are building when building for cpu dispatch, instead of relying on __AVX__ and friends.
We will likely fix this issue internally, but would like to know if it is likely that a patch addressing this could be accepted.
Is export CT2_FORCE_CPU_ISA=AVX not sufficient?