raxis
raxis is a from-scratch re-implementation of the core of PyTorch, the ATen tensor library and the autograd engine, in C++20 with Python bindings. It is distilled from the PyTorch source: it keeps the techniques that make ATen fast (TensorIterator, vectorized kernels with runtime CPU dispatch, BLAS/MKL) without the breadth and indirection that make the original hard to read.
The goal is a codebase that someone curious about how PyTorch works inside can read end to end, while running at PyTorch speed on CPU.
Status: alpha. CPU only. Tensors with views and broadcasting, type promotion, elementwise ops, reductions, matmul, autograd, and an
nn/optimpackage with enough to train MLPs. CNN layers and CUDA are next.
Install
pip install raxis
Wheels for Windows and Linux (x86-64), Python 3.10 to 3.14. raxis has no
runtime dependencies; numpy is optional (.numpy(), raxis.from_numpy).
import raxis
from raxis import nn, optim
model = nn.Sequential(nn.Linear(784, 128), nn.ReLU(), nn.Linear(128, 10))
optimizer = optim.SGD(model.parameters(), lr=0.01, momentum=0.9)
x, y = raxis.randn((64, 784)), raxis.randint(0, 10, (64,))
loss = nn.functional.cross_entropy(model(x), y)
optimizer.zero_grad()
loss.backward()
optimizer.step()
The API follows PyTorch's, so most code only needs torch replaced by
raxis.
Inside
| Path | What it holds |
|---|---|
libraxis/raxis/tensor |
TensorImpl and storage, views and strides, type promotion, TensorIterator |
libraxis/raxis/ops |
Operators and their CPU kernels, compiled once per ISA (AVX2, NEON, ...) and picked at runtime |
libraxis/raxis/autograd |
Graph, engine and backward functions |
libraxis/bindings |
pybind11 module raxis._C |
raxis/ |
Python package: nn, optim, tensor printing |
Code taken from PyTorch keeps a // From: aten/src/ATen/... comment pointing
to the original.
Build from source
Requirements: a C++20 compiler (MSVC 17+, GCC 12+, Clang 14+), CMake 3.22+ and uv.
git clone --recursive https://github.com/pgmesa/raxis.git
cd raxis
uv sync --extra dev --extra cpu # or --extra cu130 for CUDA PyTorch
uv run python scripts/build_libraxis.py
uv run pytest tests
uv sync installs the pinned build and test dependencies from uv.lock,
including Intel MKL from PyPI and PyTorch, the reference the tests compare
against. build_libraxis.py builds libraxis with CMake and installs it into
the raxis/ package. To work on the C++ side, libraxis/CMakePresets.json
has debug and release presets; CMakeLists.txt lists the build options
(RAXIS_USE_*).
scripts/bench_ops.py benchmarks each op against PyTorch and NumPy, and
examples/ has notebooks that train MLPs on two moons and MNIST with either
raxis or PyTorch.
License
MIT. raxis includes code derived from PyTorch (BSD-3-Clause) and links SLEEF, mimalloc and Intel MKL: see THIRD_PARTY_NOTICES.txt.
Metadata
Release files for raxis 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 74.1 MB
Release files / raxis-0.1.0-cp314-cp314-win_amd64.whl
| Download URL | raxis-0.1.0-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 6.9 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
3a8ea41c8603e01a2f68effabf7b646ae3324697ebf23f1e49889ab978916504
|
|
BLAKE2b-256 checksum How to use checksums |
4cbffa61e3c6f594f0d436872e0b2ed563b23a4202856464e303e232ab315f78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.
Transparency logRelease files / raxis-0.1.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | raxis-0.1.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 8.0 MB |
| Tags | CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
b6edfa44ed3dfa0623cedff5bd1bb77c2ac5a36001b907575b20eb3a8d8c294c
|
|
BLAKE2b-256 checksum How to use checksums |
45f83773bd5b04beb30d6ac4beddd22d89b9a6640ccacd9763db6faf95e82ac0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.
Transparency logRelease files / raxis-0.1.0-cp313-cp313-win_amd64.whl
| Download URL | raxis-0.1.0-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 6.8 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
df0c90ad403314ae8f7795c70ef398aeab8404e7f9f3c4654442fed757d31157
|
|
BLAKE2b-256 checksum How to use checksums |
9074678bfbf0060d5a2a2bfceda6cdbe2b165b3b73c2adad27230a96266a52fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.
Transparency logRelease files / raxis-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | raxis-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 8.0 MB |
| Tags | CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
790e2adab8a54bc46f696d28ef3b1e52678ed24077e264a463d940d1912bca4e
|
|
BLAKE2b-256 checksum How to use checksums |
4918b469fa45696e436060f362f17d0884a9d432cb86c911c112fa53b0b9fdf1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.
Transparency logRelease files / raxis-0.1.0-cp312-cp312-win_amd64.whl
| Download URL | raxis-0.1.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 6.8 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
e87003e81afd8b0b7f194df713835841531dc6ad20dc0169747f82f27f95cde2
|
|
BLAKE2b-256 checksum How to use checksums |
b57b8ad2c96137d5df7057b3220fa402168d2d8f60af4c620abe8dc57eb593c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.
Transparency logRelease files / raxis-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | raxis-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 8.0 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
12d602ab407388faf24d31c4c7b7180a7d48d45c9f19eadc5346a80e8116dd99
|
|
BLAKE2b-256 checksum How to use checksums |
2fe09740fc72320090b8183e6715795d9655815ab72a1f2a7e50bc9dc1bf073a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.
Transparency logRelease files / raxis-0.1.0-cp311-cp311-win_amd64.whl
| Download URL | raxis-0.1.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 6.8 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
96ed1c0414486dc3cff82b1af9f4d8330a0976f0693e96748a23b66047420700
|
|
BLAKE2b-256 checksum How to use checksums |
f221251904f5644bb4a4d75761f362f8e42ce77af53ae879906f6235e21f3fb7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.
Transparency logRelease files / raxis-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | raxis-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 8.0 MB |
| Tags | CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
270fbc1e8139fcec651384bee1c838b0664e1f0b1375c28770e988fdb83078e8
|
|
BLAKE2b-256 checksum How to use checksums |
8edb7a63d5e169f7e2e17f50b67b5d3ff1cb5fd3074cda1ba723d971df082cb4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.
Transparency logRelease files / raxis-0.1.0-cp310-cp310-win_amd64.whl
| Download URL | raxis-0.1.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 6.8 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
4941401f82f0565eb185c5679618a760f5a6de90fee21594046e832dbe8307a0
|
|
BLAKE2b-256 checksum How to use checksums |
58972672db586818549d6ec61e0cd13f05bb0f7c9576cc9ce1a8fdfc8a8f2a76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.
Transparency logRelease files / raxis-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | raxis-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 8.0 MB |
| Tags | CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
88320f373ed1c2e0ada564c99e08a216962d9b01708ebab563560d9458adac92
|
|
BLAKE2b-256 checksum How to use checksums |
ad02bea08508ba75e3a2aaf6f8ecc4ebdf24645389f9330afb89ffc8462abc49
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.
Transparency logSecurity for raxis 0.1.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.
Full provenance
All 10 files in this release have been uploaded with provenance metadata.
Attestation for raxis-0.1.0-cp314-cp314-win_amd64.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.
Transparency logA 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.