-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
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
dlib: improve AVX configuration #56786
Conversation
I don't think it's worth bothering with a having an option, since one can use |
I'd prefer an explicit option though: this problem seems to be fairly common (even Hydra builders are affected), if somebody experiences such a problem, he can simply turn on the build option without knowing about details like which CMake flag to set or how to add further flags to |
Especially older hardware doesn't support AVX instructions. DLib is still functional there, but significantly slower[1]. By setting `avxInstructions` to false, DLib will be compiled without this feature. [1] http://dlib.net/compile.html
There's no git tag for 1.2.3, hence we need to pin to the corresponding revision because we build from a git source. After recent breakage on Hydra[1], the tests were disabled. Although some build machines don't support AVX, we shouldn't use a DLib without AVX as the builder's result is also used on modern machines with AVX support. Before merging changes, maintainers should run the check phase locally in a `nix-shell`. [1] https://hydra.nixos.org/build/89533530
@FRidh anything else to add? I'd love to see this merged :) |
Ping @FRidh, I'd love to get this merged. It's not perfect, but let's merge this for now and wait for better platform feature detection. Unless I hear anything else from you, I'd merge and backport next Friday. |
Merging for now. Until we have a proper hardware feature detection implemented, this should be the best solution for now as it ensures that the package is buildable on all Hydra builders and you don't need to build it locally if i.e. a KVM is used to build I didn't get any further objections during the last two weeks, so this should be fine. As soon as a better detection mechanism is implemented, I'll fix |
Motivation for this change
This change aims to improve the overall situation of how AVX is used to compile DLib and its Python bindings. This PR consists of the following commits:
9732c44
: AddsavxSupport
(true by default) to thedlib
builds. If older hardware is used, DLib can be compiled without AVX.6fec5aa
: Bump face_recognition to 1.2.3 and disable the check phase for now to avoid breakage on Hydra builders without AVX support. After changes, maintainers should runcheckPhase
locally in anix-shell
.Please have a look at the full commit messages for more information.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)