Skip to main content

A lightweight AXIR playground to run numerical kernels across CPU and OpenCL

Project description

AXIOMOS — Public Showcase (Minimal)

PyPIGitHub
License: MIT

🔒 Public showcase build — proves the critical path: AXIR JSON → CPU/OpenCL execution → numeric verification.
The private core (optimizers, scheduler, advanced kernels, cryptographic trust) remains under NDA.


🚀 TL;DR — 3-command demo

Windows (PowerShell)

pip install axiomos; or pip install "axiomos>=0.1.18"
axiomos-doctor
axiomos-demo

# optional
axiomos-devices
axiomos-smoke --size 512 --warmup 3 --repeat 30 --seed 0
macOS / Linux (zsh/bash)

pip install "axiomos>=0.1.18"
axiomos-doctor
axiomos-demo

# optional
axiomos-devices
axiomos-smoke --size 512 --warmup 3 --repeat 30 --seed 0

axiomos-doctor prints versions, attempts OpenCL discovery, and runs a softmax 8×8 sanity test.
axiomos-demo creates a tiny AXIR JSON and verifies CPU  OPENCL.
If OpenCL isnt available, it falls back to OPENCL(cpu-fallback) and still verifies ALLCLOSE (strict parity).


🆘 If a command is not recognized (universal fallback)
Use the module form (bypasses PATH issues and mixed Python installs):

Windows (PowerShell)
python -m pip install -U "axiomos>=0.1.18"
python -m axiomos.cli.axir_doctor
python -m axiomos.cli.quick_demo
python -m axiomos.cli.devices
python -m axiomos.smoke --size 512 --warmup 3 --repeat 30 --seed 0

macOS / Linux (zsh/bash)
python3 -m pip install -U "axiomos>=0.1.18"
python3 -m axiomos.cli.axir_doctor
python3 -m axiomos.cli.quick_demo
python3 -m axiomos.cli.devices
python3 -m axiomos.smoke --size 512 --warmup 3 --repeat 30 --seed 0

On Windows, if you use a virtualenv, activate it first:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install "axiomos>=0.1.18"
axiomos-doctor
axiomos-demo


🎯 What this proves (public)
Portability  the same .axir.json runs on CPU and OpenCL (or a graceful CPU fallback).

Verifiability  strict numeric parity (ALLCLOSE) with shapes, max_abs_err, timings.

Reproducibility  seedable runs, explicit versions printed.

UX  install  run  verify in minutes; no private code exposed.

Not included here (private): optimizer passes, scheduler, advanced kernels, full operator coverage, vendor-tuned implementations, and the full trust pipeline (content-addressed artifacts, Ed25519 signatures, attestations).
➡️ A full private demo is available under NDA.

🔧 Useful commands
List OpenCL devices (if PyOpenCL + drivers are present)

axiomos-devices
# universal fallback:
python -m axiomos.cli.devices
Verify a fixture (example: Softmax 8×8)
python -m axiomos.verify examples/softmax2d_small.axir.json --buffer hY --backend-a cpu --backend-b opencl --seed 0
Output includes: SHAPES, max_abs_err, ALLCLOSE (atol=1e-6, rtol=1e-5), CPU & OPENCL timings.
Note: the public OpenCL path is minimal (not optimized)  correctness, not performance.

Tiny smoke (latency indicator)
axiomos-smoke --size 512 --warmup 3 --repeat 30 --seed 0
# fallback:
python -m axiomos.smoke --size 512 --warmup 3 --repeat 30 --seed 0

🧪 Optional: PyTorch  AXIR mini-export + verify
Install PyTorch (its large; keep optional for demos):
pip install torch
Export a tiny model to AXIR JSON:
axiomos-export-torch
# fallback:

This creates:
examples/pytorch_softmax.axir.json
Verify CPU  OPENCL on the exported AXIR:

python -m axiomos.verify examples/pytorch_softmax.axir.json --buffer hY --backend-a cpu --backend-b opencl --seed 0
As with other demos: if OpenCL isnt available, verification falls back to OPENCL(cpu-fallback) and still checks numeric parity.

🧰 If you cloned the repo (extra fixtures)
Generate fixtures:

python make_fixtures.py
Creates:
examples/
 ├─ vector_add_small.axir.json
 └─ softmax2d_small.axir.json
Verify:

# CPU ↔ CPU (Hello AXIR)
axiomos-verify examples/vector_add_small.axir.json --buffer hC --backend-a cpu --backend-b cpu --seed 0

# CPU ↔ OpenCL (Softmax 8×8)
python -m axiomos.verify examples/softmax2d_small.axir.json --buffer hY --backend-a cpu --backend-b opencl --seed 0

💡 Common errors & fixes
Command not found (e.g., axiomos-devices):
Use module form (works everywhere):
python -m axiomos.cli.devices (Windows) or python3 -m axiomos.cli.devices (macOS/Linux).
On Windows, if using a venv, activate it before running commands.

No matching distribution found for axiomos
Python is likely too old. Use Python 3.10+. On macOS:
brew install python@3.11
/opt/homebrew/bin/python3.11 -m venv .venv   # Apple Silicon
# or: /usr/local/bin/python3.11 -m venv .venv # Intel
source .venv/bin/activate
python -m pip install -U pip setuptools wheel
python -m pip install -U "axiomos>=0.1.15"

Apple Silicon arch mismatch (Rosetta vs arm64):
usr/bin/arch -arm64 python3 -m venv .venv
source .venv/bin/activate
python -m pip install -U pip
python -m pip install -U "axiomos>=0.1.15"
Corporate proxy / SSL errors:
Configure pip to use your proxy or trusted certs, or install inside a VPN/approved network. (Keep the module form.)

PyTorch install is slow:
Thats expected (large wheels). Keep PyTorch optional for the demo.

Why AXIOMOS
AXIR (Axiomos IR) is a universal, hardware-agnostic IR aimed at:

Portability  compile once, run on CPU, GPU, and accelerators.

Determinism & Reproducibility  numerically verifiable parity across backends.

Trust  measured parity today; cryptographic provenance/signatures in the private build.

Longevity  a stable IR beyond todays frameworks and vendor APIs.

This public showcase is intentionally minimal: it proves AXIR JSON  multi-backend execution  verification without exposing the private core.

License
MIT (public showcase only). The full runtime remains proprietary.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

axiomos-0.1.19.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

axiomos-0.1.19-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file axiomos-0.1.19.tar.gz.

File metadata

  • Download URL: axiomos-0.1.19.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.6

File hashes

Hashes for axiomos-0.1.19.tar.gz
Algorithm Hash digest
SHA256 e2b031625ffcbb12fc5593edce853f06271927bad2cedbaca78df8b2dc3feb03
MD5 42705625dc1452634875a230f0e451fa
BLAKE2b-256 fc08cbf76d636c4732c5b259a46381100d052e3c2666557329d8fc40c367bcc4

See more details on using hashes here.

File details

Details for the file axiomos-0.1.19-py3-none-any.whl.

File metadata

  • Download URL: axiomos-0.1.19-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.6

File hashes

Hashes for axiomos-0.1.19-py3-none-any.whl
Algorithm Hash digest
SHA256 4c2bbc23b2614422da066deebc0ccbf8a85e58c1160e70de90dadefeaa3810e1
MD5 7156e840b2ee7b1fad94753c6f531efb
BLAKE2b-256 857798197c20dfbe15fae9a118f9904bd2183f20764bdca11558f6e404bbc003

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page