Skip to main content

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 under demos/inference/ and demos/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 (glslc in PATH)

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


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

munet_nn-0.1.2-cp312-cp312-manylinux_2_27_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64

munet_nn-0.1.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

munet_nn-0.1.2-cp311-cp311-manylinux_2_27_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64

munet_nn-0.1.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

munet_nn-0.1.2-cp310-cp310-manylinux_2_27_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64

munet_nn-0.1.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file munet_nn-0.1.2-cp312-cp312-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for munet_nn-0.1.2-cp312-cp312-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 21658f505ab0adb85e7ffe15b9f700f680578724d3dc90a884767b1a8f77f811
MD5 0384b3b7dadca4ffd64674344fc57cda
BLAKE2b-256 634a41c93e2401c9d1657f70e80798c5d0f472f493ac62c158cf62a597d86c82

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

File hashes

Hashes for munet_nn-0.1.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 96e254b39b0bb8bd7e25877bfe651e92803e523229efbbdb85450e2d26972eb1
MD5 1defabfd23085c403034544d9eae2303
BLAKE2b-256 5fe30b94b90939be59611eac8183b1c3089f04cf50913dad363fd6d0e45e3423

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file munet_nn-0.1.2-cp311-cp311-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for munet_nn-0.1.2-cp311-cp311-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 3775c835686f71ed3380e7842db6b4796d377be7e9233db061eca42dfe9b8a30
MD5 1306976d2db01a3c9e1f4a98b84d4ff8
BLAKE2b-256 36f4957685d07ab3b433d5bf3f3065455f217a864252617de67e962a92057b86

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

File hashes

Hashes for munet_nn-0.1.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cc2e7c68fdec51fdd58215c661cbb6bbb9800fad08aee7a0d343f5a55572a32f
MD5 83f9135290889bde7211ea82d3d88166
BLAKE2b-256 c93e0f46cbfd2cc1881b9cec82a6bc5c0759728be31fe5294059233ad2310ce2

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file munet_nn-0.1.2-cp310-cp310-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for munet_nn-0.1.2-cp310-cp310-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 1174e5846e67e9950f414201574108c3329e2b064394014466f9d24d21f7f01a
MD5 ff9c2d59ce0f5deb89d5c1a2c16f7e05
BLAKE2b-256 fd4fb4d95f7e4c821b5519c4779c5baf5321ea5b70d50dc14e49c64574072219

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

File hashes

Hashes for munet_nn-0.1.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8174b1f02bf79fefe9c5c0206450b8c9aa1488f6a96bd1877a150aba454ef5d4
MD5 74cbc3f2e0b6331efe36bea136d95380
BLAKE2b-256 30a2e85dc3f2db09755c77b1b67efe88415dded2b03007e81f59bebe2d2497ea

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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