MuNet: lightweight C++ tensor/autograd framework with Python bindings
Project description
μNet
μNet is a lightweight C++ tensor + autograd framework with Python bindings. It supports CPU, CUDA and Vulkan backends. The goal of the project is to interop with existing frameworks (torch / onnx) and allow for mixed gpu training & inference.
Setup / Runtime requirements
pip install munet_nn
μNet exposes accelerator-targeted extras for environment selection:
vulkan:
munet_nn["vk"]
cuda 13:
munet_nn["cu13_vk"]
cuda 12:
munet_nn["cu12_vk"]
These extras install ONNX Python tooling (onnx + runtime variant) but do not install CUDA or
Vulkan runtime libraries.
CUDA / Vulkan runtime expectations
For CUDA-enabled extras (for example cu12_vk and cu13_vk), μNet expects CUDA runtime libraries
(including cuBLAS) to be installed at the system level. The Python package does not provision
CUDA runtime/cuBLAS via pip.
Ensure your CUDA library directories are discoverable by the dynamic linker (for example, via
LD_LIBRARY_PATH) before running GPU backends.
For Vulkan backends, μNet expects system Vulkan runtime/driver libraries (for example
libvulkan.so.1) to be installed and discoverable by the dynamic linker.
ONNX tooling expectations
ONNX helpers in munet_nn use both onnx and onnxruntime/onnxruntime-gpu. Installing the
extras above will provision those Python dependencies. If you install base munet_nn without
extras and still want ONNX helpers (for example munet.inference.ONNXEngine), install ONNX
packages manually.
Current repository state
- Core runtime (
munet_core) is used by both training and inference surfaces. - Training APIs (
nn,optim, losses, autograd) are available in C++ and Python. - Inference APIs and serialization flows are available (
munet_inference, demos underdemos/inference/anddemos/serialization/). - Backend dispatch which includes:
- capability-based support checks,
- fallback reason accounting,
- accelerator→CPU fallback telemetry counters,
- optional fail-fast mode for unexpected accelerator fallbacks.
ENV Vars
MUNET_PROFILE=1— profiler collection + summary on process exit or manual flush.MUNET_DEBUG=1— debug logging/checks.MUNET_LOG_LEVEL=0..3— log verbosity.MUNET_DISPATCH_DECISION_DUMP=1— emit dispatch decision lines.MUNET_FAIL_FAST_ACCELERATOR_CPU_FALLBACK=1— throw immediately when a CUDA/Vulkan tensor is dispatched to CPU fallback.
Build
Requirements
- CMake 3.10+
- C++17 compiler
- Python 3.10+
- Optional: CUDA Toolkit (
nvcc) - Optional: Vulkan SDK (
glslcinPATH)
Python publishing
There are two PyPi streams for μNet. Publishing is done via release tags, dev* tags will push to the test stream and v* tags to production.
Test stream
Prod stream
When building a release ensure that the version in pyproject.toml matches the tag.
Tests
make unit-test # debug gtest (C++)
make py-test # Python integration test suite
make perf-test # opt-in perf suite (sets MUNET_RUN_PERF_TESTS=1)
For selective C++ tests:
./build/debug/munet_tests --gtest_filter=*BackendManager*
Docs
- Main docs index:
documentation/index.md - Architecture docs:
documentation/architecture/ - Performance/profiling guide:
documentation/performance/profiling.md
Serve docs locally:
pip install mkdocs mkdocs-material
mkdocs serve
Demos
See demos/README.md for the full categorized catalog:
demos/visual/(object/semantic/instance segmentation categories)demos/operators/demos/serialization/demos/inference/demos/multigpu/demos/transformers/
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 Distributions
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 munet_nn-0.1.2-cp312-cp312-manylinux_2_27_x86_64.whl.
File metadata
- Download URL: munet_nn-0.1.2-cp312-cp312-manylinux_2_27_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.12, manylinux: glibc 2.27+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21658f505ab0adb85e7ffe15b9f700f680578724d3dc90a884767b1a8f77f811
|
|
| MD5 |
0384b3b7dadca4ffd64674344fc57cda
|
|
| BLAKE2b-256 |
634a41c93e2401c9d1657f70e80798c5d0f472f493ac62c158cf62a597d86c82
|
Provenance
The following attestation bundles were made for munet_nn-0.1.2-cp312-cp312-manylinux_2_27_x86_64.whl:
Publisher:
wheels.yml on bryan-pakulski/MuNet
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
munet_nn-0.1.2-cp312-cp312-manylinux_2_27_x86_64.whl -
Subject digest:
21658f505ab0adb85e7ffe15b9f700f680578724d3dc90a884767b1a8f77f811 - Sigstore transparency entry: 1251447678
- Sigstore integration time:
-
Permalink:
bryan-pakulski/MuNet@a5b0600f58f32aaf3ab1e05c873145fefb9f3aa8 -
Branch / Tag:
refs/tags/v0.1.2a - Owner: https://github.com/bryan-pakulski
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@a5b0600f58f32aaf3ab1e05c873145fefb9f3aa8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file munet_nn-0.1.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: munet_nn-0.1.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.12, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96e254b39b0bb8bd7e25877bfe651e92803e523229efbbdb85450e2d26972eb1
|
|
| MD5 |
1defabfd23085c403034544d9eae2303
|
|
| BLAKE2b-256 |
5fe30b94b90939be59611eac8183b1c3089f04cf50913dad363fd6d0e45e3423
|
Provenance
The following attestation bundles were made for munet_nn-0.1.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
wheels.yml on bryan-pakulski/MuNet
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
munet_nn-0.1.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
96e254b39b0bb8bd7e25877bfe651e92803e523229efbbdb85450e2d26972eb1 - Sigstore transparency entry: 1251447645
- Sigstore integration time:
-
Permalink:
bryan-pakulski/MuNet@a5b0600f58f32aaf3ab1e05c873145fefb9f3aa8 -
Branch / Tag:
refs/tags/v0.1.2a - Owner: https://github.com/bryan-pakulski
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@a5b0600f58f32aaf3ab1e05c873145fefb9f3aa8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file munet_nn-0.1.2-cp311-cp311-manylinux_2_27_x86_64.whl.
File metadata
- Download URL: munet_nn-0.1.2-cp311-cp311-manylinux_2_27_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.11, manylinux: glibc 2.27+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3775c835686f71ed3380e7842db6b4796d377be7e9233db061eca42dfe9b8a30
|
|
| MD5 |
1306976d2db01a3c9e1f4a98b84d4ff8
|
|
| BLAKE2b-256 |
36f4957685d07ab3b433d5bf3f3065455f217a864252617de67e962a92057b86
|
Provenance
The following attestation bundles were made for munet_nn-0.1.2-cp311-cp311-manylinux_2_27_x86_64.whl:
Publisher:
wheels.yml on bryan-pakulski/MuNet
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
munet_nn-0.1.2-cp311-cp311-manylinux_2_27_x86_64.whl -
Subject digest:
3775c835686f71ed3380e7842db6b4796d377be7e9233db061eca42dfe9b8a30 - Sigstore transparency entry: 1251447666
- Sigstore integration time:
-
Permalink:
bryan-pakulski/MuNet@a5b0600f58f32aaf3ab1e05c873145fefb9f3aa8 -
Branch / Tag:
refs/tags/v0.1.2a - Owner: https://github.com/bryan-pakulski
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@a5b0600f58f32aaf3ab1e05c873145fefb9f3aa8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file munet_nn-0.1.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: munet_nn-0.1.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.11, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc2e7c68fdec51fdd58215c661cbb6bbb9800fad08aee7a0d343f5a55572a32f
|
|
| MD5 |
83f9135290889bde7211ea82d3d88166
|
|
| BLAKE2b-256 |
c93e0f46cbfd2cc1881b9cec82a6bc5c0759728be31fe5294059233ad2310ce2
|
Provenance
The following attestation bundles were made for munet_nn-0.1.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
wheels.yml on bryan-pakulski/MuNet
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
munet_nn-0.1.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
cc2e7c68fdec51fdd58215c661cbb6bbb9800fad08aee7a0d343f5a55572a32f - Sigstore transparency entry: 1251447633
- Sigstore integration time:
-
Permalink:
bryan-pakulski/MuNet@a5b0600f58f32aaf3ab1e05c873145fefb9f3aa8 -
Branch / Tag:
refs/tags/v0.1.2a - Owner: https://github.com/bryan-pakulski
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@a5b0600f58f32aaf3ab1e05c873145fefb9f3aa8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file munet_nn-0.1.2-cp310-cp310-manylinux_2_27_x86_64.whl.
File metadata
- Download URL: munet_nn-0.1.2-cp310-cp310-manylinux_2_27_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.10, manylinux: glibc 2.27+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1174e5846e67e9950f414201574108c3329e2b064394014466f9d24d21f7f01a
|
|
| MD5 |
ff9c2d59ce0f5deb89d5c1a2c16f7e05
|
|
| BLAKE2b-256 |
fd4fb4d95f7e4c821b5519c4779c5baf5321ea5b70d50dc14e49c64574072219
|
Provenance
The following attestation bundles were made for munet_nn-0.1.2-cp310-cp310-manylinux_2_27_x86_64.whl:
Publisher:
wheels.yml on bryan-pakulski/MuNet
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
munet_nn-0.1.2-cp310-cp310-manylinux_2_27_x86_64.whl -
Subject digest:
1174e5846e67e9950f414201574108c3329e2b064394014466f9d24d21f7f01a - Sigstore transparency entry: 1251447661
- Sigstore integration time:
-
Permalink:
bryan-pakulski/MuNet@a5b0600f58f32aaf3ab1e05c873145fefb9f3aa8 -
Branch / Tag:
refs/tags/v0.1.2a - Owner: https://github.com/bryan-pakulski
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@a5b0600f58f32aaf3ab1e05c873145fefb9f3aa8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file munet_nn-0.1.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: munet_nn-0.1.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.10, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8174b1f02bf79fefe9c5c0206450b8c9aa1488f6a96bd1877a150aba454ef5d4
|
|
| MD5 |
74cbc3f2e0b6331efe36bea136d95380
|
|
| BLAKE2b-256 |
30a2e85dc3f2db09755c77b1b67efe88415dded2b03007e81f59bebe2d2497ea
|
Provenance
The following attestation bundles were made for munet_nn-0.1.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
wheels.yml on bryan-pakulski/MuNet
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
munet_nn-0.1.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
8174b1f02bf79fefe9c5c0206450b8c9aa1488f6a96bd1877a150aba454ef5d4 - Sigstore transparency entry: 1251447651
- Sigstore integration time:
-
Permalink:
bryan-pakulski/MuNet@a5b0600f58f32aaf3ab1e05c873145fefb9f3aa8 -
Branch / Tag:
refs/tags/v0.1.2a - Owner: https://github.com/bryan-pakulski
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@a5b0600f58f32aaf3ab1e05c873145fefb9f3aa8 -
Trigger Event:
push
-
Statement type: