# Scikit-Learn SIMD DistanceMetrics (SLSDM)
## Install from pip
Run `pip install slsdm`. Note that the premade wheels are only built with support for `SSE2, SSE3` instructions.
## Install From Source:
1. Create a new environment with `xsimd`: `conda create -n <env_name> -c conda-forge python~=3.10.0 compilers`
2. Activate the environment: `conda activate <env_name>`
3. Run `pip install -e .`
**Warning**: At this point, building from source only works with `gcc`. Support for `clang` and `MSVC` is in progress.
## Specify SIMD Target Architectures
By default, `slsdm` will be built with `{SSE3, SSE2}` support. The preferred architectures can be specified at build time using the `SLSDM_SIMD_ARCH` environment variable by passing a comma-separated list of architecture specification tokens. Currently, only `x86_64` CPU features are supported. Specifically, the following features are available:
```
Instruction Set | Specification Tokens
======================================
AVX512BW | avx512bw
AVX512DQ | avx512dq
AVX512CD | avx512cd
AVX512F | avx512f
FMA4 | fma4
FMA3 + AVX2 | fma3, avx2
AVX2 | avx2
FMA3 + AVX | fma3, avx
AVX | avx
FMA3 + SSE4.2 | fma3, sse4_2
SSE4.2 | sse4_2
SSE4.1 | sse4_1
SSSE3 | ssse3
SSE3 | sse3
SSE2 | sse2
```
For example, to build for `{SSE3, AVX, FMA 3 + AVX, AVX2}` one would specify `SLSDM_SIMD_ARCH="sse3, avx, fma3<xs::avx>, avx2"`.
You may also prefer to specify features *up to*, and optionally including, a certain instruction. For that, you may prepend a specification token with `<` (exclusive) or `<=` (inclusive). For example, to build for `{SSE2, SSE3, SSSE3, AVX2}` one would specify `SLSDM_SIMD_ARCH="<=ssse3, avx2"`.
You can also disable specific features that would otherwise be enabled by your specification by prepending the `~` symbol to the specification token. For example, to build for `{SSE4_2, SSE4_1, SSE3, SSE2}`, one would specify `SLSDM_SIMD_ARCH="<=sse4_2, !ssse3"`. Note that the specification will be resolved in a left-to-right order, so `SLSDM_SIMD_ARCH="!ssse3, <=sse4_2"` would not produce equivalent results, and indeed still generates `SSSE3` instructions.
To include `FMA3` combination instruction sets, include `fma3` in the `SLSDM_SIMD_ARCH` specification and any compatible instruction sets will automatically be enabled. For example, `SLSDM_SIMD_ARCH="fma3, <=avx"` will enable `{FMA3 + AVX, AVX, FMA3 + SSE4.2, SSE4.2, SSE4.1, SSSE3, SSE3, SSE2}`.
**Warning**: Runtime dispatch is not yet correctly supported. When distributing to other machines, please build only with SIMD sets that all target machines support.
Metadata
Release files for slsdm 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| slsdm-0.2.0.tar.gz | 14.2 kB | Without provenance | Details for slsdm-0.2.0.tar.gz |
Built distributions (wheels)
Total release size: 1.6 MB
Release files / slsdm-0.2.0.tar.gz
| Download URL | slsdm-0.2.0.tar.gz |
|---|---|
| Size | 14.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0ad3caeaa723a18e911bc6888206fc171a0b22a93881fec7bf4c29b9fc6697ca
|
|
BLAKE2b-256 checksum How to use checksums |
a4b2864289beed3d2b2a7183af89cca9681619995bfe1b1822ccf6760fd2338a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / slsdm-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | slsdm-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 212.5 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
482060552692719ae8deaea7faec33035315498df2fec6deb705e7a92abf5186
|
|
BLAKE2b-256 checksum How to use checksums |
681715f77525a705a4ff7941318b31286b2e055e731a45ee2a3a811786796055
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / slsdm-0.2.0-cp311-cp311-macosx_10_9_x86_64.whl
| Download URL | slsdm-0.2.0-cp311-cp311-macosx_10_9_x86_64.whl |
|---|---|
| Size | 183.6 kB |
| Tags | CPython 3.11 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
a3b6ce56ea91dc6c9bdc2a191e2357cfd8fa12a8db0bb944e6c3490923e29b94
|
|
BLAKE2b-256 checksum How to use checksums |
158b7826dedeb7a8708f8ac89f476a16b84ee339ed79ac3c95453d1ff7cd5f1a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / slsdm-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | slsdm-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 212.6 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
0f24a5441ca5517759ec59028425a40fecd5fb5b14f7e751772b92316e78bed9
|
|
BLAKE2b-256 checksum How to use checksums |
b83fb8259e1ff3df436a3557cd5986cc9f4b8a414697c6efc3d291b7fb22d7eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / slsdm-0.2.0-cp310-cp310-macosx_10_9_x86_64.whl
| Download URL | slsdm-0.2.0-cp310-cp310-macosx_10_9_x86_64.whl |
|---|---|
| Size | 182.8 kB |
| Tags | CPython 3.10 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
16da2de4d2e32af76e066e58a2decac3c3207069afd4c7db8ad84e9d817d2d94
|
|
BLAKE2b-256 checksum How to use checksums |
4cfe555080b1703799fa458e91ed2133120ecebd9853ba936647577a0790bd8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / slsdm-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | slsdm-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 213.2 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
a40c7677dfb7ca0d291a11565d2d13e91012059b300e648926d0ef63f0cbdec1
|
|
BLAKE2b-256 checksum How to use checksums |
40180f9b5336399873ee6280b90c8b44f041b091409f7eaae29052be5f5d1b13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / slsdm-0.2.0-cp39-cp39-macosx_10_9_x86_64.whl
| Download URL | slsdm-0.2.0-cp39-cp39-macosx_10_9_x86_64.whl |
|---|---|
| Size | 183.4 kB |
| Tags | CPython 3.9 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
84a6c9c22b873ea14621ede1eb080497d2fb1f270064c43953d5ecdfa83c8ab7
|
|
BLAKE2b-256 checksum How to use checksums |
3b53f28fab0f63d89f048ee5a46edbad9a4ac252fca10840749ea28efb350399
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / slsdm-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | slsdm-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 213.7 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
c9c667c17938a011352aeb06edf594641e6e0bdb5a9d1976d2d72e8e8b3ef6f9
|
|
BLAKE2b-256 checksum How to use checksums |
4fd6e93d5ce781d7c2b807b5ec6bfb0b1a374829fea4ad6fbd2e99767ae10688
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / slsdm-0.2.0-cp38-cp38-macosx_10_9_x86_64.whl
| Download URL | slsdm-0.2.0-cp38-cp38-macosx_10_9_x86_64.whl |
|---|---|
| Size | 182.7 kB |
| Tags | CPython 3.8 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
3f197921ac77f866b1c11028f9efbb486bc32d87a7d31d3ddf2346f095328e42
|
|
BLAKE2b-256 checksum How to use checksums |
e406f0396d49551e5223b08eccdba36a48da05b5e6869aa3994cdc1a5a4d5667
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Security for slsdm 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.