Open
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.
Summary
This adds Windows ARM64 support for sqlite-vec's loadable extension, test workflow, and release workflow.
Why this is needed
There were two separate gaps here:
sqlite-vec.chad a real Windows ARM64 correctness bug.On MSVC Windows ARM, sqlite-vec uses a fallback for popcount because
__popcnt64is not available in the same way it is on x64. The existing fallback accepted a 32-bit argument, butdistance_hamming_u64()passes 64-bit values. That meant the upper 32 bits of each XOR result could be truncated, producing incorrect hamming distances for some bitvectors on Windows ARM64.This PR changes that fallback to operate on
u64and adds a regression test that exercises the 64-bit hamming path.Windows-on-ARM needs a native Python interpreter to run the loadable-extension tests.
uv --managed-pythoncan select or download an x64 Python under emulation on Windows-on-ARM, and that interpreter cannot load an ARM64vec0.dll(%1 is not a valid Win32 application).To make this work both locally and in CI, this PR moves the interpreter selection into the Makefile so
make test-loadableandmake test-loadable-syncautomatically use--python pythonon Windows ARM64. The Makefile also needed a small platform-detection update because GitHub's Windows jobs runmakeunder Git Bash / MSYS, whereOS=Windows_NTis not a reliable Windows check by itself.Changes
sqlite-vec.cwindows-11-armtest jobtests/uv.lockso the native Windows ARM64 test environment resolves a NumPy build withwin_arm64wheelsValidation
uv run --project tests pytest -q tests/test-loadable.py -k vec_distance_hammingwindows-11-armsucceeded using the sharedmake test-loadable-sync/make test-loadablepath: https://github.com/oddrationale/sqlite-vec/actions/runs/23320284238sqlite-distdry run generated the expected Windows ARM64 GitHub release and npm artifactsNotes
The Windows x64 test job still follows the existing behavior; the Makefile change just centralizes the Windows ARM64 interpreter selection so local development and CI use the same entry points.
Refs #73
Refs #222