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 has provisioning enabled for accelerated support detection, you can install the accelerated backends by specifying the appropriate feature targeting:

vulkan: munet_nn["vk"]

cuda 13: munet_nn["cu13_vk"]

cuda 12: munet_nn["cu12_vk"]

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.1-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.1-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.1-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.1-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.1-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.1-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.1-cp312-cp312-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for munet_nn-0.1.1-cp312-cp312-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 c37fb694e90a062a611bb666ded9760382d0f4e7fbf3f4b8ad64838926ab2fd3
MD5 079755a21c196445be9fb65332d65bc5
BLAKE2b-256 8d340fa2f8c54c3530ae9256fc89934f7ca5823c3fe71c1181dd61f25a91fe9e

See more details on using hashes here.

Provenance

The following attestation bundles were made for munet_nn-0.1.1-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.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for munet_nn-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7a0c53b5bb055288687bae905c3514b6432eb982f9293e983f06ab171c0fd5c1
MD5 c43b97120e59083f64e5bd4abaa40791
BLAKE2b-256 281f4cbbe49cc6a50977227cf1785bd49af07584a4c83eadea3c3c6e012172ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for munet_nn-0.1.1-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.1-cp311-cp311-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for munet_nn-0.1.1-cp311-cp311-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 bd7eb1efdd4f45453fac762fd19a69957148afc89e5db9b6f40706a6b50307b8
MD5 6a94f135061192cd4a0e228baaf72129
BLAKE2b-256 f10080ceb72080cfd9dbfb12e3a0dd61de64d8955d5369f4c2ff5ba1467e1f02

See more details on using hashes here.

Provenance

The following attestation bundles were made for munet_nn-0.1.1-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.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for munet_nn-0.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 402cfdfa83bbcfb70214976e901eca20728adffc60e396c100c890ebc2f48f72
MD5 3e271a2a393333ed3e279400b101ac8d
BLAKE2b-256 83f7f2b9fbbb1a9dc951b84c409c73fb489112c204c62881dfba4d9aa489cb9e

See more details on using hashes here.

Provenance

The following attestation bundles were made for munet_nn-0.1.1-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.1-cp310-cp310-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for munet_nn-0.1.1-cp310-cp310-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 b2ce7ce3e65a9399cb1adaca3f38230f379c63336dd898353499639cdfb5f22d
MD5 53da925eb709129306ff285b165dde5d
BLAKE2b-256 f18c016daf7448e49c08bacfea5202fe75fd962323a237e3d297a9584939ee06

See more details on using hashes here.

Provenance

The following attestation bundles were made for munet_nn-0.1.1-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.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for munet_nn-0.1.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fb14c7c0b6d92df7b15dcb9f87e00fc6611824c2bd3c49ea741ef5bb09d1c724
MD5 024566158750a9fe319bd698cffcff8b
BLAKE2b-256 fae5a82613d3d56575b7f7dd264676e4f764f19cf9e919d4cc715680614fbb29

See more details on using hashes here.

Provenance

The following attestation bundles were made for munet_nn-0.1.1-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