SIGN IN SIGN UP

[ENH] Add AVX512 support to distance calculations (#5277)

## Description of changes

This PR adds support for AVX512 SIMD instructions for distance
calculations

requires the following target features: `avx512f`, `avx512dq`,
`avx512bw`, `avx512vl`, `fma`

tests ran on an EC2 instance with AVX512 support:

```
$ RUSTFLAGS="-C target-feature=+avx512f,+avx512dq,+avx512bw,+avx512vl,+fma,+avx,+sse" cargo +nightly test --package chroma-distance --lib

running 15 tests
test distance_avx512::tests::test_avx512_edge_cases ... ok
test distance_avx512::tests::test_spaces_avx512 ... ok
test distance_avx512::tests::test_avx512_special_values ... ok
test distance_avx::tests::test_avx_edge_cases ... ok
test distance_avx::tests::test_avx_special_values ... ok
test distance_sse::tests::test_spaces_sse ... ok
test distance_avx::tests::test_spaces_avx ... ok
test distance_sse::tests::test_sse_edge_cases ... ok
test types::tests::test_distance_function_into ... ok
test distance_sse::tests::test_sse_special_values ... ok
test types::tests::test_distance_function_l2sqr ... ok
test types::tests::test_distance_function_try_from ... ok
test distance_avx512::tests::test_avx512_random_sizes ... ok
test distance_avx::tests::test_avx_random_sizes ... ok
test distance_sse::tests::test_sse_random_sizes ... ok

test result: ok. 15 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

```

## Test plan

_How are these changes tested?_

- [ ] Tests pass locally with `pytest` for python, `yarn test` for js,
`cargo test` for rust

## Migration plan

_Are there any migrations, or any forwards/backwards compatibility
changes needed in order to make sure this change deploys reliably?_

## Observability plan

_What is the plan to instrument and monitor this change?_

## Documentation Changes

_Are all docstrings for user-facing APIs updated if required? Do we need
to make documentation changes in the [docs
section](https://github.com/chroma-core/chroma/tree/main/docs/docs.trychroma.com)?_
J
Jai Radhakrishnan committed
f459c674095301d33133905fb8b85808fcb99f5a
Parent: 23af096
Committed by GitHub <noreply@github.com> on 8/18/2025, 10:25:58 PM