mshr-h/tvm-example

Collections of Apache TVM example.

0

stars

104

commits

Python

primary language

Mar 27, 2026

updated

README

tvm-example

Collections of Apache TVM example.

Prerequisite

prepare venv and install tvm, pytorch

uv venv
source .venv/bin/activate
uv pip install cmake ninja setuptools cython pytest
uv pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
./build-tvm.sh --clean --llvm llvm-config # change if you want to use different llvm version

tvm dev

uv venv
source .venv/bin/activate
cd tvm

# build docker image
docker/build.sh ci_cpu

# run test on docker image
docker/bash.sh tlcpack/ci-cpu:20260214-152058-2a448ce4 ./tests/scripts/task_config_build_cpu.sh build
docker/bash.sh tlcpack/ci-cpu:20260214-152058-2a448ce4 python3 ./tests/scripts/task_build.py --build-dir build
docker/bash.sh tlcpack/ci-cpu:20260214-152058-2a448ce4 python3 ./tests/scripts/task_build.py --cmake-target cpptest --build-dir build
docker/bash.sh tlcpack/ci-cpu:20260214-152058-2a448ce4 ./tests/scripts/task_python_unittest.sh

# use local ci script
python tests/scripts/ci.py cpu -d tvm.ci_cpu

# lint
docker/bash.sh tlcpack/ci-lint:20260214-152058-2a448ce4 ./tests/scripts/task_lint.sh

Contributors

mshr-h

104 commits

mshr-h/tvm-example

Collections of Apache TVM example.

0

stars

104

commits

Python

primary language

Mar 27, 2026

updated

README

tvm-example

Collections of Apache TVM example.

Prerequisite

prepare venv and install tvm, pytorch

uv venv
source .venv/bin/activate
uv pip install cmake ninja setuptools cython pytest
uv pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
./build-tvm.sh --clean --llvm llvm-config # change if you want to use different llvm version

tvm dev

uv venv
source .venv/bin/activate
cd tvm

# build docker image
docker/build.sh ci_cpu

# run test on docker image
docker/bash.sh tlcpack/ci-cpu:20260214-152058-2a448ce4 ./tests/scripts/task_config_build_cpu.sh build
docker/bash.sh tlcpack/ci-cpu:20260214-152058-2a448ce4 python3 ./tests/scripts/task_build.py --build-dir build
docker/bash.sh tlcpack/ci-cpu:20260214-152058-2a448ce4 python3 ./tests/scripts/task_build.py --cmake-target cpptest --build-dir build
docker/bash.sh tlcpack/ci-cpu:20260214-152058-2a448ce4 ./tests/scripts/task_python_unittest.sh

# use local ci script
python tests/scripts/ci.py cpu -d tvm.ci_cpu

# lint
docker/bash.sh tlcpack/ci-lint:20260214-152058-2a448ce4 ./tests/scripts/task_lint.sh

Contributors

mshr-h

104 commits

Languages

Python

98.2%

Shell

1.8%