Cross-platform CPU feature detection as a frozenset of enum flags for SIMD backend selection.
Project description
goblin-cpu-features
Cross-platform CPU feature detection for packages that choose their own SIMD backend at import time.
import goblin_cpu_features as cpu
features = cpu.detect()
if {cpu.Feature.X86_AVX2, cpu.Feature.X86_FMA}.issubset(features):
from mypkg import _avx2 as impl
elif cpu.Feature.ARM_SVE2 in features:
from mypkg import _sve2 as impl
else:
from mypkg import _generic as impl
goblin_cpu_features only reports host CPU features. It does not choose or
import application backends.
Build
Local x86_64 manylinux and musllinux wheels are configured for Podman through cibuildwheel:
python -m pip install '.[dev]'
python -m cibuildwheel --platform linux --output-dir wheelhouse .
The configured x86_64 build set is CPython 3.9 through 3.14 for both
manylinux_x86_64 and musllinux_x86_64.
On non-x86 targets with pyenv-hosted interpreters, build one native wheel per interpreter from the target environment:
for minor in 3.9 3.10 3.11 3.12 3.13 3.14; do
for py in "$HOME"/.pyenv/versions/"$minor".*/bin/python; do
[ -x "$py" ] || continue
"$py" -m pip wheel --no-deps -w wheelhouse .
done
done
For manylinux or musllinux tags on those targets, run the pyenv build inside the corresponding compliant build environment or repair/tag the wheels using the target platform's normal wheel policy tooling.
goblin-cpu-features
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file goblin_cpu_features-0.1.0.tar.gz.
File metadata
- Download URL: goblin_cpu_features-0.1.0.tar.gz
- Upload date:
- Size: 24.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
daaa5b09f40b0eecc17cb083f8ff13c968793458d82dc009fbc38f90c05444ff
|
|
| MD5 |
37745bbb946d83adfe74cd4536584c21
|
|
| BLAKE2b-256 |
84f2c8638ce99b79aef8143f8a747e2e32897f717451d6c0f936bce60810ddc6
|
File details
Details for the file goblin_cpu_features-0.1.0-cp314-cp314-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: goblin_cpu_features-0.1.0-cp314-cp314-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 173.3 kB
- Tags: CPython 3.14, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f75d42a61cd5c4c8a6ae57d283ec42b7a55c5a71f04d290e657d643d2aa14a68
|
|
| MD5 |
7760da6fe83da8cc3cbebead33daa599
|
|
| BLAKE2b-256 |
9e0c627a53f3cbe3e0948731ca71088bec123590ad71ef04f741031dc05f1d55
|
File details
Details for the file goblin_cpu_features-0.1.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: goblin_cpu_features-0.1.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 74.4 kB
- Tags: CPython 3.14, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5dd9e2e36b99a57c7145ec803f9d967eec27f4dd761ea762d5e278cc8f6542c4
|
|
| MD5 |
87d3ba1b7742d39ba6cb4d42c5b4e1d8
|
|
| BLAKE2b-256 |
b3655d78e847be31fd902ae6e6c4861435dca06cd30d651c916318286a0054ee
|
File details
Details for the file goblin_cpu_features-0.1.0-cp313-cp313-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: goblin_cpu_features-0.1.0-cp313-cp313-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 173.4 kB
- Tags: CPython 3.13, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26d0c6bbac10f931928b4575110efa6ff909bd0e4ef6c79c82738b8376e94e4f
|
|
| MD5 |
fe2d96137835bdf6edf436497c22b4a8
|
|
| BLAKE2b-256 |
8fa47d5c0653aeffa50547f70f8e2818ad5ee15be75346da4126a24827500afb
|
File details
Details for the file goblin_cpu_features-0.1.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: goblin_cpu_features-0.1.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 74.5 kB
- Tags: CPython 3.13, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c83295893b543c05c4c7f92177017997fb9ce9dc19131d4613af0179a54eb68
|
|
| MD5 |
10a03a703d5d079791f09a3f43c3a087
|
|
| BLAKE2b-256 |
057a261294b7d35e71212fa66cdf4ce2b0d3d015294507b8da7e24edf6b5b273
|
File details
Details for the file goblin_cpu_features-0.1.0-cp312-cp312-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: goblin_cpu_features-0.1.0-cp312-cp312-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 173.4 kB
- Tags: CPython 3.12, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
403403246f902c66a858800b10523b66fbdae151163c80a5eef06639147df38e
|
|
| MD5 |
0d34f89315bf50c61eeff91ac2801426
|
|
| BLAKE2b-256 |
2450dae52409f6eea2f44047a7a81c9cf0bb418756ea840867483627a8a3eca2
|
File details
Details for the file goblin_cpu_features-0.1.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: goblin_cpu_features-0.1.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 74.5 kB
- Tags: CPython 3.12, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0679b6a09a5680948a06228d0a81f1fd545404cfb4f8f973d41706c130c21f8f
|
|
| MD5 |
4db60fb2d35b7c95e561b52c86038a5a
|
|
| BLAKE2b-256 |
516dd8731cb6fa3ee8820549b01f63493a81826473c994cee2ee89311c77ca4f
|
File details
Details for the file goblin_cpu_features-0.1.0-cp311-cp311-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: goblin_cpu_features-0.1.0-cp311-cp311-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 173.6 kB
- Tags: CPython 3.11, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
739a5d4695db9ab8e2dd4cb0443596620fee0bb603955730b09e57dd608e5b2e
|
|
| MD5 |
51c2c723124d3ad381141e8b7ac7449e
|
|
| BLAKE2b-256 |
836b03aace914ac267ce1943444b82ad2237e19394491ab8d88ce0389a02e70b
|
File details
Details for the file goblin_cpu_features-0.1.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: goblin_cpu_features-0.1.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 74.7 kB
- Tags: CPython 3.11, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
788eb203ae54b2eac9fe042064158594f16c0f16a3e56ce237e3a8c68a4ec8b8
|
|
| MD5 |
48947982a7495834afc4268b993b94a0
|
|
| BLAKE2b-256 |
9531195bb9bf55088409be5b7cb9d11d288c15e48de7e8d45d560e55717e381f
|
File details
Details for the file goblin_cpu_features-0.1.0-cp310-cp310-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: goblin_cpu_features-0.1.0-cp310-cp310-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 173.0 kB
- Tags: CPython 3.10, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e80f42c15455911423578432bb00898052bf583d105b89b4de64196a1e4d416
|
|
| MD5 |
b4cdd5714d1ea26a2deefaaa1bf39350
|
|
| BLAKE2b-256 |
58364388870bbd169c7f97af4872e84f02b53603c94132a1d60bd6130959674d
|
File details
Details for the file goblin_cpu_features-0.1.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: goblin_cpu_features-0.1.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 74.3 kB
- Tags: CPython 3.10, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b9b791b1a1a709f16f394ded32181d728a7aba3dc6980305a3babd9de83c573
|
|
| MD5 |
0bb1973164db59758df2e3d9b8637a8d
|
|
| BLAKE2b-256 |
f1800a861c15322ec16b7659e378d0d5595d299cbc361ca754b655cb9d89ab9e
|
File details
Details for the file goblin_cpu_features-0.1.0-cp39-cp39-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: goblin_cpu_features-0.1.0-cp39-cp39-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 173.1 kB
- Tags: CPython 3.9, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0c24749d301af6e20422a5277ca59722fec09f919e3d301478ca97758d5059f
|
|
| MD5 |
4b6770ccc4ee1efe39d2f16bbe7a6288
|
|
| BLAKE2b-256 |
cf7f53e65cd92a7e0d97358f414e99545267c6d743a338e259ebeefed79da35d
|
File details
Details for the file goblin_cpu_features-0.1.0-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: goblin_cpu_features-0.1.0-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 74.4 kB
- Tags: CPython 3.9, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0fdbf92b0a0702a81b0e655d3521936c4e81b189ffffc2ca3f96e5e511a6856
|
|
| MD5 |
ba75b689a8bca29e5a0ffa874ec6cfab
|
|
| BLAKE2b-256 |
fbaa8515d57ba3c16e7066e4ef209566043e76f6eb6bfe58c0011f96d6b76b6b
|