Build numpy without a fixed SIMD baseline in the Docker image - #94
Merged
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
v1.22.40 fails to start on the VFB Rancher/k8s hosts:
RuntimeError: NumPy was built with baseline optimizations: (X86_V2) but your machine doesn't support: (X86_V2)No VFBquery code changed. vfb_connect 2.4.1/2.4.2 (21 Aug) dropped the
numpy<2.0.0pin it carried in 2.3.x, so the image now resolves numpy 2.4.x. NumPy 2.4 raised its default x86 baseline to x86-64-v2 (SSE4.2/POPCNT/SSSE3), and every VFB host (parsley, buttermilk, vfbk8s10) is a QEMU VM on the genericqemu64CPU model, which exposes none of those flags.This builds numpy from source in the Dockerfile with
-Dcpu-baseline=nonebefore the rest of the dependencies are installed. The result has no fixed baseline but keeps X86_V2/V3/V4 as runtime-dispatched targets, so there is no performance cost on hosts that have them. Verified: numpy 2.4.6 built this way imports cleanly and survives thepip install -e .that follows (pandas 3.0.5, vfb_connect 2.4.2). Adds roughly 3 minutes per Docker build.NUMPY_SPECbuild-arg allows pinning a version if ever needed.The underlying fix is the hypervisor CPU type for the VM fleet; once that's done this block can go.