├── apps ├── extension │ └── .gitignore ├── sgx │ ├── .gitignore │ ├── .rustfmt.toml │ └── .cargo │ │ └── config ├── android_rpc │ ├── app │ │ ├── .gitignore │ │ └── src │ │ │ └── main │ │ │ └── res │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ └── mipmap-mdpi │ │ │ └── ic_launcher.png │ ├── .gitignore │ ├── settings.gradle │ ├── gradle.properties │ └── dev_tools │ │ └── gen_keystore.sh ├── dso_plugin_module │ └── .gitignore ├── ios_rpc │ └── .gitignore ├── android_deploy │ ├── app │ │ └── .gitignore │ ├── .gitignore │ ├── settings.gradle │ ├── gradle.properties │ └── dev_tools │ │ └── gen_keystore.sh ├── microtvm │ ├── zephyr_cmsisnn │ │ ├── .gitignore │ │ ├── model │ │ │ └── labels.txt │ │ └── prj.conf │ ├── reference-vm │ │ ├── .gitignore │ │ └── base-box │ │ │ └── .gitignore │ ├── cmsisnn │ │ └── .gitignore │ ├── zephyr │ │ └── template_project │ │ │ └── qemu-hack │ │ │ ├── qemu-system-arm │ │ │ ├── qemu-system-riscv32 │ │ │ ├── qemu-system-riscv64 │ │ │ └── qemu-system-xilinx-aarch64 │ └── ethosu │ │ └── .gitignore ├── android_camera │ ├── models │ │ └── requirements.txt │ ├── .gitignore │ ├── settings.gradle │ ├── gradle.properties │ ├── app │ │ └── src │ │ │ └── main │ │ │ └── res │ │ │ ├── values │ │ │ └── strings.xml │ │ │ └── xml │ │ │ └── provider_paths.xml │ └── dev_tools │ │ └── gen_keystore.sh ├── wasm-standalone │ ├── .gitignore │ └── wasm-graph │ │ └── .cargo │ │ └── config └── uma │ └── _template │ └── __init__.py ├── ci ├── jenkins │ ├── .gitignore │ └── templates │ │ └── utils │ │ └── Test.groovy.j2 └── scripts │ └── github │ └── __init__.py ├── src ├── runtime │ └── crt │ │ └── .gitignore ├── meta_schedule │ └── schedule │ │ └── x86 │ │ └── .gitignore └── target │ └── opt │ └── README ├── web ├── .eslintignore ├── .gitignore ├── typedoc.json ├── tsconfig.json └── .eslintrc.json ├── docs ├── topic │ └── vta │ │ └── .gitignore ├── .gitignore ├── _static │ └── img │ │ ├── tvm-logo-small.png │ │ ├── tvm-logo-square.png │ │ └── README ├── genindex.rst ├── how_to │ └── profile │ │ └── index.rst └── reference │ └── api │ └── python │ ├── rpc.rst │ ├── error.rst │ ├── micro.rst │ ├── target.rst │ ├── graph_executor.rst │ ├── driver.rst │ └── relay │ └── nn.rst ├── docker ├── python │ └── bootstrap │ │ ├── .gitignore │ │ └── lockfiles │ │ ├── requirements-3.7.txt │ │ └── requirements-3.8.txt ├── utils │ └── apt-install-and-clear.sh └── install │ ├── ubuntu_install_gluoncv.sh │ ├── ubuntu_install_coreml.sh │ ├── ubuntu_install_mxnet.sh │ ├── ubuntu_install_paddle.sh │ ├── ubuntu_install_vela.sh │ ├── ubuntu_install_dgl.sh │ ├── ubuntu_install_tensorflow.sh │ └── ubuntu_setup_tz.sh ├── tests ├── micro │ ├── arduino │ │ └── .gitignore │ ├── .gitignore │ ├── stm32 │ │ ├── .clang-format │ │ └── conftest.py │ ├── testdata │ │ └── mnist │ │ │ ├── digit-2.jpg │ │ │ ├── digit-9.jpg │ │ │ └── mnist-8.onnx │ ├── __init__.py │ ├── common │ │ ├── __init__.py │ │ └── conftest.py │ ├── zephyr │ │ └── __init__.py │ └── project_api │ │ └── __init__.py ├── cpp │ └── .gitignore ├── scripts │ ├── release │ │ └── .gitignore │ ├── task_clean.sh │ └── task_python_integration_i386only.sh ├── python │ ├── contrib │ │ ├── test_arm_compute_lib │ │ │ ├── test_config.json │ │ │ └── __init__.py │ │ ├── test_bnns │ │ │ └── __init__.py │ │ ├── test_clml │ │ │ └── __init__.py │ │ ├── test_hexagon │ │ │ ├── topi │ │ │ │ ├── __init__.py │ │ │ │ └── slice_op │ │ │ │ │ └── __init__.py │ │ │ ├── __init__.py │ │ │ ├── conv2d │ │ │ │ └── __init__.py │ │ │ └── metaschedule_e2e │ │ │ │ └── __init__.py │ │ ├── test_cmsisnn │ │ │ └── __init__.py │ │ ├── test_ethosn │ │ │ └── __init__.py │ │ ├── test_ethosu │ │ │ ├── cascader │ │ │ │ └── __init__.py │ │ │ └── __init__.py │ │ ├── test_vitis_ai │ │ │ └── __init__.py │ │ └── test_verilator │ │ │ └── __init__.py │ ├── ci │ │ └── __init__.py │ └── integration │ │ └── __init__.py └── lint │ ├── rat-excludes │ ├── jnilint.sh │ └── flake8.sh ├── include └── tvm │ └── meta_schedule │ └── schedule │ ├── cpu │ └── .gitignore │ └── x86 │ └── .gitignore ├── rust ├── tvm-graph-rt │ └── tests │ │ ├── .gitignore │ │ └── test_wasm32 │ │ └── .cargo │ │ └── config ├── .gitignore ├── tvm │ ├── tests │ │ └── basics │ │ │ └── .gitignore │ ├── .gitignore │ ├── src │ │ ├── compiler │ │ │ └── mod.rs │ │ ├── runtime │ │ │ └── mod.rs │ │ └── ir │ │ │ └── relay │ │ │ └── attrs │ │ │ └── mod.rs │ └── .travis.yml └── tvm-rt │ └── .gitignore ├── vta ├── tutorials │ ├── autotvm │ │ └── README.txt │ ├── optimize │ │ └── README.txt │ ├── frontend │ │ └── README.txt │ └── README.txt └── python │ └── vta │ ├── exec │ └── __init__.py │ └── testing │ └── __init__.py ├── python ├── .gitignore └── tvm │ ├── contrib │ ├── target │ │ └── __init__.py │ ├── cuda_graph │ │ └── __init__.py │ ├── debugger │ │ └── __init__.py │ ├── ethosu │ │ ├── __init__.py │ │ └── cascader │ │ │ └── _ffi_api.py │ ├── hexagon │ │ └── __init__.py │ ├── tf_op │ │ └── __init__.py │ └── cutlass │ │ ├── _ffi_api.py │ │ └── __init__.py │ ├── topi │ ├── arm_cpu │ │ └── mprofile │ │ │ ├── dsp │ │ │ ├── __init__.py │ │ │ └── micro_kernel │ │ │ │ └── __init__.py │ │ │ └── __init__.py │ ├── cpp │ │ ├── nn.py │ │ ├── impl.py │ │ ├── utils.py │ │ ├── x86.py │ │ ├── cuda.py │ │ ├── rocm.py │ │ ├── generic.py │ │ └── vision │ │ │ └── yolo.py │ ├── cuda │ │ ├── rcnn │ │ │ └── __init__.py │ │ └── ssd │ │ │ └── __init__.py │ ├── gpu │ │ └── __init__.py │ └── vision │ │ └── ssd │ │ └── __init__.py │ ├── meta_schedule │ ├── testing │ │ ├── torchbench │ │ │ └── __init__.py │ │ └── __init__.py │ ├── schedule │ │ ├── cpu │ │ │ └── __init__.py │ │ ├── x86 │ │ │ └── __init__.py │ │ ├── generic │ │ │ └── __init__.py │ │ ├── __init__.py │ │ └── cuda │ │ │ └── __init__.py │ └── _ffi_api.py │ ├── _ffi │ ├── _cy2 │ │ └── __init__.py │ ├── _cy3 │ │ └── __init__.py │ ├── _ctypes │ │ └── __init__.py │ └── _cython │ │ └── core.pyx │ ├── autotvm │ └── testing │ │ └── __init__.py │ ├── micro │ ├── project_api │ │ └── __init__.py │ ├── base.py │ └── contrib │ │ └── stm32 │ │ └── __init__.py │ ├── relay │ ├── backend │ │ ├── contrib │ │ │ ├── __init__.py │ │ │ ├── ethosu │ │ │ │ └── tir │ │ │ │ │ └── __init__.py │ │ │ └── uma │ │ │ │ └── api │ │ │ │ └── _ffi_api.py │ │ ├── _aot.py │ │ ├── _vm.py │ │ └── __init__.py │ ├── std │ │ └── core.rly │ ├── op │ │ ├── _make.py │ │ ├── nn │ │ │ └── _make.py │ │ ├── dyn │ │ │ ├── _make.py │ │ │ ├── nn │ │ │ │ ├── _make.py │ │ │ │ └── __init__.py │ │ │ └── image │ │ │ │ ├── _make.py │ │ │ │ └── __init__.py │ │ ├── image │ │ │ ├── _make.py │ │ │ └── __init__.py │ │ ├── vm │ │ │ ├── _ffi_api.py │ │ │ └── __init__.py │ │ ├── memory │ │ │ └── _make.py │ │ ├── random │ │ │ ├── _make.py │ │ │ └── __init__.py │ │ ├── vision │ │ │ └── _make.py │ │ └── annotation │ │ │ ├── _make.py │ │ │ └── __init__.py │ ├── _ffi_api.py │ ├── qnn │ │ └── op │ │ │ └── _make.py │ ├── _ffi_api_parser.py │ ├── analysis │ │ └── _ffi_api.py │ ├── collage │ │ └── _ffi_api.py │ ├── transform │ │ └── _ffi_api.py │ ├── dataflow_pattern │ │ └── _ffi.py │ └── quantize │ │ └── _quantize.py │ ├── exec │ └── __init__.py │ ├── driver │ ├── __init__.py │ ├── _ffi_api.py │ └── tvmc │ │ └── __main__.py │ ├── ir │ ├── _ffi_api.py │ ├── _ffi_instrument_api.py │ ├── _ffi_transform_api.py │ └── diagnostics │ │ └── _ffi_api.py │ ├── rpc │ └── _ffi_api.py │ ├── te │ └── _ffi_api.py │ ├── tir │ ├── _ffi_api.py │ ├── usmp │ │ ├── _ffi_api.py │ │ ├── analysis │ │ │ ├── _ffi_api.py │ │ │ └── __init__.py │ │ └── transform │ │ │ └── _ffi_api.py │ ├── analysis │ │ ├── _ffi_api.py │ │ └── __init__.py │ ├── transform │ │ └── _ffi_api.py │ ├── tensor_intrin │ │ └── __init__.py │ └── schedule │ │ └── _ffi_api.py │ ├── arith │ └── _ffi_api.py │ ├── script │ ├── ir_builder │ │ ├── __init__.py │ │ ├── ir │ │ │ ├── __init__.py │ │ │ └── _ffi_api.py │ │ ├── tir │ │ │ └── _ffi_api.py │ │ └── _ffi_api.py │ ├── parser │ │ ├── core │ │ │ └── __init__.py │ │ ├── __init__.py │ │ └── ir │ │ │ └── __init__.py │ ├── __init__.py │ └── printer │ │ ├── _ffi_api.py │ │ └── __init__.py │ ├── target │ └── _ffi_api.py │ ├── generic.py │ ├── testing │ └── _ffi_api.py │ ├── runtime │ └── profiling │ │ └── _ffi_api.py │ ├── utils │ └── __init__.py │ └── auto_scheduler │ └── _ffi_api.py ├── gallery ├── how_to │ ├── work_with_relay │ │ └── README.txt │ ├── work_with_schedules │ │ └── README.txt │ ├── optimize_operators │ │ └── README.txt │ ├── deploy_models │ │ └── README.txt │ ├── compile_models │ │ └── README.txt │ ├── extend_tvm │ │ └── README.txt │ ├── tune_with_autoscheduler │ │ ├── README.txt │ │ └── ci_logs │ │ │ ├── matmul.json │ │ │ └── sparse_dense.json │ ├── work_with_microtvm │ │ └── README.txt │ └── tune_with_autotvm │ │ └── README.txt └── tutorial │ └── README.txt ├── .gitattributes ├── configs ├── host │ └── default.json └── test │ ├── tune_config_test.json │ └── compile_config_test.json ├── NOTICE ├── 3rdparty ├── mlperftiny │ └── README.md ├── libcrc │ └── .gitignore └── cma │ └── settings.mk ├── .clang-format ├── .github ├── ISSUE_TEMPLATE │ └── config.yml ├── dependabot.yml └── workflows │ ├── ping_reviewers.yml │ └── nightly_docker_update.yml ├── .gitmodules ├── conda ├── build_win.bat └── recipe │ ├── install_libtvm.sh │ ├── conda_build_config.yaml │ ├── install_tvm_python.bat │ └── install_tvm_python.sh └── cmake └── modules └── contrib └── CODEGENC.cmake /apps/extension/.gitignore: -------------------------------------------------------------------------------- 1 | lib 2 | -------------------------------------------------------------------------------- /apps/sgx/.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | -------------------------------------------------------------------------------- /ci/jenkins/.gitignore: -------------------------------------------------------------------------------- 1 | /_venv 2 | -------------------------------------------------------------------------------- /src/runtime/crt/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /web/.eslintignore: -------------------------------------------------------------------------------- 1 | dist 2 | debug 3 | -------------------------------------------------------------------------------- /apps/android_rpc/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /apps/dso_plugin_module/.gitignore: -------------------------------------------------------------------------------- 1 | lib 2 | -------------------------------------------------------------------------------- /apps/ios_rpc/.gitignore: -------------------------------------------------------------------------------- 1 | rpc_config.txt 2 | -------------------------------------------------------------------------------- /docs/topic/vta/.gitignore: -------------------------------------------------------------------------------- 1 | tutorials 2 | -------------------------------------------------------------------------------- /src/meta_schedule/schedule/x86/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/android_deploy/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /apps/sgx/.rustfmt.toml: -------------------------------------------------------------------------------- 1 | ../../rust/.rustfmt.toml -------------------------------------------------------------------------------- /docker/python/bootstrap/.gitignore: -------------------------------------------------------------------------------- 1 | /_venv 2 | -------------------------------------------------------------------------------- /tests/micro/arduino/.gitignore: -------------------------------------------------------------------------------- 1 | workspace* 2 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | doxygen 2 | modules 3 | tutorials 4 | -------------------------------------------------------------------------------- /include/tvm/meta_schedule/schedule/cpu/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /include/tvm/meta_schedule/schedule/x86/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/cpp/.gitignore: -------------------------------------------------------------------------------- 1 | unittest 2 | *.d 3 | *_test 4 | -------------------------------------------------------------------------------- /apps/microtvm/zephyr_cmsisnn/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | *.tflite 3 | -------------------------------------------------------------------------------- /tests/micro/.gitignore: -------------------------------------------------------------------------------- 1 | # test workspaces 2 | */workspace_*/ 3 | -------------------------------------------------------------------------------- /rust/tvm-graph-rt/tests/.gitignore: -------------------------------------------------------------------------------- 1 | *.json 2 | *.params 3 | *.o 4 | -------------------------------------------------------------------------------- /vta/tutorials/autotvm/README.txt: -------------------------------------------------------------------------------- 1 | Auto tuning 2 | ------------- 3 | -------------------------------------------------------------------------------- /apps/microtvm/reference-vm/.gitignore: -------------------------------------------------------------------------------- 1 | /release-test 2 | /.vagrant 3 | -------------------------------------------------------------------------------- /python/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | dist 3 | *.cpp 4 | requirements/*.txt 5 | -------------------------------------------------------------------------------- /apps/microtvm/cmsisnn/.gitignore: -------------------------------------------------------------------------------- 1 | include/inputs.h 2 | include/outputs.h 3 | -------------------------------------------------------------------------------- /rust/.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | *.rs.bk 3 | Cargo.lock 4 | c_runtime_api.rs 5 | -------------------------------------------------------------------------------- /tests/scripts/release/.gitignore: -------------------------------------------------------------------------------- 1 | *.md 2 | !README.md 3 | *.csv 4 | *.pkl 5 | -------------------------------------------------------------------------------- /web/.gitignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | *~ 3 | out 4 | node_modules 5 | build 6 | debug 7 | -------------------------------------------------------------------------------- /apps/microtvm/zephyr/template_project/qemu-hack/qemu-system-arm: -------------------------------------------------------------------------------- 1 | qemu-system-i386 -------------------------------------------------------------------------------- /apps/microtvm/zephyr/template_project/qemu-hack/qemu-system-riscv32: -------------------------------------------------------------------------------- 1 | qemu-system-i386 -------------------------------------------------------------------------------- /apps/microtvm/zephyr/template_project/qemu-hack/qemu-system-riscv64: -------------------------------------------------------------------------------- 1 | qemu-system-i386 -------------------------------------------------------------------------------- /gallery/how_to/work_with_relay/README.txt: -------------------------------------------------------------------------------- 1 | Work With Relay 2 | --------------- 3 | -------------------------------------------------------------------------------- /tests/micro/stm32/.clang-format: -------------------------------------------------------------------------------- 1 | DisableFormat: true 2 | SortIncludes: false 3 | -------------------------------------------------------------------------------- /docker/python/bootstrap/lockfiles/requirements-3.7.txt: -------------------------------------------------------------------------------- 1 | pip 2 | poetry 3 | setuptools 4 | -------------------------------------------------------------------------------- /docker/python/bootstrap/lockfiles/requirements-3.8.txt: -------------------------------------------------------------------------------- 1 | pip 2 | poetry 3 | setuptools 4 | -------------------------------------------------------------------------------- /rust/tvm-graph-rt/tests/test_wasm32/.cargo/config: -------------------------------------------------------------------------------- 1 | [build] 2 | target = "wasm32-wasi" 3 | -------------------------------------------------------------------------------- /apps/microtvm/zephyr/template_project/qemu-hack/qemu-system-xilinx-aarch64: -------------------------------------------------------------------------------- 1 | qemu-system-i386 -------------------------------------------------------------------------------- /vta/tutorials/optimize/README.txt: -------------------------------------------------------------------------------- 1 | Optimize Tensor Operators 2 | ------------------------- 3 | -------------------------------------------------------------------------------- /apps/microtvm/ethosu/.gitignore: -------------------------------------------------------------------------------- 1 | include/inputs.h 2 | include/outputs.h 3 | include/labels.h 4 | -------------------------------------------------------------------------------- /apps/android_camera/models/requirements.txt: -------------------------------------------------------------------------------- 1 | keras==2.9 2 | mxnet 3 | scipy 4 | tensorflow==2.9.3 5 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | Jenkinsfile linguist-generated=true 2 | ci/jenkins/generated/* linguist-generated=true 3 | -------------------------------------------------------------------------------- /apps/microtvm/reference-vm/base-box/.gitignore: -------------------------------------------------------------------------------- 1 | *.box 2 | .vagrant 3 | /output-packer-* 4 | /packer.json 5 | -------------------------------------------------------------------------------- /src/target/opt/README: -------------------------------------------------------------------------------- 1 | This folder contains optional builds for codegen depending on compilation options. 2 | -------------------------------------------------------------------------------- /configs/host/default.json: -------------------------------------------------------------------------------- 1 | { 2 | "targets": [ 3 | { 4 | "kind": "llvm" 5 | } 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /rust/tvm/tests/basics/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | **/*.rs.bk 3 | Cargo.lock 4 | *.o 5 | *.so 6 | *.ptx 7 | *.json 8 | -------------------------------------------------------------------------------- /docs/_static/img/tvm-logo-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shinh/tvm/main/docs/_static/img/tvm-logo-small.png -------------------------------------------------------------------------------- /docs/_static/img/tvm-logo-square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shinh/tvm/main/docs/_static/img/tvm-logo-square.png -------------------------------------------------------------------------------- /tests/micro/testdata/mnist/digit-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shinh/tvm/main/tests/micro/testdata/mnist/digit-2.jpg -------------------------------------------------------------------------------- /tests/micro/testdata/mnist/digit-9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shinh/tvm/main/tests/micro/testdata/mnist/digit-9.jpg -------------------------------------------------------------------------------- /tests/micro/testdata/mnist/mnist-8.onnx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shinh/tvm/main/tests/micro/testdata/mnist/mnist-8.onnx -------------------------------------------------------------------------------- /apps/wasm-standalone/.gitignore: -------------------------------------------------------------------------------- 1 | # Built packages 2 | **/lib/ 3 | 4 | 5 | #Added by cargo 6 | 7 | **/target/ 8 | **/Cargo.lock 9 | -------------------------------------------------------------------------------- /configs/test/tune_config_test.json: -------------------------------------------------------------------------------- 1 | { 2 | "targets": [ 3 | { "kind": "llvm" } 4 | ], 5 | "trials": "2" 6 | } 7 | -------------------------------------------------------------------------------- /gallery/how_to/work_with_schedules/README.txt: -------------------------------------------------------------------------------- 1 | Work With Tensor Expression and Schedules 2 | ----------------------------------------- 3 | -------------------------------------------------------------------------------- /vta/tutorials/frontend/README.txt: -------------------------------------------------------------------------------- 1 | .. _vta-tutorial-frontend: 2 | 3 | Compile Deep Learning Models 4 | ---------------------------- 5 | -------------------------------------------------------------------------------- /apps/sgx/.cargo/config: -------------------------------------------------------------------------------- 1 | [build] 2 | target = "x86_64-fortanix-unknown-sgx" 3 | 4 | [target.x86_64-fortanix-unknown-sgx] 5 | runner = "ftxsgx-runner-cargo" 6 | -------------------------------------------------------------------------------- /docs/_static/img/README: -------------------------------------------------------------------------------- 1 | The logo file in this repo is an exception due to the need of sphinx. 2 | By default we avoid to put large binary blobs into this repo. 3 | -------------------------------------------------------------------------------- /apps/android_rpc/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shinh/tvm/main/apps/android_rpc/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /apps/android_rpc/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shinh/tvm/main/apps/android_rpc/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /apps/microtvm/zephyr_cmsisnn/model/labels.txt: -------------------------------------------------------------------------------- 1 | _silence_ 2 | _unknown_ 3 | yes 4 | no 5 | up 6 | down 7 | left 8 | right 9 | on 10 | off 11 | stop 12 | go 13 | -------------------------------------------------------------------------------- /apps/wasm-standalone/wasm-graph/.cargo/config: -------------------------------------------------------------------------------- 1 | [build] 2 | target = "wasm32-wasi" 3 | rustflags = ["-C", "link-arg=--whole-archive", "-C", "link-arg=-lgraph_wasm32"] 4 | -------------------------------------------------------------------------------- /rust/tvm/.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | **/*.rs.bk 3 | Cargo.lock 4 | /tests/basics/add_* 5 | /examples/resnet/deploy_* 6 | /examples/resnet/*.png 7 | /examples/resnet/synset.* 8 | -------------------------------------------------------------------------------- /vta/tutorials/README.txt: -------------------------------------------------------------------------------- 1 | .. _vta-tutorials: 2 | 3 | VTA Tutorials 4 | ============= 5 | This page contains tutorials about VTA and how to use TVM/Relay to target VTA. 6 | -------------------------------------------------------------------------------- /rust/tvm-rt/.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | **/*.rs.bk 3 | Cargo.lock 4 | /tests/basics/add_* 5 | /examples/resnet/deploy_* 6 | /examples/resnet/*.png 7 | /examples/resnet/synset.* 8 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Apache TVM 2 | Copyright 2019-2022 The Apache Software Foundation 3 | 4 | This product includes software developed at 5 | The Apache Software Foundation (http://www.apache.org/). 6 | -------------------------------------------------------------------------------- /apps/android_deploy/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | -------------------------------------------------------------------------------- /gallery/how_to/optimize_operators/README.txt: -------------------------------------------------------------------------------- 1 | Optimize Tensor Operators 2 | ------------------------- 3 | 4 | These how-tos demonstrate how to optimize a variety of tensor operations for a 5 | variety of targets. 6 | -------------------------------------------------------------------------------- /tests/python/contrib/test_arm_compute_lib/test_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "connection_type": "local", 3 | "host": "127.0.0.1", 4 | "port": 9090, 5 | "target": "llvm -mtriple=aarch64-linux-gnu -mattr=+neon", 6 | "device_key": "", 7 | "cross_compile": "" 8 | } 9 | -------------------------------------------------------------------------------- /3rdparty/mlperftiny/README.md: -------------------------------------------------------------------------------- 1 | # MLPerf™ Tiny Benchmark API 2 | This directory includes API files to build a microTVM project that could be tested with EEMBC benchmark runner. API files are captured from the [MLCommons/tiny repository](https://github.com/mlcommons/tiny). 3 | -------------------------------------------------------------------------------- /gallery/how_to/deploy_models/README.txt: -------------------------------------------------------------------------------- 1 | Deploy Deep Learning Models 2 | --------------------------- 3 | 4 | TVM is capable of deploying models to a variety of different platforms. These 5 | how-tos describe how to prepapre and deploy models to many of the supported 6 | backends. 7 | -------------------------------------------------------------------------------- /gallery/how_to/compile_models/README.txt: -------------------------------------------------------------------------------- 1 | .. _tutorial-frontend: 2 | 3 | Compile Deep Learning Models 4 | ============================ 5 | 6 | TVM includes a variety of front-ends that can import models in different 7 | formats. These how-tos demostrate how to import models using the Python API. 8 | -------------------------------------------------------------------------------- /configs/test/compile_config_test.json: -------------------------------------------------------------------------------- 1 | { 2 | "targets": [ 3 | {"kind": "cmsis-nn", "from_device": "1"}, 4 | {"kind": "c", "mcpu": "cortex-m55"} 5 | ], 6 | "executor": { "kind": "aot"}, 7 | "runtime": { "kind": "crt"}, 8 | "pass-config": { "tir.disable_vectorize": "1"} 9 | } 10 | -------------------------------------------------------------------------------- /web/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "out": "dist/docs", 3 | "readme": "none", 4 | "mode": "file", 5 | "excludeNotExported": true, 6 | "excludePrivate": true, 7 | "listInvalidSymbolLinks": true, 8 | "module": "umd", 9 | "includes": ["src"], 10 | "exclude": ["**/node_modules/**"] 11 | } 12 | -------------------------------------------------------------------------------- /gallery/how_to/extend_tvm/README.txt: -------------------------------------------------------------------------------- 1 | Extend TVM 2 | ---------- 3 | 4 | TVM is an extensible development platform, with many points of entry to work 5 | with, including options for bringing new datatypes and adding lower level 6 | custom optimization passes. These how-tos describe some ways that TVM can be 7 | extended. 8 | -------------------------------------------------------------------------------- /.clang-format: -------------------------------------------------------------------------------- 1 | # Run the following command to reformat a file: 2 | # clang-format -i -style=Google 3 | # Or use clang-format-diff to only reformat the changed lines: 4 | # https://clang.llvm.org/docs/ClangFormat.html 5 | BasedOnStyle: Google 6 | DerivePointerAlignment: false 7 | ColumnLimit: 100 8 | PointerAlignment: Left 9 | -------------------------------------------------------------------------------- /gallery/how_to/tune_with_autoscheduler/README.txt: -------------------------------------------------------------------------------- 1 | Use AutoScheduler for Template-Free Scheduling 2 | ---------------------------------------------- 3 | 4 | The TVM AutoScheduler offers a template-free way to tune models. These how-tos 5 | demonstrate how to tune a variety of different models to target a number of 6 | common platforms. 7 | -------------------------------------------------------------------------------- /gallery/how_to/work_with_microtvm/README.txt: -------------------------------------------------------------------------------- 1 | .. _tutorial-micro: 2 | 3 | Work With microTVM 4 | ------------------ 5 | microTVM enables inference on bare-metal platforms, for example, those without 6 | a traditional Operating System such as Linux, OS X, or Windows. These how-tos 7 | demonstrate how to tune and deploy models with microTVM. 8 | -------------------------------------------------------------------------------- /web/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es6", 5 | "outDir": "dist", 6 | "rootDir": "src", 7 | "declaration": true, 8 | "sourceMap": true, 9 | "strict": true, 10 | "skipLibCheck": true, 11 | }, 12 | "include": ["src"], 13 | "exclude": ["**/node_modules/**"] 14 | } 15 | -------------------------------------------------------------------------------- /3rdparty/libcrc/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | .*.swp 3 | lib/*.lib 4 | lib/*.a 5 | obj/*.obj 6 | obj/*.o 7 | test/obj/*.obj 8 | test/obj/*.o 9 | examples/obj/*.obj 10 | examples/obj/*.o 11 | precalc/obj/*.obj 12 | precalc/obj/*.o 13 | tab/gentab32.inc 14 | tab/gentab64.inc 15 | make.exe 16 | testall.exe 17 | testall 18 | tstcrc.exe 19 | tstcrc 20 | bin/prc.exe 21 | bin/prc 22 | -------------------------------------------------------------------------------- /apps/android_rpc/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | 11 | /app/src/main/jni/jni_helper_func.h 12 | /app/src/main/jni/org_apache_tvm_native_c_api.cc 13 | /app/src/main/jni/org_apache_tvm_native_c_api.h 14 | /app/src/main/obj/ 15 | dev_tools/tvmrpc.keystore 16 | -------------------------------------------------------------------------------- /apps/android_camera/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | /app/src/main/jni/jni_helper_func.h 11 | /app/src/main/jni/org_apache_tvm_native_c_api.cc 12 | /app/src/main/jni/org_apache_tvm_native_c_api.h 13 | /app/src/main/obj/ 14 | gradle/ 15 | app/src/main/assets/models 16 | -------------------------------------------------------------------------------- /gallery/how_to/tune_with_autotvm/README.txt: -------------------------------------------------------------------------------- 1 | .. _tutorials-autotvm-sec: 2 | 3 | Auto-Tune with Templates and AutoTVM 4 | ------------------------------------ 5 | 6 | AutoTVM offers a way to tune models and operators by providing a template 7 | schedule, and searcing the parameter space defined by the template. These 8 | how-tos demonstrate how to write template schedules and optimize them for a 9 | variety of different hardware platforms. 10 | -------------------------------------------------------------------------------- /ci/jenkins/templates/utils/Test.groovy.j2: -------------------------------------------------------------------------------- 1 | def cpp_unittest(image) { 2 | sh ( 3 | script: "${docker_run} --env CI_NUM_EXECUTORS ${image} ./tests/scripts/task_cpp_unittest.sh", 4 | label: 'Run C++ tests', 5 | ) 6 | } 7 | 8 | def micro_cpp_unittest(image) { 9 | sh ( 10 | script: "${docker_run} --env CI_NUM_EXECUTORS ${image} ./tests/scripts/task_microtvm_cpp_tests.sh build", 11 | label: 'Run microTVM C++ tests', 12 | ) 13 | } 14 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false # default: true 2 | contact_links: 3 | - name: 💬 Discourse 4 | url: https://discuss.tvm.apache.org/ 5 | about: Thanks for participating in the TVM community! We use https://discuss.tvm.ai for any general usage questions and discussions. The issue tracker is used for actionable items such as feature proposals discussion, roadmaps, and bug tracking. You are always welcomed to post on the forum first 😺 6 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # See https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#about-the-dependabotyml-file 2 | version: 2 3 | 4 | updates: 5 | - package-ecosystem: "npm" 6 | directory: "/" 7 | schedule: 8 | interval: "monthly" 9 | open-pull-requests-limit: 0 10 | 11 | - package-ecosystem: "pip" 12 | directory: "/" 13 | schedule: 14 | interval: "monthly" 15 | open-pull-requests-limit: 0 16 | -------------------------------------------------------------------------------- /gallery/tutorial/README.txt: -------------------------------------------------------------------------------- 1 | User Tutorial 2 | ------------- 3 | 4 | This tutorial provides an introduction to TVM, meant to address user who is new 5 | to the TVM project. It begins with some basic information on how TVM works, 6 | then works through installing TVM, compiling and optimizing models, then 7 | digging in deeper to the Tensor Expression language and the tuning and 8 | optimization tools that are built on top of it. After completing the tutorial, 9 | a new user should be familiar enough with TVM to optimize models, and will be 10 | prepared to dig into TVM more deeply. 11 | -------------------------------------------------------------------------------- /.github/workflows/ping_reviewers.yml: -------------------------------------------------------------------------------- 1 | 2 | name: Ping Reviewers 3 | on: 4 | schedule: 5 | - cron: "0/15 * * * *" 6 | workflow_dispatch: 7 | 8 | concurrency: 9 | group: ping 10 | cancel-in-progress: true 11 | 12 | jobs: 13 | ping: 14 | if: github.repository == 'apache/tvm' 15 | runs-on: ubuntu-20.04 16 | steps: 17 | - uses: actions/checkout@v2 18 | - name: Ping reviewers 19 | env: 20 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 21 | run: | 22 | set -eux 23 | python ci/scripts/github/ping_reviewers.py --wait-time-minutes 10080 || echo failed 24 | -------------------------------------------------------------------------------- /gallery/how_to/tune_with_autoscheduler/ci_logs/matmul.json: -------------------------------------------------------------------------------- 1 | # Keep a valid schedule for demonstraction. This is used to prevent flasky errors in CI. 2 | {"i": [["[\"matmul_add\", 1024, 1024, 1024, \"float32\"]", "llvm -keys=cpu", [18, 64, 64, 0, 0, 0, 0, 0]], [[], [["SP", 2, 0, 1024, [2, 1, 4], 1], ["SP", 2, 4, 1024, [1, 1, 8], 1], ["SP", 2, 8, 1024, [4], 1], ["RE", 2, [0, 4, 1, 5, 8, 2, 6, 9, 3, 7]], ["FSP", 4, 0, 0, 2], ["FSP", 4, 3, 1, 2], ["RE", 4, [0, 3, 1, 4, 2, 5]], ["CA", 2, 4, 3], ["FU", 4, [0, 1]], ["AN", 4, 0, 3], ["PR", 2, 0, "auto_unroll_max_step$8"], ["AN", 2, 9, 2], ["AN", 4, 4, 2]]]], "r": [[0.0044742], 0, 0.335558, 1607112214], "v": "v0.3"} 3 | -------------------------------------------------------------------------------- /3rdparty/cma/settings.mk: -------------------------------------------------------------------------------- 1 | # ==================== COMPILATION RELATED SETTINGS ==================== 2 | # Path to the kernel sources (from "./driver", if relative path is used) 3 | KSOURCE_DIR=/opt/intel/linux-socfpga-rel_socfpga-4.9.78-ltsi_18.08.02_pr 4 | 5 | # Cross compiler "prepend" string 6 | CROSS_COMPILE=arm-linux-gnueabihf- 7 | 8 | # Architecture 9 | ARCH=arm 10 | 11 | # Compile with debug information 12 | CMA_DEBUG?=0 13 | 14 | # ==================== DRIVER RELATED SETTINGS ==================== 15 | # Node name used in "/dev" folder 16 | DRIVER_NODE_NAME="cma" 17 | 18 | # Unique (across system) ioctl magic number. Every ioctl interface should have one. 19 | CMA_IOC_MAGIC=0xf2 20 | -------------------------------------------------------------------------------- /gallery/how_to/tune_with_autoscheduler/ci_logs/sparse_dense.json: -------------------------------------------------------------------------------- 1 | # Keep a valid schedule for demonstraction. This is used to prevent flasky errors in CI. 2 | {"i": [["[\"sparse_dense\", 512, 512, 512, [9831, 16, 1], [9831], [33], \"float32\"]", "llvm -keys=cpu", [6, 64, 64, 0, 0, 0, 0, 0], "", 1, ["sparse_dense_bsr_512_512_512_16_1_0.60_W_data", "sparse_dense_bsr_512_512_512_16_1_0.60_W_indices", "sparse_dense_bsr_512_512_512_16_1_0.60_W_indptr"]], [[], [["CI", 8], ["CI", 6], ["SP", 5, 0, 512, [1, 8], 1], ["FSP", 9, 0, 2, 1], ["SP", 5, 3, 32, [32], 1], ["FSP", 9, 2, 4, 1], ["RE", 5, [0, 3, 1, 4, 6, 2, 5, 7]], ["RE", 9, [0, 2, 1, 3]], ["CA", 5, 9, 1], ["CI", 4], ["FU", 9, [0, 1]], ["AN", 9, 0, 3], ["PR", 5, 0, "auto_unroll_max_step$0"], ["AN", 9, 2, 2]]]], "r": [[0.000957008], 0, 0.605709, 1614689820], "v": "v0.6"} 3 | -------------------------------------------------------------------------------- /.github/workflows/nightly_docker_update.yml: -------------------------------------------------------------------------------- 1 | 2 | name: Nightly Docker Update 3 | on: 4 | schedule: 5 | - cron: "0 0 * * *" 6 | workflow_dispatch: 7 | 8 | concurrency: 9 | group: nightly-docker-update 10 | cancel-in-progress: true 11 | 12 | jobs: 13 | open_update_pr: 14 | permissions: 15 | actions: write 16 | checks: write 17 | contents: write 18 | id-token: write 19 | issues: write 20 | pull-requests: write 21 | statuses: write 22 | if: github.repository == 'apache/tvm' 23 | runs-on: ubuntu-20.04 24 | steps: 25 | - uses: actions/checkout@v2 26 | - name: Open PR to update Docker images 27 | env: 28 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 29 | run: | 30 | set -eux 31 | python ci/scripts/jenkins/open_docker_update_pr.py 32 | -------------------------------------------------------------------------------- /tests/micro/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | -------------------------------------------------------------------------------- /tests/micro/common/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | -------------------------------------------------------------------------------- /python/tvm/contrib/target/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | -------------------------------------------------------------------------------- /tests/lint/rat-excludes: -------------------------------------------------------------------------------- 1 | # subdirectories 2 | 3rdparty 3 | .github 4 | 5 | # Binary or data files 6 | .*\.ipynb 7 | .*\.pyc 8 | .*\.so 9 | .*\.json 10 | .*\.txt 11 | .*\.svg 12 | .*\.lst 13 | .*\.lds 14 | .*\.in 15 | .*\.diff 16 | .*\.edl 17 | .*\.md5 18 | .*\.csv 19 | .*\.log 20 | .*\.interp 21 | .*\.tokens 22 | 23 | # microTVM test data files 24 | testdata 25 | 26 | # Generated modules 27 | .*\.egg-info 28 | .*gen_modules 29 | .*doxygen 30 | core.cpp 31 | build 32 | _static 33 | _build 34 | node_modules 35 | dist 36 | .*~ 37 | \#..*\# 38 | \.#.* 39 | .npm 40 | .node_repl_history 41 | node_modules 42 | 43 | # Specific files 44 | package-list 45 | MANIFEST 46 | .eslintignore 47 | .gitignore 48 | .gitattributes 49 | .gitmodules 50 | .clang-format 51 | .bash_history 52 | rat-excludes 53 | Cargo.lock 54 | poetry.lock 55 | 56 | # Template files for Jenkins 57 | .*\.groovy\.j2 58 | -------------------------------------------------------------------------------- /python/tvm/contrib/cuda_graph/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | -------------------------------------------------------------------------------- /python/tvm/contrib/debugger/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | -------------------------------------------------------------------------------- /python/tvm/topi/arm_cpu/mprofile/dsp/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | -------------------------------------------------------------------------------- /python/tvm/meta_schedule/testing/torchbench/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | -------------------------------------------------------------------------------- /python/tvm/_ffi/_cy2/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """cython2 namespace""" 18 | -------------------------------------------------------------------------------- /python/tvm/_ffi/_cy3/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """cython3 namespace""" 18 | -------------------------------------------------------------------------------- /python/tvm/topi/arm_cpu/mprofile/dsp/micro_kernel/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | -------------------------------------------------------------------------------- /web/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "es6": true 5 | }, 6 | "extends": ["eslint:recommended"], 7 | "root": true, 8 | "parser": "@typescript-eslint/parser", 9 | "parserOptions": { 10 | "ecmaVersion": 2018, 11 | "sourceType": "module" 12 | }, 13 | "overrides": [ 14 | { 15 | "files": ["src/**.ts", "src/**.tsx"], 16 | "plugins": ["@typescript-eslint"], 17 | "extends": [ 18 | "plugin:@typescript-eslint/eslint-recommended", 19 | "plugin:@typescript-eslint/recommended" 20 | ], 21 | "rules": { 22 | "require-jsdoc": 0, 23 | "@typescript-eslint/no-explicit-any": 0, 24 | "@typescript-eslint/no-empty-function": 0 25 | } 26 | }, 27 | { 28 | "files": ["tests/node/*.js", "apps/node/*.js"], 29 | "env": { 30 | "node": true 31 | } 32 | } 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /docs/genindex.rst: -------------------------------------------------------------------------------- 1 | .. Licensed to the Apache Software Foundation (ASF) under one 2 | or more contributor license agreements. See the NOTICE file 3 | distributed with this work for additional information 4 | regarding copyright ownership. The ASF licenses this file 5 | to you under the Apache License, Version 2.0 (the 6 | "License"); you may not use this file except in compliance 7 | with the License. You may obtain a copy of the License at 8 | 9 | .. http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | .. Unless required by applicable law or agreed to in writing, 12 | software distributed under the License is distributed on an 13 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | KIND, either express or implied. See the License for the 15 | specific language governing permissions and limitations 16 | under the License. 17 | 18 | Index 19 | ===== 20 | -------------------------------------------------------------------------------- /vta/python/vta/exec/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | """VTA Command line utils.""" 19 | -------------------------------------------------------------------------------- /apps/android_camera/settings.gradle: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | include ':app' 19 | -------------------------------------------------------------------------------- /apps/android_deploy/settings.gradle: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | include ':app' 19 | -------------------------------------------------------------------------------- /apps/android_rpc/settings.gradle: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | include ':app' 19 | -------------------------------------------------------------------------------- /python/tvm/autotvm/testing/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Testing utilities for autotvm""" 18 | -------------------------------------------------------------------------------- /tests/python/ci/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Infrastructure and tests for CI scripts""" 18 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "dmlc-core"] 2 | path = 3rdparty/dmlc-core 3 | url = https://github.com/dmlc/dmlc-core.git 4 | [submodule "dlpack"] 5 | path = 3rdparty/dlpack 6 | url = https://github.com/dmlc/dlpack.git 7 | [submodule "3rdparty/rang"] 8 | path = 3rdparty/rang 9 | url = https://github.com/agauniyal/rang.git 10 | [submodule "3rdparty/vta-hw"] 11 | path = 3rdparty/vta-hw 12 | url = https://github.com/apache/tvm-vta.git 13 | [submodule "3rdparty/libbacktrace"] 14 | path = 3rdparty/libbacktrace 15 | url = https://github.com/tlc-pack/libbacktrace.git 16 | [submodule "3rdparty/cutlass"] 17 | path = 3rdparty/cutlass 18 | url = https://github.com/NVIDIA/cutlass.git 19 | [submodule "3rdparty/OpenCL-Headers"] 20 | path = 3rdparty/OpenCL-Headers 21 | url = https://github.com/KhronosGroup/OpenCL-Headers.git 22 | [submodule "3rdparty/cnpy"] 23 | path = 3rdparty/cnpy 24 | url = https://github.com/rogersce/cnpy.git 25 | -------------------------------------------------------------------------------- /python/tvm/_ffi/_ctypes/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """ctypes specific implementation of FFI""" 18 | -------------------------------------------------------------------------------- /tests/micro/common/conftest.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | 17 | pytest_plugins = [ 18 | "tvm.micro.testing.pytest_plugin", 19 | ] 20 | -------------------------------------------------------------------------------- /tests/micro/stm32/conftest.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | import pytest 18 | 19 | import tvm.target.target 20 | -------------------------------------------------------------------------------- /tests/python/contrib/test_bnns/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Infrastructure and tests for BNNS""" 18 | -------------------------------------------------------------------------------- /tests/python/contrib/test_clml/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Infrastructure and tests for CLML""" 18 | -------------------------------------------------------------------------------- /python/tvm/micro/project_api/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """MicroTVM Project API Client and Server""" 18 | -------------------------------------------------------------------------------- /rust/tvm/src/compiler/mod.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | pub mod graph_rt; 21 | -------------------------------------------------------------------------------- /rust/tvm/src/runtime/mod.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | pub use tvm_rt::*; 21 | -------------------------------------------------------------------------------- /tests/micro/zephyr/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | """ Testing infrastructure for microTVM Zephyr """ 19 | -------------------------------------------------------------------------------- /tests/python/contrib/test_hexagon/topi/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | """ Hexagon TOPI tests """ 19 | -------------------------------------------------------------------------------- /conda/build_win.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | conda build --output-folder=conda/pkg conda/recipe 19 | -------------------------------------------------------------------------------- /tests/python/contrib/test_cmsisnn/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Infrastructure and tests for CMSIS-NN""" 18 | -------------------------------------------------------------------------------- /apps/android_rpc/gradle.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | android.useAndroidX=true 19 | android.enableJetifier=true 20 | -------------------------------------------------------------------------------- /python/tvm/relay/backend/contrib/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """External backend codegen modules for Relay.""" 18 | -------------------------------------------------------------------------------- /tests/python/contrib/test_hexagon/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | """ Testing infrastructure for Hexagon """ 19 | -------------------------------------------------------------------------------- /tests/python/integration/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Infrastructure and tests for e2e integration tests.""" 18 | -------------------------------------------------------------------------------- /apps/uma/_template/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """ 18 | 19 | Template files for UMA tutorial 20 | 21 | 22 | """ 23 | -------------------------------------------------------------------------------- /docker/utils/apt-install-and-clear.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | 19 | apt-get install $@ && apt-get clean 20 | -------------------------------------------------------------------------------- /python/tvm/contrib/ethosu/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Namespace for Arm(R) Ethos(TM)-U NPU contrib functionality""" 18 | -------------------------------------------------------------------------------- /python/tvm/exec/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Namespace of executables python files that directly run throw cmd""" 18 | -------------------------------------------------------------------------------- /tests/python/contrib/test_ethosn/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Infrastructure and tests for Arm(R) Ethos(TM)-N""" 18 | -------------------------------------------------------------------------------- /tests/python/contrib/test_ethosu/cascader/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Test infrastructure for the NPU cascader""" 18 | -------------------------------------------------------------------------------- /tests/python/contrib/test_hexagon/topi/slice_op/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | """ Hexagon TOPI Slice OP tests """ 19 | -------------------------------------------------------------------------------- /python/tvm/driver/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Namespace for driver APIs""" 18 | from .build_module import lower, build 19 | -------------------------------------------------------------------------------- /python/tvm/relay/backend/contrib/ethosu/tir/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Arm(R) Ethos(TM)-U NPU TIR codegen modules.""" 18 | -------------------------------------------------------------------------------- /python/tvm/topi/arm_cpu/mprofile/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Schedules specialized for cortex-m DSP instructions.""" 18 | -------------------------------------------------------------------------------- /rust/tvm/.travis.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | language: rust 19 | rust: 20 | - nightly 21 | matrix: 22 | fast_finish: true 23 | -------------------------------------------------------------------------------- /tests/micro/project_api/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | """Test Project API in different platforms infrastructure.""" 19 | -------------------------------------------------------------------------------- /tests/python/contrib/test_vitis_ai/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | """ Infrastructure and tests for Vitis-AI codegen """ 19 | -------------------------------------------------------------------------------- /conda/recipe/install_libtvm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | 19 | set -e 20 | set -u 21 | 22 | cd build 23 | make install 24 | -------------------------------------------------------------------------------- /tests/python/contrib/test_arm_compute_lib/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Infrastructure and tests for Arm Compute Library""" 18 | -------------------------------------------------------------------------------- /tests/python/contrib/test_ethosu/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Test infrastructure for Arm(R) Ethos(TM)-U NPU related tests""" 18 | -------------------------------------------------------------------------------- /tests/python/contrib/test_verilator/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | """ Infrastructure and tests for Verilator codegen """ 19 | -------------------------------------------------------------------------------- /python/tvm/meta_schedule/schedule/cpu/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Per-block schedule rules in MetaSchedule for target key 'cpu'""" 18 | -------------------------------------------------------------------------------- /python/tvm/meta_schedule/schedule/x86/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Per-block schedule rules in MetaSchedule for target key 'x86'""" 18 | -------------------------------------------------------------------------------- /tests/python/contrib/test_hexagon/conv2d/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | """ Testing infrastructure for Hexagon/TOPI/Conv2d """ 19 | -------------------------------------------------------------------------------- /conda/recipe/conda_build_config.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | python: 19 | - 3.6 20 | - 3.7 21 | - 3.8 22 | 23 | cuda: 24 | - False 25 | -------------------------------------------------------------------------------- /python/tvm/contrib/hexagon/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Hexagon APIs.""" 18 | 19 | from .tools import * 20 | from .transform import * 21 | -------------------------------------------------------------------------------- /python/tvm/meta_schedule/schedule/generic/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Per-block schedule rules in MetaSchedule for generic cases""" 18 | -------------------------------------------------------------------------------- /python/tvm/relay/std/core.rly: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #[version = "0.0.5"] 21 | 22 | extern type Storage 23 | -------------------------------------------------------------------------------- /python/tvm/ir/_ffi_api.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI APIs for tvm.ir""" 18 | import tvm._ffi 19 | 20 | 21 | tvm._ffi._init_api("ir", __name__) 22 | -------------------------------------------------------------------------------- /python/tvm/rpc/_ffi_api.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI APIs for tvm.rpc""" 18 | import tvm._ffi 19 | 20 | 21 | tvm._ffi._init_api("rpc", __name__) 22 | -------------------------------------------------------------------------------- /python/tvm/te/_ffi_api.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI APIs for tvm.te""" 18 | import tvm._ffi 19 | 20 | 21 | tvm._ffi._init_api("te", __name__) 22 | -------------------------------------------------------------------------------- /python/tvm/tir/_ffi_api.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI APIs for tvm.tir""" 18 | import tvm._ffi 19 | 20 | 21 | tvm._ffi._init_api("tir", __name__) 22 | -------------------------------------------------------------------------------- /tests/python/contrib/test_hexagon/metaschedule_e2e/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | """Demonstration of end-to-end MetaSchedule tuning.""" 19 | -------------------------------------------------------------------------------- /python/tvm/driver/_ffi_api.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI APIs for tvm.driver""" 18 | import tvm._ffi 19 | 20 | tvm._ffi._init_api("driver", __name__) 21 | -------------------------------------------------------------------------------- /python/tvm/relay/op/_make.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Constructor APIs""" 18 | import tvm._ffi 19 | 20 | tvm._ffi._init_api("relay.op._make", __name__) 21 | -------------------------------------------------------------------------------- /rust/tvm/src/ir/relay/attrs/mod.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | pub mod nn; 21 | pub mod reduce; 22 | pub mod transform; 23 | -------------------------------------------------------------------------------- /apps/android_camera/gradle.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | org.gradle.jvmargs=-Xmx4608M 19 | android.useAndroidX=true 20 | android.enableJetifier=true 21 | -------------------------------------------------------------------------------- /apps/android_deploy/gradle.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | org.gradle.jvmargs=-Xmx4096M 19 | android.useAndroidX=true 20 | android.enableJetifier=true 21 | -------------------------------------------------------------------------------- /docker/install/ubuntu_install_gluoncv.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | 19 | set -e 20 | set -u 21 | set -o pipefail 22 | 23 | pip3 install gluoncv 24 | -------------------------------------------------------------------------------- /python/tvm/arith/_ffi_api.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI APIs for tvm.arith""" 18 | import tvm._ffi 19 | 20 | 21 | tvm._ffi._init_api("arith", __name__) 22 | -------------------------------------------------------------------------------- /python/tvm/meta_schedule/schedule/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Per-block schedule rules in MetaSchedule""" 18 | from . import cpu, cuda, generic, x86 19 | -------------------------------------------------------------------------------- /python/tvm/relay/op/nn/_make.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Constructor APIs""" 18 | import tvm._ffi 19 | 20 | tvm._ffi._init_api("relay.op.nn._make", __name__) 21 | -------------------------------------------------------------------------------- /python/tvm/script/ir_builder/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """tvm.script.ir_builder is a generic IR builder for TVM.""" 18 | from .base import IRBuilder 19 | -------------------------------------------------------------------------------- /python/tvm/target/_ffi_api.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI APIs for tvm.target""" 18 | import tvm._ffi 19 | 20 | 21 | tvm._ffi._init_api("target", __name__) 22 | -------------------------------------------------------------------------------- /docker/install/ubuntu_install_coreml.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | 19 | set -e 20 | set -u 21 | set -o pipefail 22 | 23 | pip3 install coremltools 24 | -------------------------------------------------------------------------------- /docker/install/ubuntu_install_mxnet.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | 19 | set -e 20 | set -u 21 | set -o pipefail 22 | 23 | pip3 install mxnet==1.6.0 24 | -------------------------------------------------------------------------------- /python/tvm/generic.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Generic operators.""" 18 | # pylint:disable=unused-wildcard-import, wildcard-import 19 | from .tir.generic import * 20 | -------------------------------------------------------------------------------- /python/tvm/relay/_ffi_api.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI APIs for Relay program IR.""" 18 | import tvm._ffi 19 | 20 | tvm._ffi._init_api("relay.ir", __name__) 21 | -------------------------------------------------------------------------------- /python/tvm/relay/op/dyn/_make.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Constructor APIs""" 18 | import tvm._ffi 19 | 20 | tvm._ffi._init_api("relay.op.dyn._make", __name__) 21 | -------------------------------------------------------------------------------- /python/tvm/relay/op/image/_make.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Constructor APIs""" 18 | import tvm._ffi 19 | 20 | tvm._ffi._init_api("relay.op.image._make", __name__) 21 | -------------------------------------------------------------------------------- /python/tvm/relay/op/vm/_ffi_api.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI APIs for relay.op.vm""" 18 | import tvm._ffi 19 | 20 | tvm._ffi._init_api("relay.op.vm", __name__) 21 | -------------------------------------------------------------------------------- /python/tvm/relay/qnn/op/_make.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Constructor APIs""" 18 | import tvm._ffi 19 | 20 | tvm._ffi._init_api("relay.qnn.op._make", __name__) 21 | -------------------------------------------------------------------------------- /python/tvm/testing/_ffi_api.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI APIs for tvm.testing""" 18 | import tvm._ffi 19 | 20 | 21 | tvm._ffi._init_api("testing", __name__) 22 | -------------------------------------------------------------------------------- /python/tvm/tir/usmp/_ffi_api.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI APIs for tvm.tir.usmp""" 18 | import tvm._ffi 19 | 20 | 21 | tvm._ffi._init_api("tir.usmp", __name__) 22 | -------------------------------------------------------------------------------- /tests/lint/jnilint.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | 19 | set -e 20 | 21 | python3 3rdparty/dmlc-core/scripts/lint.py tvm4j-jni cpp jvm/native/src 22 | -------------------------------------------------------------------------------- /vta/python/vta/testing/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | """Testing utilities, this namespace is not imported by default.""" 19 | 20 | from .utils import run 21 | -------------------------------------------------------------------------------- /docker/install/ubuntu_install_paddle.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | 19 | set -e 20 | set -u 21 | set -o pipefail 22 | 23 | pip install paddlepaddle==2.4.2 24 | -------------------------------------------------------------------------------- /docker/install/ubuntu_install_vela.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | 19 | set -e 20 | set -u 21 | set -o pipefail 22 | 23 | pip3 install ethos-u-vela==3.7.0 24 | -------------------------------------------------------------------------------- /python/tvm/contrib/tf_op/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Module container of TensorFlow TVMDSO op""" 18 | from . import module 19 | 20 | OpModule = module.OpModule 21 | -------------------------------------------------------------------------------- /python/tvm/ir/_ffi_instrument_api.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI APIs for tvm.instrument""" 18 | import tvm._ffi 19 | 20 | tvm._ffi._init_api("instrument", __name__) 21 | -------------------------------------------------------------------------------- /python/tvm/meta_schedule/testing/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Testing utilities in meta schedule""" 18 | 19 | # NOTE: Do not import any module here by default 20 | -------------------------------------------------------------------------------- /python/tvm/relay/_ffi_api_parser.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI APIs for Relay parser.""" 18 | import tvm._ffi 19 | 20 | tvm._ffi._init_api("relay.parser", __name__) 21 | -------------------------------------------------------------------------------- /python/tvm/relay/op/dyn/nn/_make.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Constructor APIs""" 18 | import tvm._ffi 19 | 20 | tvm._ffi._init_api("relay.op.dyn.nn._make", __name__) 21 | -------------------------------------------------------------------------------- /python/tvm/relay/op/memory/_make.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Constructor APIs""" 18 | import tvm._ffi 19 | 20 | tvm._ffi._init_api("relay.op.memory._make", __name__) 21 | -------------------------------------------------------------------------------- /python/tvm/relay/op/random/_make.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Constructor APIs""" 18 | import tvm._ffi 19 | 20 | tvm._ffi._init_api("relay.op.random._make", __name__) 21 | -------------------------------------------------------------------------------- /python/tvm/relay/op/vision/_make.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Constructor APIs""" 18 | import tvm._ffi 19 | 20 | tvm._ffi._init_api("relay.op.vision._make", __name__) 21 | -------------------------------------------------------------------------------- /python/tvm/runtime/profiling/_ffi_api.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI for profiling""" 18 | from ... import _ffi 19 | 20 | _ffi._init_api("runtime.profiling", __name__) 21 | -------------------------------------------------------------------------------- /python/tvm/topi/cpp/nn.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI for NN TOPI ops and schedules""" 18 | import tvm._ffi 19 | 20 | tvm._ffi._init_api("topi.nn", "tvm.topi.cpp.nn") 21 | -------------------------------------------------------------------------------- /python/tvm/utils/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Utilities operating at a graph/model or other "high" level""" 18 | 19 | from .roofline import roofline_analysis 20 | -------------------------------------------------------------------------------- /python/tvm/_ffi/_cython/core.pyx: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | include "./base.pxi" 19 | include "./object.pxi" 20 | include "./packed_func.pxi" 21 | include "./ndarray.pxi" 22 | -------------------------------------------------------------------------------- /python/tvm/contrib/cutlass/_ffi_api.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI API for CUTLASS BYOC.""" 18 | import tvm._ffi 19 | 20 | tvm._ffi._init_api("contrib.cutlass", __name__) 21 | -------------------------------------------------------------------------------- /python/tvm/ir/_ffi_transform_api.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI APIs for tvm.transform""" 18 | import tvm._ffi 19 | 20 | 21 | tvm._ffi._init_api("transform", __name__) 22 | -------------------------------------------------------------------------------- /python/tvm/ir/diagnostics/_ffi_api.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI for TVM diagnostics.""" 18 | import tvm._ffi 19 | 20 | 21 | tvm._ffi._init_api("diagnostics", __name__) 22 | -------------------------------------------------------------------------------- /python/tvm/relay/backend/_aot.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """The AOT FFI namespace. 18 | """ 19 | import tvm._ffi 20 | 21 | tvm._ffi._init_api("relay.backend.aot", __name__) 22 | -------------------------------------------------------------------------------- /python/tvm/relay/op/annotation/_make.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Constructor APIs""" 18 | import tvm._ffi 19 | 20 | tvm._ffi._init_api("relay.op.annotation._make", __name__) 21 | -------------------------------------------------------------------------------- /python/tvm/relay/op/dyn/image/_make.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Constructor APIs""" 18 | import tvm._ffi 19 | 20 | tvm._ffi._init_api("relay.op.dyn.image._make", __name__) 21 | -------------------------------------------------------------------------------- /python/tvm/script/ir_builder/ir/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Package tvm.script.ir_builder.ir""" 18 | from .frame import IRModuleFrame 19 | from .ir import ir_module 20 | -------------------------------------------------------------------------------- /python/tvm/topi/cpp/impl.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Load Lib for C++ TOPI ops and schedules""" 18 | import tvm._ffi 19 | 20 | tvm._ffi._init_api("topi", "tvm.topi.cpp") 21 | -------------------------------------------------------------------------------- /python/tvm/topi/cpp/utils.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI for TOPI utility functions""" 18 | import tvm._ffi 19 | 20 | tvm._ffi._init_api("topi.utils", "tvm.topi.cpp.utils") 21 | -------------------------------------------------------------------------------- /python/tvm/topi/cpp/x86.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI for x86 TOPI ops and schedules""" 18 | import tvm._ffi 19 | 20 | tvm._ffi._init_api("topi.x86", "tvm.topi.cpp.x86") 21 | -------------------------------------------------------------------------------- /python/tvm/tir/analysis/_ffi_api.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI APIs for tvm.tir.analysis""" 18 | import tvm._ffi 19 | 20 | 21 | tvm._ffi._init_api("tir.analysis", __name__) 22 | -------------------------------------------------------------------------------- /python/tvm/tir/transform/_ffi_api.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI APIs for tvm.tir.transform""" 18 | import tvm._ffi 19 | 20 | 21 | tvm._ffi._init_api("tir.transform", __name__) 22 | -------------------------------------------------------------------------------- /python/tvm/topi/cpp/cuda.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI for CUDA TOPI ops and schedules""" 18 | import tvm._ffi 19 | 20 | tvm._ffi._init_api("topi.cuda", "tvm.topi.cpp.cuda") 21 | -------------------------------------------------------------------------------- /python/tvm/topi/cpp/rocm.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI for Rocm TOPI ops and schedules""" 18 | import tvm._ffi 19 | 20 | tvm._ffi._init_api("topi.rocm", "tvm.topi.cpp.rocm") 21 | -------------------------------------------------------------------------------- /apps/microtvm/zephyr_cmsisnn/prj.conf: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | # newlib needed for math.h 19 | CONFIG_NEWLIB_LIBC=y 20 | 21 | # Enables architecture extensions 22 | CONFIG_FPU=y 23 | -------------------------------------------------------------------------------- /docs/how_to/profile/index.rst: -------------------------------------------------------------------------------- 1 | .. Licensed to the Apache Software Foundation (ASF) under one 2 | or more contributor license agreements. See the NOTICE file 3 | distributed with this work for additional information 4 | regarding copyright ownership. The ASF licenses this file 5 | to you under the Apache License, Version 2.0 (the 6 | "License"); you may not use this file except in compliance 7 | with the License. You may obtain a copy of the License at 8 | 9 | .. http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | .. Unless required by applicable law or agreed to in writing, 12 | software distributed under the License is distributed on an 13 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | KIND, either express or implied. See the License for the 15 | specific language governing permissions and limitations 16 | under the License. 17 | 18 | Profile Models 19 | ============== 20 | 21 | .. toctree:: 22 | :maxdepth: 1 23 | 24 | papi 25 | -------------------------------------------------------------------------------- /python/tvm/meta_schedule/schedule/cuda/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Per-block schedule rules in MetaSchedule for target key 'cuda'""" 18 | 19 | from . import layout_transform 20 | -------------------------------------------------------------------------------- /python/tvm/relay/analysis/_ffi_api.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI APIs for Relay program analysis.""" 18 | import tvm._ffi 19 | 20 | tvm._ffi._init_api("relay.analysis", __name__) 21 | -------------------------------------------------------------------------------- /python/tvm/relay/backend/_vm.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """The Relay virtual machine FFI namespace. 18 | """ 19 | import tvm._ffi 20 | 21 | tvm._ffi._init_api("relay._vm", __name__) 22 | -------------------------------------------------------------------------------- /python/tvm/relay/op/random/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # pylint: disable=wildcard-import 18 | """PRNG related operators.""" 19 | from .kernel import * 20 | from . import _kernel 21 | -------------------------------------------------------------------------------- /python/tvm/script/parser/core/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """The core parser infra""" 18 | from . import diagnostics, dispatch, doc, doc_core, entry, evaluator, parser, utils 19 | -------------------------------------------------------------------------------- /python/tvm/topi/cuda/rcnn/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | # pylint: disable=wildcard-import 19 | """Faster R-CNN and Mask R-CNN operators""" 20 | from .proposal import proposal 21 | -------------------------------------------------------------------------------- /tests/lint/flake8.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | 19 | set -e 20 | 21 | python3 -m flake8 . --count --select=E9,F63,F7 --show-source --statistics --exclude 3rdparty 22 | -------------------------------------------------------------------------------- /apps/android_camera/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 15 | 16 | 17 | TVM Android Demo 18 | 19 | -------------------------------------------------------------------------------- /python/tvm/micro/base.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Base definitions for MicroTVM""" 18 | 19 | import tvm 20 | import tvm._ffi 21 | 22 | tvm._ffi._init_api("tvm.micro", "tvm.micro.base") 23 | -------------------------------------------------------------------------------- /python/tvm/relay/collage/_ffi_api.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI APIs for the Collage partitioner.""" 18 | import tvm._ffi 19 | 20 | 21 | tvm._ffi._init_api("relay.collage", __name__) 22 | -------------------------------------------------------------------------------- /python/tvm/relay/op/image/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # pylint: disable=wildcard-import 18 | """Image network related operators.""" 19 | from .image import * 20 | from . import _image 21 | -------------------------------------------------------------------------------- /python/tvm/relay/transform/_ffi_api.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI APIs for Relay transformation passes.""" 18 | import tvm._ffi 19 | 20 | tvm._ffi._init_api("relay._transform", __name__) 21 | -------------------------------------------------------------------------------- /python/tvm/tir/analysis/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Namespace of all TIR analysis utils.""" 18 | # pylint: disable=wildcard-import, invalid-name 19 | 20 | from .analysis import * 21 | -------------------------------------------------------------------------------- /python/tvm/tir/tensor_intrin/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # pylint: disable=unused-import 18 | """Intrinsics for tensorization.""" 19 | from . import arm_cpu, cuda, rocm, x86, hexagon 20 | -------------------------------------------------------------------------------- /python/tvm/topi/cpp/generic.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI for generic TOPI ops and schedules""" 18 | import tvm._ffi 19 | 20 | tvm._ffi._init_api("topi.generic", "tvm.topi.cpp.generic") 21 | -------------------------------------------------------------------------------- /python/tvm/contrib/cutlass/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """BYOC support for CUTLASS.""" 18 | from .build import has_cutlass, num_cutlass_partitions, finalize_modules, finalize_modules_vm 19 | -------------------------------------------------------------------------------- /python/tvm/tir/usmp/analysis/_ffi_api.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI APIs for tvm.tir.usmp.analysis""" 18 | import tvm._ffi 19 | 20 | 21 | tvm._ffi._init_api("tir.usmp.analysis", __name__) 22 | -------------------------------------------------------------------------------- /python/tvm/tir/usmp/transform/_ffi_api.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI APIs for tvm.tir.usmp.analysis""" 18 | import tvm._ffi 19 | 20 | 21 | tvm._ffi._init_api("tir.usmp.transform", __name__) 22 | -------------------------------------------------------------------------------- /docker/install/ubuntu_install_dgl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | 19 | set -e 20 | set -u 21 | set -o pipefail 22 | 23 | pip3 install dgl==v0.7.2 -f https://data.dgl.ai/wheels/repo.html 24 | -------------------------------------------------------------------------------- /python/tvm/contrib/ethosu/cascader/_ffi_api.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI APIs for the NPU cascader.""" 18 | import tvm._ffi 19 | 20 | 21 | tvm._ffi._init_api("contrib.ethosu.cascader", __name__) 22 | -------------------------------------------------------------------------------- /python/tvm/relay/dataflow_pattern/_ffi.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """DataFlow Pattern Language FFI bindings.""" 18 | import tvm._ffi 19 | 20 | tvm._ffi._init_api("relay.dataflow_pattern", __name__) 21 | -------------------------------------------------------------------------------- /python/tvm/topi/cpp/vision/yolo.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI for Yolo TOPI ops and schedules""" 18 | import tvm._ffi 19 | 20 | tvm._ffi._init_api("topi.vision.yolo", "tvm.topi.cpp.vision.yolo") 21 | -------------------------------------------------------------------------------- /docker/install/ubuntu_install_tensorflow.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | 19 | set -e 20 | set -u 21 | set -o pipefail 22 | 23 | pip3 install \ 24 | keras==2.9 \ 25 | tensorflow==2.9.1 26 | -------------------------------------------------------------------------------- /docs/reference/api/python/rpc.rst: -------------------------------------------------------------------------------- 1 | .. Licensed to the Apache Software Foundation (ASF) under one 2 | or more contributor license agreements. See the NOTICE file 3 | distributed with this work for additional information 4 | regarding copyright ownership. The ASF licenses this file 5 | to you under the Apache License, Version 2.0 (the 6 | "License"); you may not use this file except in compliance 7 | with the License. You may obtain a copy of the License at 8 | 9 | .. http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | .. Unless required by applicable law or agreed to in writing, 12 | software distributed under the License is distributed on an 13 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | KIND, either express or implied. See the License for the 15 | specific language governing permissions and limitations 16 | under the License. 17 | 18 | tvm.rpc 19 | ------- 20 | .. automodule:: tvm.rpc 21 | :members: 22 | :imported-members: 23 | :autosummary: 24 | -------------------------------------------------------------------------------- /python/tvm/relay/backend/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Backend codegen modules for relay.""" 18 | from . import te_compiler 19 | from .executor import Executor 20 | from .runtime import Runtime 21 | -------------------------------------------------------------------------------- /python/tvm/script/ir_builder/ir/_ffi_api.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI APIs""" 18 | import tvm._ffi 19 | 20 | tvm._ffi._init_api("script.ir_builder.ir", __name__) # pylint: disable=protected-access 21 | -------------------------------------------------------------------------------- /python/tvm/script/ir_builder/tir/_ffi_api.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI APIs""" 18 | import tvm._ffi 19 | 20 | tvm._ffi._init_api("script.ir_builder.tir", __name__) # pylint: disable=protected-access 21 | -------------------------------------------------------------------------------- /python/tvm/script/parser/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the Licens. 17 | """The parser""" 18 | from . import _core, ir, tir 19 | from ._core import parse 20 | from .ir import ir_module 21 | from .tir import prim_func 22 | -------------------------------------------------------------------------------- /python/tvm/script/parser/ir/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """The ir module parser""" 18 | 19 | from . import parser as _parser 20 | from .entry import ir_module 21 | 22 | __all__ = ["ir_module"] 23 | -------------------------------------------------------------------------------- /apps/android_camera/app/src/main/res/xml/provider_paths.xml: -------------------------------------------------------------------------------- 1 | 15 | 16 | 17 | 20 | 21 | -------------------------------------------------------------------------------- /conda/recipe/install_tvm_python.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | echo on 18 | 19 | cd %SRC_DIR%\python 20 | %PYTHON% setup.py install --single-version-externally-managed --record=%SRC_DIR%\record.txt 21 | -------------------------------------------------------------------------------- /python/tvm/micro/contrib/stm32/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | """Module container of STM32 code generator.""" 19 | 20 | from .emitter import CodeEmitter, get_input_tensor_name, get_output_tensor_name 21 | -------------------------------------------------------------------------------- /python/tvm/relay/op/vm/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # pylint: disable=wildcard-import 18 | """Dialect operators for Relay VM.""" 19 | from __future__ import absolute_import as _abs 20 | from .vm import * 21 | -------------------------------------------------------------------------------- /python/tvm/script/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """TVM Script APIs of TVM Python Package""" 18 | from .parser import ir, ir_module 19 | from .parser import parse as from_source 20 | from .parser import tir 21 | -------------------------------------------------------------------------------- /python/tvm/tir/schedule/_ffi_api.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI APIs for tvm.tir.schedule""" 18 | import tvm._ffi 19 | 20 | tvm._ffi._init_api("tir.schedule", __name__) # pylint: disable=protected-access 21 | -------------------------------------------------------------------------------- /apps/android_rpc/dev_tools/gen_keystore.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | CURR_DIR=$(cd `dirname $0`; pwd) 19 | keytool -genkey -keystore $CURR_DIR/tvmrpc.keystore -alias tvmrpc -keyalg RSA -validity 10000 20 | -------------------------------------------------------------------------------- /ci/scripts/github/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """Package to enable testing of Github scripts""" 18 | 19 | from . import github_skipped_tests_comment, github_pr_comment, github_tag_teams, github_docs_comment 20 | -------------------------------------------------------------------------------- /cmake/modules/contrib/CODEGENC.cmake: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | tvm_file_glob(GLOB CSOURCE_RELAY_CONTRIB_SRC src/relay/backend/contrib/codegen_c/*.cc) 19 | list(APPEND COMPILER_SRCS ${CSOURCE_RELAY_CONTRIB_SRC}) 20 | -------------------------------------------------------------------------------- /docs/reference/api/python/error.rst: -------------------------------------------------------------------------------- 1 | .. Licensed to the Apache Software Foundation (ASF) under one 2 | or more contributor license agreements. See the NOTICE file 3 | distributed with this work for additional information 4 | regarding copyright ownership. The ASF licenses this file 5 | to you under the Apache License, Version 2.0 (the 6 | "License"); you may not use this file except in compliance 7 | with the License. You may obtain a copy of the License at 8 | 9 | .. http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | .. Unless required by applicable law or agreed to in writing, 12 | software distributed under the License is distributed on an 13 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | KIND, either express or implied. See the License for the 15 | specific language governing permissions and limitations 16 | under the License. 17 | 18 | tvm.error 19 | --------- 20 | .. automodule:: tvm.error 21 | :members: 22 | :imported-members: 23 | :autosummary: 24 | -------------------------------------------------------------------------------- /docs/reference/api/python/micro.rst: -------------------------------------------------------------------------------- 1 | .. Licensed to the Apache Software Foundation (ASF) under one 2 | or more contributor license agreements. See the NOTICE file 3 | distributed with this work for additional information 4 | regarding copyright ownership. The ASF licenses this file 5 | to you under the Apache License, Version 2.0 (the 6 | "License"); you may not use this file except in compliance 7 | with the License. You may obtain a copy of the License at 8 | 9 | .. http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | .. Unless required by applicable law or agreed to in writing, 12 | software distributed under the License is distributed on an 13 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | KIND, either express or implied. See the License for the 15 | specific language governing permissions and limitations 16 | under the License. 17 | 18 | tvm.micro 19 | --------- 20 | .. automodule:: tvm.micro 21 | :members: 22 | :imported-members: 23 | :autosummary: 24 | -------------------------------------------------------------------------------- /python/tvm/meta_schedule/_ffi_api.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI APIs for tvm.meta_schedule""" 18 | from .._ffi import _init_api 19 | 20 | _init_api("meta_schedule", __name__) # pylint: disable=protected-access 21 | -------------------------------------------------------------------------------- /python/tvm/relay/op/dyn/nn/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # pylint: disable=wildcard-import, redefined-builtin, invalid-name 18 | """The Relay namespace containing dynamic ops.""" 19 | 20 | from . import _nn 21 | -------------------------------------------------------------------------------- /python/tvm/script/printer/_ffi_api.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI APIs for tvm.script.printer""" 18 | import tvm._ffi 19 | 20 | tvm._ffi._init_api("script.printer", __name__) # pylint: disable=protected-access 21 | -------------------------------------------------------------------------------- /apps/android_deploy/dev_tools/gen_keystore.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | CURR_DIR=$(cd `dirname $0`; pwd) 19 | keytool -genkey -keystore $CURR_DIR/tvmdemo.keystore -alias tvmdemo -keyalg RSA -validity 10000 20 | -------------------------------------------------------------------------------- /docs/reference/api/python/target.rst: -------------------------------------------------------------------------------- 1 | .. Licensed to the Apache Software Foundation (ASF) under one 2 | or more contributor license agreements. See the NOTICE file 3 | distributed with this work for additional information 4 | regarding copyright ownership. The ASF licenses this file 5 | to you under the Apache License, Version 2.0 (the 6 | "License"); you may not use this file except in compliance 7 | with the License. You may obtain a copy of the License at 8 | 9 | .. http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | .. Unless required by applicable law or agreed to in writing, 12 | software distributed under the License is distributed on an 13 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | KIND, either express or implied. See the License for the 15 | specific language governing permissions and limitations 16 | under the License. 17 | 18 | tvm.target 19 | ---------- 20 | .. automodule:: tvm.target 21 | :members: 22 | :imported-members: 23 | :autosummary: 24 | -------------------------------------------------------------------------------- /python/tvm/driver/tvmc/__main__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """ 18 | TVMC - TVM driver command-line interface 19 | """ 20 | 21 | from tvm.driver import tvmc 22 | 23 | if __name__ == "__main__": 24 | tvmc.main.main() 25 | -------------------------------------------------------------------------------- /python/tvm/relay/backend/contrib/uma/api/_ffi_api.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI APIs for relay transformation passes.""" 18 | import tvm._ffi # type: ignore 19 | 20 | tvm._ffi._init_api("relay.ext.uma", __name__) 21 | -------------------------------------------------------------------------------- /python/tvm/relay/quantize/_quantize.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # pylint: disable=unused-argument 18 | """Internal module for quantization.""" 19 | import tvm._ffi 20 | 21 | tvm._ffi._init_api("relay._quantize", __name__) 22 | -------------------------------------------------------------------------------- /python/tvm/script/printer/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """ 18 | TVMScript Unified Printer 19 | This package provides a set of APIs to print supported TVM IR into TVMScript 20 | in a roundtrippable way. 21 | """ 22 | -------------------------------------------------------------------------------- /python/tvm/topi/gpu/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | # pylint: disable=redefined-builtin, wildcard-import 19 | """GPU specific declaration and schedules.""" 20 | from .dense import * 21 | from .conv2d import * 22 | -------------------------------------------------------------------------------- /tests/scripts/task_clean.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | set -euxo pipefail 19 | 20 | echo "Cleanup data..." 21 | cd $1 && rm -rf standalone_crt && rm -rf host_standalone_crt && rm -rf CMake* && cd .. 22 | -------------------------------------------------------------------------------- /apps/android_camera/dev_tools/gen_keystore.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | 19 | CURR_DIR=$(cd `dirname $0`; pwd) 20 | keytool -genkey -keystore $CURR_DIR/tvmdemo.keystore -alias tvmdemo -keyalg RSA -validity 10000 21 | -------------------------------------------------------------------------------- /conda/recipe/install_tvm_python.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | 19 | set -e 20 | set -u 21 | 22 | cd ${SRC_DIR}/python 23 | ${PYTHON} setup.py install --single-version-externally-managed --record=/tmp/record.txt 24 | -------------------------------------------------------------------------------- /docs/reference/api/python/graph_executor.rst: -------------------------------------------------------------------------------- 1 | .. Licensed to the Apache Software Foundation (ASF) under one 2 | or more contributor license agreements. See the NOTICE file 3 | distributed with this work for additional information 4 | regarding copyright ownership. The ASF licenses this file 5 | to you under the Apache License, Version 2.0 (the 6 | "License"); you may not use this file except in compliance 7 | with the License. You may obtain a copy of the License at 8 | 9 | .. http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | .. Unless required by applicable law or agreed to in writing, 12 | software distributed under the License is distributed on an 13 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | KIND, either express or implied. See the License for the 15 | specific language governing permissions and limitations 16 | under the License. 17 | 18 | tvm.contrib.graph_executor 19 | -------------------------- 20 | .. automodule:: tvm.contrib.graph_executor 21 | :members: 22 | -------------------------------------------------------------------------------- /python/tvm/auto_scheduler/_ffi_api.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | """ Register FFI APIs from C++ for the namespace tvm.auto_scheduler. """ 19 | import tvm._ffi 20 | 21 | 22 | tvm._ffi._init_api("auto_scheduler", __name__) 23 | -------------------------------------------------------------------------------- /python/tvm/relay/op/annotation/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # pylint: disable=wildcard-import 18 | """Annotation related operators.""" 19 | from __future__ import absolute_import as _abs 20 | from .annotation import * 21 | -------------------------------------------------------------------------------- /python/tvm/relay/op/dyn/image/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # pylint: disable=wildcard-import, redefined-builtin, invalid-name 18 | """The Relay namespace containing dynamic image ops.""" 19 | 20 | from . import _image 21 | -------------------------------------------------------------------------------- /python/tvm/script/ir_builder/_ffi_api.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | """FFI APIs for tvm.script.ir_builder""" 18 | import tvm._ffi 19 | 20 | tvm._ffi._init_api("script.ir_builder", __name__) # pylint: disable=protected-access 21 | -------------------------------------------------------------------------------- /python/tvm/tir/usmp/analysis/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # pylint: disable=unused-import, redefined-builtin 18 | """Namespace for Unified Static Memory Planner""" 19 | 20 | from .analysis import extract_buffer_info 21 | -------------------------------------------------------------------------------- /python/tvm/topi/cuda/ssd/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | # pylint: disable=wildcard-import 19 | """VISION network operators""" 20 | from __future__ import absolute_import as _abs 21 | 22 | from .multibox import * 23 | -------------------------------------------------------------------------------- /python/tvm/topi/vision/ssd/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | # pylint: disable=wildcard-import 19 | """VISION network operators""" 20 | from __future__ import absolute_import as _abs 21 | 22 | from .multibox import * 23 | -------------------------------------------------------------------------------- /tests/scripts/task_python_integration_i386only.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | set -euxo pipefail 19 | 20 | 21 | export TVM_INTEGRATION_I386_ONLY=1 22 | 23 | ./tests/scripts/task_python_integration.sh 24 | -------------------------------------------------------------------------------- /docker/install/ubuntu_setup_tz.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | 19 | set -e 20 | set -u 21 | set -o pipefail 22 | 23 | export TZ=Etc/UTC 24 | ln -snf /usr/share/zoneinfo/$TZ /etc/localtime 25 | echo $TZ > /etc/timezone 26 | -------------------------------------------------------------------------------- /docs/reference/api/python/driver.rst: -------------------------------------------------------------------------------- 1 | .. Licensed to the Apache Software Foundation (ASF) under one 2 | or more contributor license agreements. See the NOTICE file 3 | distributed with this work for additional information 4 | regarding copyright ownership. The ASF licenses this file 5 | to you under the Apache License, Version 2.0 (the 6 | "License"); you may not use this file except in compliance 7 | with the License. You may obtain a copy of the License at 8 | 9 | .. http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | .. Unless required by applicable law or agreed to in writing, 12 | software distributed under the License is distributed on an 13 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | KIND, either express or implied. See the License for the 15 | specific language governing permissions and limitations 16 | under the License. 17 | 18 | tvm.driver 19 | ---------- 20 | .. automodule:: tvm.driver 21 | 22 | .. autofunction:: tvm.lower 23 | 24 | .. autofunction:: tvm.build 25 | -------------------------------------------------------------------------------- /docs/reference/api/python/relay/nn.rst: -------------------------------------------------------------------------------- 1 | .. Licensed to the Apache Software Foundation (ASF) under one 2 | or more contributor license agreements. See the NOTICE file 3 | distributed with this work for additional information 4 | regarding copyright ownership. The ASF licenses this file 5 | to you under the Apache License, Version 2.0 (the 6 | "License"); you may not use this file except in compliance 7 | with the License. You may obtain a copy of the License at 8 | 9 | .. http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | .. Unless required by applicable law or agreed to in writing, 12 | software distributed under the License is distributed on an 13 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | KIND, either express or implied. See the License for the 15 | specific language governing permissions and limitations 16 | under the License. 17 | 18 | tvm.relay.nn 19 | ------------ 20 | .. automodule:: tvm.relay.nn 21 | :members: 22 | :imported-members: 23 | :autosummary: 24 | --------------------------------------------------------------------------------