Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1f9cbe4a48 | |||
| a98c55cea7 |
@@ -9,6 +9,32 @@ release `MAJOR.MINOR.PATCH` increments
|
|||||||
- `MINOR` on backwards-compatible feature additions,
|
- `MINOR` on backwards-compatible feature additions,
|
||||||
- `PATCH` on backwards-compatible bug fixes.
|
- `PATCH` on backwards-compatible bug fixes.
|
||||||
|
|
||||||
|
## [1.1.0] - 2026-05-10
|
||||||
|
|
||||||
|
Binary matrix expanded to four CPython versions on both supported
|
||||||
|
platforms.
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Pre-compiled Linux x86_64 binaries for **CPython 3.10, 3.11, 3.13**
|
||||||
|
(`sem_core12.cpython-3{10,11,13}-x86_64-linux-gnu.so`). Built in
|
||||||
|
isolated conda-forge environments with conda-forge gcc, same
|
||||||
|
OpenMP and optimisation flags as the cp312 binary.
|
||||||
|
- Pre-compiled Windows AMD64 binaries for **CPython 3.10, 3.11, 3.13**
|
||||||
|
(`sem_core12.cp3{10,11,13}-win_amd64.pyd`). Built with MSVC v14.50
|
||||||
|
against the matching CPython installed via `winget`.
|
||||||
|
|
||||||
|
### Verified
|
||||||
|
|
||||||
|
- All eight binaries (4 Linux + 4 Windows) produce identical numerical
|
||||||
|
output for the same fixed-seed input on `batch_max_similarity`.
|
||||||
|
|
||||||
|
### Compatibility notes
|
||||||
|
|
||||||
|
- macOS is still not provided in this release. Contact
|
||||||
|
`sales@sevana.biz` if you need a macOS build.
|
||||||
|
- numpy requirement unchanged: `numpy >= 1.23`.
|
||||||
|
|
||||||
## [1.0.0] - 2026-05-09
|
## [1.0.0] - 2026-05-09
|
||||||
|
|
||||||
First public release.
|
First public release.
|
||||||
|
|||||||
@@ -6,70 +6,53 @@ install time.
|
|||||||
|
|
||||||
## What is this for?
|
## What is this for?
|
||||||
|
|
||||||
`sem_cython12` is a small, focused toolbox of fast C-level routines
|
For an introduction to SEM (Similarity Energy Model) and how
|
||||||
exposed through a thin numpy wrapper. It is not a general-purpose
|
`sem_cython12` fits in, see:
|
||||||
numerical library; it accelerates three specific jobs that are
|
|
||||||
awkward or slow to do in pure numpy once `N` reaches the thousands:
|
|
||||||
|
|
||||||
1. **Similarity / distance over batches of vectors.** Full
|
- [`docs/SEM_Overview.md`](./docs/SEM_Overview.md) — non-internal
|
||||||
pairwise distance matrices, nearest-neighbour distances, and
|
introduction to SEM, what it does, and how this library fits in.
|
||||||
kernel-based `[0, 1]` similarity scores of a query set against
|
- [`docs/SEM_Mathematical_Apparatus.md`](./docs/SEM_Mathematical_Apparatus.md)
|
||||||
one or many reference sets. Useful for nearest-neighbour
|
— capabilities-level description of the operators and engines
|
||||||
search, kernel-density-style scoring, and "how close is each
|
exposed by the library.
|
||||||
query to this concept?" lookups.
|
|
||||||
2. **Multi-objective ("best-tradeoff") filtering of score matrices.**
|
|
||||||
Given a matrix of `N` candidates × `k` criteria, select the
|
|
||||||
rows on the Pareto frontier, isolate rows that only spike on a
|
|
||||||
single criterion, and recover the rows that contribute
|
|
||||||
meaningfully across several criteria - candidates a naive
|
|
||||||
sum-of-scores ranker would miss.
|
|
||||||
3. **An incremental aggregation primitive** for streaming
|
|
||||||
clustering / frontier-expansion algorithms: a fused bulk update
|
|
||||||
that, given `F` running summaries (centre + radius) and `A`
|
|
||||||
new contributions, produces all `F·A` updated summaries in one
|
|
||||||
parallel pass.
|
|
||||||
|
|
||||||
The kernels release the GIL, scale near-linearly to ~8 OpenMP
|
|
||||||
threads on commodity x86, and operate on shared-memory numpy
|
|
||||||
arrays with no inter-process serialisation. The Python wrapper
|
|
||||||
handles contiguous-float64 casting and degrades loudly (via
|
|
||||||
`available()` / `backend()` plus `RuntimeError`) when the compiled
|
|
||||||
extension cannot load on the host - there is no slow pure-Python
|
|
||||||
fallback path.
|
|
||||||
|
|
||||||
The [`demos/`](./demos/) directory contains three runnable
|
|
||||||
end-to-end examples (Iris boundary discovery, parameter-free
|
|
||||||
anomaly detection, multi-criteria candidate selection) that
|
|
||||||
exercise these three jobs against well-known baselines.
|
|
||||||
|
|
||||||
## Contents
|
## Contents
|
||||||
|
|
||||||
- `sem_cython12/sem_core12.cpython-312-x86_64-linux-gnu.so` -
|
- `sem_cython12/sem_core12.cpython-3{10,11,12,13}-x86_64-linux-gnu.so` -
|
||||||
compiled extension (Linux, CPython 3.12, x86_64).
|
compiled extensions (Linux, x86_64) for CPython 3.10 / 3.11 / 3.12 / 3.13.
|
||||||
- `sem_cython12/sem_core12.cp312-win_amd64.pyd` -
|
- `sem_cython12/sem_core12.cp3{10,11,12,13}-win_amd64.pyd` -
|
||||||
compiled extension (Windows, CPython 3.12, AMD64).
|
compiled extensions (Windows, AMD64) for CPython 3.10 / 3.11 / 3.12 / 3.13.
|
||||||
- `sem_cython12/wrapper.py` - Python API.
|
- `sem_cython12/wrapper.py` - Python API.
|
||||||
- `sem_cython12/__init__.py` - package entry.
|
- `sem_cython12/__init__.py` - package entry.
|
||||||
|
|
||||||
|
Python's import system selects the correct binary for the running
|
||||||
|
interpreter automatically — install the whole package and the right
|
||||||
|
`.so` / `.pyd` is picked up by ABI tag.
|
||||||
|
|
||||||
## Compatibility
|
## Compatibility
|
||||||
|
|
||||||
| Platform | Architecture | Python | Runtime requirements |
|
| Platform | Architecture | Python | Runtime requirements |
|
||||||
|-----------------|--------------|-----------|-----------------------------|
|
|-----------------|--------------|------------------------|-----------------------------|
|
||||||
| Linux | x86_64 | CPython 3.12 | glibc >= 2.31, libgomp |
|
| Linux | x86_64 | CPython 3.10/3.11/3.12/3.13 | glibc >= 2.31, libgomp |
|
||||||
| Windows 10/11 | AMD64 | CPython 3.12 | vcomp (ships with Windows) |
|
| Windows 10/11 | AMD64 | CPython 3.10/3.11/3.12/3.13 | vcomp (ships with Windows) |
|
||||||
| macOS | - | - | not provided (contact sales@sevana.biz) |
|
| macOS | - | - | not provided (contact sales@sevana.biz) |
|
||||||
|
|
||||||
Single Python dependency: `numpy >= 1.23` (see `requirements.txt`).
|
Single Python dependency: `numpy >= 1.23` (see `requirements.txt`).
|
||||||
|
|
||||||
## How the binaries were built
|
## How the binaries were built
|
||||||
|
|
||||||
- **Linux (`*.so`)**: gcc 13.3, OpenMP via `libgomp`, flags
|
- **Linux (`*.so`), cp312**: system gcc 13.3 on Ubuntu, OpenMP via
|
||||||
`-O3 -ffast-math -march=native -fopenmp`.
|
`libgomp`, flags `-O3 -ffast-math -march=native -fopenmp`.
|
||||||
- **Windows (`*.pyd`)**: MSVC v14.50 (Visual Studio Build Tools 2026),
|
- **Linux (`*.so`), cp310 / cp311 / cp313**: conda-forge gcc inside
|
||||||
OpenMP via `vcomp`, flags `/O2 /openmp`.
|
isolated `python=3.10/3.11/3.13` envs (clean, system-Python-free
|
||||||
|
build), same OpenMP and optimisation flags.
|
||||||
|
- **Windows (`*.pyd`), all four versions**: MSVC v14.50 (Visual Studio
|
||||||
|
Build Tools 2026), OpenMP via `vcomp`, flags `/O2 /openmp`. Each
|
||||||
|
built against the matching CPython interpreter installed via
|
||||||
|
`winget`.
|
||||||
|
|
||||||
Both binaries target CPython 3.12 (cp312) ABI. No other Python
|
All eight binaries pass the same numerical smoke test
|
||||||
version is supported in this release.
|
(`batch_max_similarity` over fixed-seed data) and produce identical
|
||||||
|
output to within float64 round-off.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
@@ -147,15 +130,6 @@ internally cast to contiguous `float64`. Outputs are numpy arrays.
|
|||||||
|
|
||||||
See the wrapper docstrings for exact semantics of each function.
|
See the wrapper docstrings for exact semantics of each function.
|
||||||
|
|
||||||
## Documentation
|
|
||||||
|
|
||||||
- [`docs/SEM_Overview.md`](./docs/SEM_Overview.md) — non-internal
|
|
||||||
introduction to SEM (Similarity Energy Model), what it does, and
|
|
||||||
how the `sem_cython12` library fits in.
|
|
||||||
- [`docs/SEM_Mathematical_Apparatus.md`](./docs/SEM_Mathematical_Apparatus.md)
|
|
||||||
— capabilities-level description of the operators and engines
|
|
||||||
exposed by the library.
|
|
||||||
|
|
||||||
## Demos
|
## Demos
|
||||||
|
|
||||||
Three runnable demos live in [`demos/`](./demos/):
|
Three runnable demos live in [`demos/`](./demos/):
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user