Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

DigitalHub SDK Runtime Tvm

license GitHub Release Status

The Digitalhub SDK Runtime Tvm is a runtime extension for the Digitalhub SDK. It enables you to deploy model as-a-service in the Digitalhub platform.

Explore the full documentation at the link.

Quick start

To install the Digitalhub SDK Runtime Tvm, you can use pip:

pip install digitalhub-runtime-tvm

TVM run options (CORE 0.16)

Tasks contain only common settings: function, resources, profile, envs, secrets and volumes. Pass TVM-specific options to each run, not to the task. Old task options are not migrated. This branch requires the matching CORE Task-to-Run update.

import digitalhub as dh

function = dh.get_function("xinet", project="my-project")
function.run("build", simplify=True, wait=True)
function.run(
    "compile",
    target_architecture="amd64",
    optimization={"opt_level": 3, "exec_mode": "bytecode", "benchmark_runs": 10},
    tuning={"tuning_mode": "off"},
    wait=True,
)
function.run("serve", served_name="xinet", workers=1)

Build options include image, simplify, target_opset, opset_override, strict_shape_inference, data_prop, keep_params_in_input and sanitize_input_names. Compile accepts model_path to override function.ir_model; serve accepts it to override function.so_model. Other serve options are served_name, image, replicas, workers, service_type and service_name.

Compile options are serialized in optimization and tuning groups, as in CORE. Flat keyword arguments such as opt_level=3 and tuning_mode="off" are also accepted; explicit grouped values take precedence. Omitted values use CORE defaults.

CPU profiles and explicit targets

target_architecture is a profile name configured by CORE in runtime-tvm.yaml, not a fixed SDK enumeration. The console lists the configured profiles. CORE validates names and resolves any configured aliases.

For a one-off CPU configuration, omit the profile (or use auto) and pass a standard TVM target instead:

function.run(
    "compile",
    target={"kind": "llvm", "mtriple": "aarch64-linux-gnu", "mcpu": "cortex-a72"},
    optimization={"cross_cc": "aarch64-linux-gnu-g++"},
    wait=True,
)

Do not combine an explicit target with a non-auto profile. Optional optimization.cross_cc_options takes separate compiler arguments, for example ["--sysroot=/opt/sysroots/arm64"]; that directory must exist in the compile image. Omit it to inherit the profile's arguments, or pass [] to clear them. Use image when another toolchain is needed. This is Linux CPU compilation, not automatic support for another serving architecture or GPU.

tuning_mode="off" (the default) preserves but ignores all other tuning values. tune requires tuning_trials; apply requires tuning_model_path and ignores search settings. Local tuning ignores RPC fields; RPC tuning requires rpc_tracker_host, rpc_tracker_port and rpc_tracker_key, and ignores the local runner timeout. CORE also checks compatibility with the selected target, toolchain and Job resources.

Target CPU profile
auto Generic CPU of the compile node
amd64 Intel/AMD 64-bit, x86-64-v2
amd64_v3 Intel/AMD 64-bit, x86-64-v3 (AVX2)
amd64_native CPU of the AMD64 compile node; requires compatible serving hardware
arm64 Generic ARM 64-bit (AArch64)
arm64_pi5 Raspberry Pi 5, Cortex-A76
arm32 ARM 32-bit, ARMv7 hard-float with NEON

The aliases accepted by CORE (cpu, llvm, x86, x86_v3, x86_native, armv7l) resolve to these profiles without rewriting the saved run. They do not enable additional architectures.

Development

See CONTRIBUTING for contribution instructions.

Security Policy

The current release is the supported version. Security fixes are released together with all other fixes in each new release.

If you discover a security vulnerability in this project, please do not open a public issue.

Instead, report it privately by emailing us at digitalhub@fbk.eu. Include as much detail as possible to help us understand and address the issue quickly and responsibly.

Contributing

To report a bug or request a feature, please first check the existing issues to avoid duplicates. If none exist, open a new issue with a clear title and a detailed description, including any steps to reproduce if it's a bug.

To contribute code, start by forking the repository. Clone your fork locally and create a new branch for your changes. Make sure your commits follow the Conventional Commits v1.0 specification to keep history readable and consistent.

Once your changes are ready, push your branch to your fork and open a pull request against the main branch. Be sure to include a summary of what you changed and why. If your pull request addresses an issue, mention it in the description (e.g., “Closes #123”).

Please note that new contributors may be asked to sign a Contributor License Agreement (CLA) before their pull requests can be merged. This helps us ensure compliance with open source licensing standards.

We appreciate contributions and help in improving the project!

Authors

This project is developed and maintained by DSLab – Fondazione Bruno Kessler, with contributions from the open source community. A complete list of contributors is available in the project’s commit history and pull requests.

For questions or inquiries, please contact: digitalhub@fbk.eu

Copyright © 2025 DSLab – Fondazione Bruno Kessler and individual contributors.

This project is licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License. Ownership of contributions remains with the original authors and is governed by the terms of the Apache 2.0 License, including the requirement to grant a license to the project.

Metadata

Release files for digitalhub-runtime-tvm 0.16.0b4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for digitalhub-runtime-tvm 0.16.0b4
File Size Uploaded Provenance Actions
digitalhub_runtime_tvm-0.16.0b4.tar.gz 27.2 kB Without provenance Details for digitalhub_runtime_tvm-0.16.0b4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for digitalhub-runtime-tvm 0.16.0b4
File Interpreter ABI Platform Actions
digitalhub_runtime_tvm-0.16.0b4-py3-none-any.whl Python 3 none any Details for digitalhub_runtime_tvm-0.16.0b4-py3-none-any.whl

Total release size: 86.6 kB

Release files / digitalhub_runtime_tvm-0.16.0b4.tar.gz

Download URL digitalhub_runtime_tvm-0.16.0b4.tar.gz
Size 27.2 kB
Tags Source
SHA-256 checksum
How to use checksums
de760841f0c60f2106e8a7cb6111ffda0a45dc1a19c0248f09dbd781cdcfea30
BLAKE2b-256 checksum
How to use checksums
818e01d856c9908ecf990d2dfec70a7c2aff10f39787768d8d9a0c3b497c84e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / digitalhub_runtime_tvm-0.16.0b4-py3-none-any.whl

Download URL digitalhub_runtime_tvm-0.16.0b4-py3-none-any.whl
Size 59.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c7cedb437a16a232df8ef0fcfa21f78dae4f8a5199367c0bc3d4bec13bc0dec8
BLAKE2b-256 checksum
How to use checksums
af37146dd38b9c374de3f1e263399b140b89fb6693ca4e7b80bf35c2d93f9cc7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for digitalhub-runtime-tvm 0.16.0b4

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page