├── apps
├── sgx
│ ├── .gitignore
│ ├── enclave
│ │ ├── .rustfmt.toml
│ │ ├── enclave.lds
│ │ ├── enclave_config.xml.in
│ │ ├── sgx-deps.diff
│ │ ├── x86_64-unknown-linux-sgx.json
│ │ ├── build.rs
│ │ ├── Xargo.toml
│ │ └── Cargo.toml
│ └── run_example.sh
├── extension
│ └── .gitignore
├── android_rpc
│ ├── app
│ │ ├── .gitignore
│ │ └── src
│ │ │ └── main
│ │ │ ├── res
│ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ └── values
│ │ │ │ └── colors.xml
│ │ │ └── jni
│ │ │ ├── Application.mk
│ │ │ └── Android.mk
│ ├── .gitignore
│ ├── settings.gradle
│ └── dev_tools
│ │ ├── gen_keystore.sh
│ │ └── sign_apk.sh
├── android_deploy
│ ├── app
│ │ ├── .gitignore
│ │ └── src
│ │ │ └── main
│ │ │ ├── jni
│ │ │ ├── Application.mk
│ │ │ ├── make
│ │ │ │ └── config.mk
│ │ │ └── Android.mk
│ │ │ └── res
│ │ │ ├── values
│ │ │ ├── strings.xml
│ │ │ └── colors.xml
│ │ │ └── xml
│ │ │ └── provider_paths.xml
│ ├── .gitignore
│ ├── settings.gradle
│ └── dev_tools
│ │ ├── gen_keystore.sh
│ │ └── sign_apk.sh
├── ios_rpc
│ ├── .gitignore
│ ├── tvmrpc.xcodeproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ ├── tvmrpcLauncher
│ │ └── Info.plist
│ └── tvmrpc
│ │ ├── AppDelegate.h
│ │ └── main.m
├── rocm_rpc
│ └── start_rpc_server.sh
└── vta_rpc
│ └── start_rpc_server.sh
├── docs
├── vta
│ ├── .gitignore
│ └── hardware.rst
├── .gitignore
├── _static
│ ├── img
│ │ ├── tvm-logo-small.png
│ │ ├── tvm-logo-square.png
│ │ └── README
│ └── css
│ │ └── tvm_theme.css
├── genindex.rst
├── api
│ └── python
│ │ ├── module.rst
│ │ ├── target.rst
│ │ ├── container.rst
│ │ ├── error.rst
│ │ ├── graph_runtime.rst
│ │ ├── build.rst
│ │ ├── relay
│ │ ├── nn.rst
│ │ ├── module.rst
│ │ ├── image.rst
│ │ ├── scope_builder.rst
│ │ ├── vision.rst
│ │ └── backend.rst
│ │ ├── bridge.rst
│ │ ├── function.rst
│ │ ├── nnvm
│ │ ├── graph.rst
│ │ ├── symbol.rst
│ │ ├── index.rst
│ │ ├── top.rst
│ │ └── testing.rst
│ │ └── hybrid.rst
├── README.txt
└── api_links.rst
├── python
├── tvm
│ ├── relay
│ │ ├── grammar
│ │ │ ├── __init__.py
│ │ │ ├── .gitignore
│ │ │ └── py3
│ │ │ │ └── .gitattributes
│ │ ├── backend
│ │ │ ├── __init__.py
│ │ │ ├── _vmobj.py
│ │ │ └── _vm.py
│ │ ├── op
│ │ │ ├── _make.py
│ │ │ ├── nn
│ │ │ │ ├── _make.py
│ │ │ │ └── __init__.py
│ │ │ ├── image
│ │ │ │ ├── _make.py
│ │ │ │ └── __init__.py
│ │ │ ├── contrib
│ │ │ │ ├── _make.py
│ │ │ │ └── __init__.py
│ │ │ ├── vision
│ │ │ │ ├── _make.py
│ │ │ │ └── __init__.py
│ │ │ └── annotation
│ │ │ │ ├── _make.py
│ │ │ │ └── __init__.py
│ │ ├── qnn
│ │ │ ├── op
│ │ │ │ ├── _make.py
│ │ │ │ └── __init__.py
│ │ │ └── __init__.py
│ │ ├── _analysis.py
│ │ ├── _transform.py
│ │ ├── contrib.py
│ │ ├── nn.py
│ │ ├── image.py
│ │ ├── vision.py
│ │ ├── _base.py
│ │ ├── _expr.py
│ │ ├── _module.pyi
│ │ ├── _module.py
│ │ ├── annotation.py
│ │ ├── quantize
│ │ │ ├── _quantize.py
│ │ │ └── __init__.py
│ │ ├── std
│ │ │ └── prelude.rly
│ │ ├── _build_module.py
│ │ └── _make.py
│ ├── contrib
│ │ ├── debugger
│ │ │ └── __init__.py
│ │ └── __init__.py
│ ├── micro
│ │ └── __init__.py
│ ├── _ffi
│ │ ├── _cy2
│ │ │ └── __init__.py
│ │ ├── _cy3
│ │ │ └── __init__.py
│ │ ├── _ctypes
│ │ │ └── __init__.py
│ │ └── _cython
│ │ │ └── core.pyx
│ ├── exec
│ │ └── __init__.py
│ ├── node.py
│ ├── _pyversion.py
│ └── autotvm
│ │ ├── graph_tuner
│ │ ├── _base.py
│ │ └── __init__.py
│ │ └── measure
│ │ └── __init__.py
└── .gitignore
├── nnvm
├── python
│ ├── .gitignore
│ └── nnvm
│ │ ├── _cy3
│ │ ├── __init__.py
│ │ └── README
│ │ ├── _ctypes
│ │ ├── README
│ │ └── __init__.py
│ │ ├── cython
│ │ └── README
│ │ ├── _cy2
│ │ ├── __init__.py
│ │ └── README
│ │ ├── frontend
│ │ └── __init__.py
│ │ ├── __init__.py
│ │ ├── top
│ │ └── __init__.py
│ │ ├── testing
│ │ └── __init__.py
│ │ ├── compiler
│ │ ├── __init__.py
│ │ └── graph_pass.py
│ │ ├── contrib.py
│ │ └── _symbol_internal.py
├── amalgamation
│ ├── .gitignore
│ └── README
├── tests
│ ├── cpp
│ │ ├── .gitignore
│ │ └── unittest.mk
│ └── python
│ │ └── frontend
│ │ ├── coreml
│ │ └── model_zoo
│ │ │ ├── .gitignore
│ │ │ └── __init__.py
│ │ └── caffe2
│ │ └── model_zoo
│ │ └── __init__.py
├── include
│ └── nnvm
│ │ └── top
│ │ └── README
└── tutorials
│ ├── README.txt
│ └── .gitignore
├── vta
├── hardware
│ ├── chisel
│ │ ├── .gitignore
│ │ ├── project
│ │ │ ├── build.properties
│ │ │ └── plugins.sbt
│ │ ├── .scalafmt.conf
│ │ └── src
│ │ │ ├── main
│ │ │ └── scala
│ │ │ │ └── core
│ │ │ │ └── package.scala
│ │ │ └── test
│ │ │ └── scala
│ │ │ └── unittest
│ │ │ └── utils
│ │ │ └── Helper.scala
│ ├── xilinx
│ │ ├── .gitignore
│ │ ├── README.md
│ │ └── scripts
│ │ │ └── hsi.tcl
│ └── intel
│ │ └── README.md
├── apps
│ └── tsim_example
│ │ ├── python
│ │ └── __init__.py
│ │ └── hardware
│ │ └── chisel
│ │ ├── project
│ │ ├── build.properties
│ │ └── plugins.sbt
│ │ └── .scalafmt.conf
├── python
│ └── vta
│ │ ├── exec
│ │ └── __init__.py
│ │ ├── testing
│ │ └── __init__.py
│ │ ├── top
│ │ ├── __init__.py
│ │ └── util.py
│ │ └── __init__.py
├── tutorials
│ ├── autotvm
│ │ └── README.txt
│ ├── optimize
│ │ └── README.txt
│ ├── frontend
│ │ └── README.txt
│ └── README.txt
└── config
│ ├── fsim_sample.json
│ ├── pynq_sample.json
│ ├── tsim_sample.json
│ ├── vta_config.json
│ ├── ultra96_sample.json
│ └── de10nano_sample.json
├── tests
├── cpp
│ └── .gitignore
├── scripts
│ ├── packages.mk
│ ├── task_build.sh
│ ├── task_clean.sh
│ ├── task_web_build.sh
│ ├── task_cpp_unittest.sh
│ ├── task_verilog_test.sh
│ ├── task_golang.sh
│ └── task_python_unittest.sh
├── python
│ └── frontend
│ │ ├── caffe2
│ │ └── model_zoo
│ │ │ └── __init__.py
│ │ └── coreml
│ │ └── model_zoo
│ │ └── __init__.py
├── lint
│ └── rat-excludes
└── travis
│ └── travis_after_failure.sh
├── rust
├── runtime
│ ├── tests
│ │ ├── .gitignore
│ │ ├── test_tvm_dso
│ │ │ └── Cargo.toml
│ │ ├── test_tvm_basic
│ │ │ └── Cargo.toml
│ │ └── test_nnvm
│ │ │ └── Cargo.toml
│ └── .travis.yml
├── .gitignore
├── frontend
│ ├── tests
│ │ ├── basics
│ │ │ ├── .gitignore
│ │ │ └── Cargo.toml
│ │ └── callback
│ │ │ └── Cargo.toml
│ ├── .gitignore
│ ├── .travis.yml
│ └── examples
│ │ └── resnet
│ │ └── Cargo.toml
├── Cargo.toml
└── common
│ └── Cargo.toml
├── tutorials
├── autotvm
│ └── README.txt
├── dev
│ └── README.txt
├── optimize
│ └── README.txt
├── topi
│ └── README.txt
├── README.txt
├── language
│ └── README.txt
└── frontend
│ └── README.txt
├── NOTICE
├── src
└── codegen
│ └── opt
│ └── README
├── topi
└── python
│ └── topi
│ ├── cuda
│ ├── rcnn
│ │ └── __init__.py
│ ├── ssd
│ │ └── __init__.py
│ └── __init__.py
│ ├── image
│ └── __init__.py
│ ├── vision
│ ├── ssd
│ │ └── __init__.py
│ ├── rcnn
│ │ └── __init__.py
│ └── __init__.py
│ ├── intel_graphics
│ └── __init__.py
│ ├── sparse
│ └── __init__.py
│ ├── arm_cpu
│ └── __init__.py
│ ├── rocm
│ └── __init__.py
│ ├── mali
│ └── __init__.py
│ ├── hls
│ └── __init__.py
│ ├── opengl
│ └── __init__.py
│ ├── generic
│ └── __init__.py
│ ├── nn
│ └── __init__.py
│ └── x86
│ └── __init__.py
├── .github
├── PULL_REQUEST_TEMPLATE.md
├── CODEOWNERS
└── ISSUE_TEMPLATE.md
├── .gitmodules
├── .clang-format
├── 3rdparty
└── cma
│ └── settings.mk
├── conda
└── conda_build_config.yaml
├── docker
├── install
│ ├── ubuntu_install_dgl.sh
│ ├── ubuntu_install_gluoncv.sh
│ ├── ubuntu_install_coreml.sh
│ ├── ubuntu_install_mxnet.sh
│ ├── ubuntu_install_tensorflow.sh
│ ├── ubuntu_install_antlr.sh
│ ├── ubuntu_install_redis.sh
│ ├── ubuntu_install_opengl.sh
│ ├── ubuntu_install_sphinx.sh
│ ├── ubuntu_install_caffe2.sh
│ ├── ubuntu_install_golang.sh
│ ├── ubuntu_install_onnx.sh
│ ├── ubuntu_install_python_package.sh
│ ├── ubuntu_install_darknet.sh
│ ├── ubuntu_install_rat.sh
│ ├── ubuntu_install_vulkan.sh
│ ├── ubuntu_install_iverilog.sh
│ └── ubuntu_install_rocm.sh
└── Dockerfile.ci_jekyll
├── cmake
└── modules
│ ├── contrib
│ ├── HybridDump.cmake
│ ├── Sort.cmake
│ └── Random.cmake
│ └── Micro.cmake
└── jvm
├── core
└── src
│ └── main
│ └── java
│ └── ml
│ └── dmlc
│ └── tvm
│ ├── TVMValueNull.java
│ ├── rpc
│ └── ServerProcessor.java
│ ├── TVMValueLong.java
│ ├── TVMValueBytes.java
│ ├── TVMValueString.java
│ └── TVMValueDouble.java
└── conf
└── log4j.properties
/apps/sgx/.gitignore:
--------------------------------------------------------------------------------
1 | lib/
2 |
--------------------------------------------------------------------------------
/docs/vta/.gitignore:
--------------------------------------------------------------------------------
1 | tutorials
--------------------------------------------------------------------------------
/apps/extension/.gitignore:
--------------------------------------------------------------------------------
1 | lib
2 |
--------------------------------------------------------------------------------
/python/tvm/relay/grammar/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/apps/android_rpc/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/nnvm/python/.gitignore:
--------------------------------------------------------------------------------
1 | *.c
2 | *.cpp
3 |
--------------------------------------------------------------------------------
/python/tvm/contrib/debugger/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/apps/android_deploy/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/apps/ios_rpc/.gitignore:
--------------------------------------------------------------------------------
1 | rpc_config.txt
2 |
3 |
--------------------------------------------------------------------------------
/python/.gitignore:
--------------------------------------------------------------------------------
1 | build
2 | dist
3 | *.cpp
4 |
--------------------------------------------------------------------------------
/python/tvm/relay/grammar/.gitignore:
--------------------------------------------------------------------------------
1 | /.antlr/
2 |
--------------------------------------------------------------------------------
/vta/hardware/chisel/.gitignore:
--------------------------------------------------------------------------------
1 | test_run_dir
2 |
--------------------------------------------------------------------------------
/docs/.gitignore:
--------------------------------------------------------------------------------
1 | doxygen
2 | modules
3 | tutorials
4 |
--------------------------------------------------------------------------------
/nnvm/amalgamation/.gitignore:
--------------------------------------------------------------------------------
1 | nnvm.d
2 | nnvm.cc
3 |
--------------------------------------------------------------------------------
/tests/cpp/.gitignore:
--------------------------------------------------------------------------------
1 | unittest
2 | *.d
3 | *_test
4 |
--------------------------------------------------------------------------------
/apps/sgx/enclave/.rustfmt.toml:
--------------------------------------------------------------------------------
1 | ../../../rust/.rustfmt.toml
--------------------------------------------------------------------------------
/nnvm/tests/cpp/.gitignore:
--------------------------------------------------------------------------------
1 | unittest
2 | *.d
3 | *_test
4 |
--------------------------------------------------------------------------------
/rust/runtime/tests/.gitignore:
--------------------------------------------------------------------------------
1 | *.json
2 | *.params
3 | *.o
4 |
--------------------------------------------------------------------------------
/vta/apps/tsim_example/python/__init__.py:
--------------------------------------------------------------------------------
1 | from . import tsim
2 |
--------------------------------------------------------------------------------
/nnvm/include/nnvm/top/README:
--------------------------------------------------------------------------------
1 | NNVM Core Operator and Compiler
2 |
--------------------------------------------------------------------------------
/nnvm/python/nnvm/_cy3/__init__.py:
--------------------------------------------------------------------------------
1 | """Cython generated modules"""
2 |
--------------------------------------------------------------------------------
/tutorials/autotvm/README.txt:
--------------------------------------------------------------------------------
1 | Auto tuning
2 | -------------
3 |
4 |
--------------------------------------------------------------------------------
/vta/python/vta/exec/__init__.py:
--------------------------------------------------------------------------------
1 | """VTA Command line utils."""
2 |
--------------------------------------------------------------------------------
/NOTICE:
--------------------------------------------------------------------------------
1 | TVM End to End Deep Learning Compiler Stack: https://tvm.ai/
2 |
--------------------------------------------------------------------------------
/vta/hardware/xilinx/.gitignore:
--------------------------------------------------------------------------------
1 | build
2 | *.out
3 | *.log
4 | *.sb
5 |
--------------------------------------------------------------------------------
/vta/tutorials/autotvm/README.txt:
--------------------------------------------------------------------------------
1 | Auto tuning
2 | -------------
3 |
4 |
--------------------------------------------------------------------------------
/rust/.gitignore:
--------------------------------------------------------------------------------
1 | target/
2 | *.rs.bk
3 | Cargo.lock
4 | c_runtime_api.rs
5 |
--------------------------------------------------------------------------------
/tutorials/dev/README.txt:
--------------------------------------------------------------------------------
1 | Developer Tutorials
2 | -------------------
3 |
4 |
--------------------------------------------------------------------------------
/nnvm/python/nnvm/_ctypes/README:
--------------------------------------------------------------------------------
1 | Ctypes specific implementation of certain modules
--------------------------------------------------------------------------------
/nnvm/python/nnvm/_ctypes/__init__.py:
--------------------------------------------------------------------------------
1 | """"ctypes implementation of the Symbol"""
2 |
--------------------------------------------------------------------------------
/nnvm/python/nnvm/cython/README:
--------------------------------------------------------------------------------
1 | Cython specific implementation of certain modules
--------------------------------------------------------------------------------
/nnvm/amalgamation/README:
--------------------------------------------------------------------------------
1 | This folder is deprecated and will be deleted in the future.
--------------------------------------------------------------------------------
/nnvm/tests/python/frontend/coreml/model_zoo/.gitignore:
--------------------------------------------------------------------------------
1 | *.mlmodel
2 | *.jpg
3 | *.png
4 |
--------------------------------------------------------------------------------
/tutorials/optimize/README.txt:
--------------------------------------------------------------------------------
1 | Optimize Tensor Operators
2 | -------------------------
3 |
--------------------------------------------------------------------------------
/tutorials/topi/README.txt:
--------------------------------------------------------------------------------
1 | TOPI: TVM Operator Inventory
2 | ----------------------------
3 |
--------------------------------------------------------------------------------
/vta/tutorials/optimize/README.txt:
--------------------------------------------------------------------------------
1 | Optimize Tensor Operators
2 | -------------------------
3 |
--------------------------------------------------------------------------------
/nnvm/python/nnvm/_cy2/__init__.py:
--------------------------------------------------------------------------------
1 | """Namespace for cython generated modules for python2"""
2 |
--------------------------------------------------------------------------------
/tutorials/README.txt:
--------------------------------------------------------------------------------
1 | Tutorials
2 | =========
3 | This page contains the tutorials about TVM.
4 |
--------------------------------------------------------------------------------
/nnvm/python/nnvm/_cy3/README:
--------------------------------------------------------------------------------
1 | This folder is by default empty and will hold DLLs generated by cython.
--------------------------------------------------------------------------------
/tutorials/language/README.txt:
--------------------------------------------------------------------------------
1 | Tensor Expression and Schedules
2 | -------------------------------
3 |
--------------------------------------------------------------------------------
/nnvm/python/nnvm/_cy2/README:
--------------------------------------------------------------------------------
1 | This folder is by default empty and will hold DLLs generated by cython.
2 |
--------------------------------------------------------------------------------
/nnvm/tutorials/README.txt:
--------------------------------------------------------------------------------
1 | .. _tutorial-nnvm:
2 |
3 | NNVM Compiler Tutorials
4 | -----------------------
5 |
--------------------------------------------------------------------------------
/src/codegen/opt/README:
--------------------------------------------------------------------------------
1 | This folder contains optional builds for codegen depending on compilation options.
2 |
--------------------------------------------------------------------------------
/rust/frontend/tests/basics/.gitignore:
--------------------------------------------------------------------------------
1 | /target
2 | **/*.rs.bk
3 | Cargo.lock
4 | *.o
5 | *.so
6 | *.ptx
7 | *.json
8 |
--------------------------------------------------------------------------------
/tutorials/frontend/README.txt:
--------------------------------------------------------------------------------
1 | .. _tutorial-frontend:
2 |
3 | Compile Deep Learning Models
4 | ----------------------------
5 |
--------------------------------------------------------------------------------
/docs/_static/img/tvm-logo-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/onnxruntime-tvm/HEAD/docs/_static/img/tvm-logo-small.png
--------------------------------------------------------------------------------
/docs/_static/img/tvm-logo-square.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/onnxruntime-tvm/HEAD/docs/_static/img/tvm-logo-square.png
--------------------------------------------------------------------------------
/vta/tutorials/frontend/README.txt:
--------------------------------------------------------------------------------
1 | .. _tutorial-frontend:
2 |
3 | Compile Deep Learning Models
4 | ----------------------------
5 |
--------------------------------------------------------------------------------
/python/tvm/relay/grammar/py3/.gitattributes:
--------------------------------------------------------------------------------
1 | Relay* binary
2 | Relay* linguist-generated=true
3 | Relay* linguist-detectable=false
4 |
--------------------------------------------------------------------------------
/vta/python/vta/testing/__init__.py:
--------------------------------------------------------------------------------
1 | """Testing utilities, this namespace is not imported by default."""
2 |
3 | from . util import run
4 |
--------------------------------------------------------------------------------
/vta/tutorials/README.txt:
--------------------------------------------------------------------------------
1 | VTA Tutorials
2 | =============
3 | This page contains tutorials about VTA and how to use TVM/Relay to target VTA.
4 |
--------------------------------------------------------------------------------
/topi/python/topi/cuda/rcnn/__init__.py:
--------------------------------------------------------------------------------
1 | # pylint: disable=wildcard-import
2 | """Faster R-CNN and Mask R-CNN operators"""
3 | from .proposal import *
4 |
--------------------------------------------------------------------------------
/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.
--------------------------------------------------------------------------------
/nnvm/tutorials/.gitignore:
--------------------------------------------------------------------------------
1 | *.pb
2 | *.mlmodel
3 | *.ttf
4 | *.txt
5 | *synset*txt
6 | *.cfg
7 | ssd_model
8 | *.names
9 | *.jpg
10 | *.pbtxt
11 | *.weights
12 |
--------------------------------------------------------------------------------
/rust/frontend/.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 |
--------------------------------------------------------------------------------
/apps/android_rpc/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/onnxruntime-tvm/HEAD/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/microsoft/onnxruntime-tvm/HEAD/apps/android_rpc/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/topi/python/topi/image/__init__.py:
--------------------------------------------------------------------------------
1 | # pylint: disable=wildcard-import
2 | """IMAGE network operators"""
3 | from __future__ import absolute_import as _abs
4 |
5 | from .resize import *
6 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/apps/sgx/enclave/enclave.lds:
--------------------------------------------------------------------------------
1 | enclave.so
2 | {
3 | global:
4 | g_global_data_sim;
5 | g_global_data;
6 | enclave_entry;
7 | local:
8 | *;
9 | };
10 |
--------------------------------------------------------------------------------
/topi/python/topi/cuda/ssd/__init__.py:
--------------------------------------------------------------------------------
1 | # pylint: disable=wildcard-import
2 | """VISION network operators"""
3 | from __future__ import absolute_import as _abs
4 |
5 | from .multibox import *
6 |
--------------------------------------------------------------------------------
/topi/python/topi/vision/ssd/__init__.py:
--------------------------------------------------------------------------------
1 | # pylint: disable=wildcard-import
2 | """VISION network operators"""
3 | from __future__ import absolute_import as _abs
4 |
5 | from .multibox import *
6 |
--------------------------------------------------------------------------------
/topi/python/topi/vision/rcnn/__init__.py:
--------------------------------------------------------------------------------
1 | # pylint: disable=wildcard-import
2 | """Faster R-CNN and Mask R-CNN operators"""
3 | from .roi_align import *
4 | from .roi_pool import *
5 | from .proposal import *
6 |
--------------------------------------------------------------------------------
/topi/python/topi/intel_graphics/__init__.py:
--------------------------------------------------------------------------------
1 | # pylint: disable=redefined-builtin, wildcard-import
2 | """Intel Gen9 GPU specific declaration and schedules."""
3 | from __future__ import absolute_import as _abs
4 |
5 | from .conv2d import *
6 |
--------------------------------------------------------------------------------
/topi/python/topi/sparse/__init__.py:
--------------------------------------------------------------------------------
1 | # pylint: disable=wildcard-import
2 | """Sparse operators"""
3 | from __future__ import absolute_import as _abs
4 |
5 | from .csrmv import csrmv
6 | from .csrmm import csrmm
7 | from .dense import dense
8 |
--------------------------------------------------------------------------------
/apps/ios_rpc/tvmrpc.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/topi/python/topi/vision/__init__.py:
--------------------------------------------------------------------------------
1 | # pylint: disable=wildcard-import
2 | """VISION network operators"""
3 | from __future__ import absolute_import as _abs
4 |
5 | from . import ssd
6 | from .reorg import *
7 | from .nms import *
8 | from .rcnn import *
9 |
--------------------------------------------------------------------------------
/topi/python/topi/arm_cpu/__init__.py:
--------------------------------------------------------------------------------
1 | """Schedule for ARM CPU"""
2 |
3 | from . import conv2d
4 | from . import depthwise_conv2d
5 | from . import conv2d_transpose
6 | from . import bitserial_conv2d
7 | from . import bitserial_dense
8 | from . import injective
9 |
--------------------------------------------------------------------------------
/topi/python/topi/rocm/__init__.py:
--------------------------------------------------------------------------------
1 | # pylint: disable=redefined-builtin, wildcard-import
2 | """rocm specific declaration and schedules."""
3 | from __future__ import absolute_import as _abs
4 |
5 | from .conv2d import *
6 | from .dense import *
7 | from .nn import *
8 |
--------------------------------------------------------------------------------
/topi/python/topi/mali/__init__.py:
--------------------------------------------------------------------------------
1 | # pylint: disable=redefined-builtin, wildcard-import
2 | """ARM Mali GPU specific declaration and schedules."""
3 | from __future__ import absolute_import as _abs
4 |
5 | from .conv2d import *
6 | from .depthwise_conv2d import *
7 | from .dense import *
8 |
--------------------------------------------------------------------------------
/topi/python/topi/hls/__init__.py:
--------------------------------------------------------------------------------
1 | # pylint: disable=redefined-builtin, wildcard-import
2 | """HLS specific declaration and schedules."""
3 | from __future__ import absolute_import as _abs
4 |
5 | from .injective import schedule_injective, schedule_elemwise, schedule_broadcast
6 | from .nn import *
7 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | Thanks for contributing to TVM! Please refer to guideline https://docs.tvm.ai/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from [Reviewers](https://github.com/dmlc/tvm/blob/master/CONTRIBUTORS.md#reviewers).
2 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "dmlc-core"]
2 | path = 3rdparty/dmlc-core
3 | url = https://github.com/dmlc/dmlc-core
4 | [submodule "dlpack"]
5 | path = 3rdparty/dlpack
6 | url = https://github.com/dmlc/dlpack
7 | [submodule "3rdparty/rang"]
8 | path = 3rdparty/rang
9 | url = https://github.com/agauniyal/rang
10 |
--------------------------------------------------------------------------------
/.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 |
--------------------------------------------------------------------------------
/vta/config/fsim_sample.json:
--------------------------------------------------------------------------------
1 | {
2 | "TARGET" : "sim",
3 | "HW_VER" : "0.0.1",
4 | "LOG_INP_WIDTH" : 3,
5 | "LOG_WGT_WIDTH" : 3,
6 | "LOG_ACC_WIDTH" : 5,
7 | "LOG_BATCH" : 0,
8 | "LOG_BLOCK" : 4,
9 | "LOG_UOP_BUFF_SIZE" : 15,
10 | "LOG_INP_BUFF_SIZE" : 15,
11 | "LOG_WGT_BUFF_SIZE" : 18,
12 | "LOG_ACC_BUFF_SIZE" : 17
13 | }
14 |
--------------------------------------------------------------------------------
/vta/config/pynq_sample.json:
--------------------------------------------------------------------------------
1 | {
2 | "TARGET" : "pynq",
3 | "HW_VER" : "0.0.1",
4 | "LOG_INP_WIDTH" : 3,
5 | "LOG_WGT_WIDTH" : 3,
6 | "LOG_ACC_WIDTH" : 5,
7 | "LOG_BATCH" : 0,
8 | "LOG_BLOCK" : 4,
9 | "LOG_UOP_BUFF_SIZE" : 15,
10 | "LOG_INP_BUFF_SIZE" :15,
11 | "LOG_WGT_BUFF_SIZE" : 18,
12 | "LOG_ACC_BUFF_SIZE" : 17
13 | }
14 |
--------------------------------------------------------------------------------
/vta/config/tsim_sample.json:
--------------------------------------------------------------------------------
1 | {
2 | "TARGET" : "tsim",
3 | "HW_VER" : "0.0.1",
4 | "LOG_INP_WIDTH" : 3,
5 | "LOG_WGT_WIDTH" : 3,
6 | "LOG_ACC_WIDTH" : 5,
7 | "LOG_BATCH" : 0,
8 | "LOG_BLOCK" : 4,
9 | "LOG_UOP_BUFF_SIZE" : 15,
10 | "LOG_INP_BUFF_SIZE" : 15,
11 | "LOG_WGT_BUFF_SIZE" : 18,
12 | "LOG_ACC_BUFF_SIZE" : 17
13 | }
14 |
--------------------------------------------------------------------------------
/vta/config/vta_config.json:
--------------------------------------------------------------------------------
1 | {
2 | "TARGET" : "sim",
3 | "HW_VER" : "0.0.1",
4 | "LOG_INP_WIDTH" : 3,
5 | "LOG_WGT_WIDTH" : 3,
6 | "LOG_ACC_WIDTH" : 5,
7 | "LOG_BATCH" : 0,
8 | "LOG_BLOCK" : 4,
9 | "LOG_UOP_BUFF_SIZE" : 15,
10 | "LOG_INP_BUFF_SIZE" : 15,
11 | "LOG_WGT_BUFF_SIZE" : 18,
12 | "LOG_ACC_BUFF_SIZE" : 17
13 | }
14 |
--------------------------------------------------------------------------------
/vta/config/ultra96_sample.json:
--------------------------------------------------------------------------------
1 | {
2 | "TARGET" : "ultra96",
3 | "HW_VER" : "0.0.1",
4 | "LOG_INP_WIDTH" : 3,
5 | "LOG_WGT_WIDTH" : 3,
6 | "LOG_ACC_WIDTH" : 5,
7 | "LOG_BATCH" : 0,
8 | "LOG_BLOCK" : 4,
9 | "LOG_UOP_BUFF_SIZE" : 15,
10 | "LOG_INP_BUFF_SIZE" :15,
11 | "LOG_WGT_BUFF_SIZE" : 18,
12 | "LOG_ACC_BUFF_SIZE" : 17
13 | }
14 |
--------------------------------------------------------------------------------
/vta/config/de10nano_sample.json:
--------------------------------------------------------------------------------
1 | {
2 | "TARGET" : "de10nano",
3 | "HW_VER" : "0.0.1",
4 | "LOG_INP_WIDTH" : 3,
5 | "LOG_WGT_WIDTH" : 3,
6 | "LOG_ACC_WIDTH" : 5,
7 | "LOG_BATCH" : 0,
8 | "LOG_BLOCK" : 4,
9 | "LOG_UOP_BUFF_SIZE" : 15,
10 | "LOG_INP_BUFF_SIZE" :15,
11 | "LOG_WGT_BUFF_SIZE" : 18,
12 | "LOG_ACC_BUFF_SIZE" : 17
13 | }
14 |
--------------------------------------------------------------------------------
/nnvm/python/nnvm/frontend/__init__.py:
--------------------------------------------------------------------------------
1 | """NNVM frontends."""
2 | from __future__ import absolute_import
3 | from .mxnet import from_mxnet
4 | from .onnx import from_onnx
5 | from .coreml import from_coreml
6 | from .keras import from_keras
7 | from .darknet import from_darknet
8 | from .tensorflow import from_tensorflow
9 | from .caffe2 import from_caffe2
10 |
--------------------------------------------------------------------------------
/tests/scripts/packages.mk:
--------------------------------------------------------------------------------
1 | # rules for gtest
2 | .PHONY: iverilog
3 |
4 | iverilog: | ${CACHE_PREFIX}/bin/vvp
5 |
6 | ${CACHE_PREFIX}/bin/vvp:
7 | rm -rf verilog-10.1.tar.gz verilog-10.1
8 | wget ftp://icarus.com/pub/eda/verilog/v10/verilog-10.1.tar.gz
9 | tar xf verilog-10.1.tar.gz
10 | cd verilog-10.1;./configure --prefix=${CACHE_PREFIX}; make install
11 |
--------------------------------------------------------------------------------
/docs/_static/css/tvm_theme.css:
--------------------------------------------------------------------------------
1 | .rst-content .hidden-section {
2 | display: none;
3 | }
4 |
5 | .rst-toc .hidden-section {
6 | display: none;
7 | }
8 |
9 | nav .hidden-section {
10 | display: inherit;
11 | }
12 |
13 | .wy-side-nav-search {
14 | background-color: #fff;
15 | color: #333;
16 | }
17 |
18 | .version{
19 | color: #404040 !important;
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/nnvm/python/nnvm/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # coding: utf-8
3 | """NNVM python API for ease of use and help new framework establish python API. """
4 | from __future__ import absolute_import as _abs
5 |
6 | from . import _base
7 | from . import symbol as sym
8 | from . import symbol
9 | from ._base import NNVMError
10 | from . import frontend
11 |
12 | __version__ = _base.__version__
13 |
--------------------------------------------------------------------------------
/python/tvm/micro/__init__.py:
--------------------------------------------------------------------------------
1 | """uTVM module for bare-metal backends.
2 |
3 | uTVM (or the micro backend) enables provides support for bare-metal devices.
4 | Its targets currently include a host-emulated device which is used for testing,
5 | and JTAG-based openocd device which allows actual interfacing with microdevices.
6 | """
7 |
8 | from ..contrib import binutil
9 | from .base import Session, cross_compiler, create_micro_lib
10 |
--------------------------------------------------------------------------------
/apps/sgx/enclave/enclave_config.xml.in:
--------------------------------------------------------------------------------
1 |
2 | 0
3 | 0
4 | 0xf0000
5 | 0xf000000
6 | NUM_THREADS
7 | 0
8 | 0
9 | 0
10 | 0xFFFFFFFF
11 |
12 |
--------------------------------------------------------------------------------
/nnvm/python/nnvm/top/__init__.py:
--------------------------------------------------------------------------------
1 | """Tensor operator property registry
2 |
3 | Provide information to lower and schedule tensor operators.
4 | """
5 | from .attr_dict import AttrDict
6 | from . import tensor
7 | from . import nn
8 | from . import transform
9 | from . import reduction
10 | from . import vision
11 | from . import image
12 |
13 | from .registry import OpPattern
14 | from .registry import register_compute, register_schedule, register_pattern
15 |
--------------------------------------------------------------------------------
/vta/python/vta/top/__init__.py:
--------------------------------------------------------------------------------
1 | """TVM TOPI connector, eventually most of these should go to TVM repo"""
2 |
3 | from . import bitpack
4 | from .graphpack import graph_pack
5 | from . import op
6 | from . import vta_conv2d
7 | from . import vta_conv2d_transpose
8 | from . import vta_dense
9 | from . import util
10 |
11 | # NNVM is deprecated for VTA
12 | # from . import nnvm_bitpack
13 | # from .nnvm_graphpack import nnvm_graph_pack
14 | # from . import nnvm_op
15 |
--------------------------------------------------------------------------------
/topi/python/topi/opengl/__init__.py:
--------------------------------------------------------------------------------
1 | # pylint: disable=redefined-builtin, wildcard-import
2 | """CUDA specific declaration and schedules."""
3 | from __future__ import absolute_import as _abs
4 |
5 | from .conv2d_nchw import schedule_conv2d_nchw
6 | from .injective import schedule_injective, schedule_elemwise, schedule_broadcast
7 | from .softmax import schedule_softmax
8 | from .dense import schedule_dense
9 | from .pooling import schedule_pool, schedule_adaptive_pool
10 |
--------------------------------------------------------------------------------
/nnvm/tests/cpp/unittest.mk:
--------------------------------------------------------------------------------
1 | GTEST_LIB=$(GTEST_PATH)/lib/
2 | GTEST_INC=$(GTEST_PATH)/include/
3 |
4 | TEST_SRC = $(wildcard tests/cpp/*_test.cc)
5 | TEST = $(patsubst tests/cpp/%_test.cc, tests/cpp/%_test, $(TEST_SRC))
6 |
7 | tests/cpp/%_test: tests/cpp/%_test.cc lib/libnnvm.a
8 | $(CXX) -std=c++11 $(CFLAGS) -MM -MT tests/cpp/$* $< >tests/cpp/$*.d
9 | $(CXX) -std=c++11 $(CFLAGS) -I$(GTEST_INC) -o $@ $(filter %.cc %.a, $^) \
10 | -L$(GTEST_LIB) $(LDFLAGS) -lgtest
11 |
12 | -include tests/cpp/*.d
13 |
--------------------------------------------------------------------------------
/nnvm/python/nnvm/testing/__init__.py:
--------------------------------------------------------------------------------
1 | """Utilities for testing and benchmarks"""
2 | from __future__ import absolute_import as _abs
3 |
4 | from .config import ctx_list
5 | from .utils import create_workload
6 | from . import mobilenet
7 | from . import mobilenet_v2
8 | from . import mlp
9 | from . import resnet
10 | from . import vgg
11 | from . import densenet
12 | from . import squeezenet
13 | from . import inception_v3
14 | from . import dcgan
15 | from . import dqn
16 | from . import check_computation
17 |
--------------------------------------------------------------------------------
/apps/sgx/enclave/sgx-deps.diff:
--------------------------------------------------------------------------------
1 | diff --git a/rust/Cargo.toml b/rust/Cargo.toml
2 | index 0819e0c7..e56f4ef2 100644
3 | --- a/rust/Cargo.toml
4 | +++ b/rust/Cargo.toml
5 | @@ -14,7 +14,7 @@ default = ["nom/std"]
6 | sgx = ["nom/alloc"]
7 |
8 | [dependencies]
9 | -bounded-spsc-queue = "0.4.0"
10 | +bounded-spsc-queue = { git = "https://github.com/nhynes/bounded-spsc-queue", branch = "sgx" }
11 | error-chain = { version = "0.12.0", default-features = false }
12 | itertools = "0.7.8"
13 | lazy_static = "1.1.0"
14 |
--------------------------------------------------------------------------------
/apps/android_deploy/app/src/main/jni/Application.mk:
--------------------------------------------------------------------------------
1 | ifndef config
2 | ifneq ("$(wildcard ./config.mk)","")
3 | config ?= config.mk
4 | else
5 | config ?= make/config.mk
6 | endif
7 | endif
8 |
9 | include $(config)
10 |
11 | APP_STL := c++_static
12 |
13 | APP_CPPFLAGS += -DDMLC_LOG_STACK_TRACE=0 -DTVM4J_ANDROID=1 -std=c++11 -Oz -frtti
14 | ifeq ($(USE_OPENCL), 1)
15 | APP_CPPFLAGS += -DTVM_OPENCL_RUNTIME=1
16 | endif
17 |
--------------------------------------------------------------------------------
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | # Github owner file
2 | # List of code reviewers for TVM modules
3 |
4 | # Global reviewers
5 | * @dmlc/tvm-committers
6 |
7 | # LLVM backends
8 | src/codegen/llvm/* @aatluri
9 |
10 | # ROCM runtime
11 | src/runtime/rocm/* @aatluri
12 |
13 | # SGX support
14 | src/runtime/sgx/* @nhynes
15 | apps/sgx/* @nhynes
16 |
17 | # JVM language
18 | jvm/* @yzhliu
19 |
20 | # WebGL backends
21 | src/runtime/opengl/* @phisiart
22 | src/codegen/*opengl* @phisiart
23 |
24 | # TOPI
25 | topi/python/topi/* @Laurawly @Huyuwei
26 |
27 |
28 |
--------------------------------------------------------------------------------
/nnvm/tests/python/frontend/caffe2/model_zoo/__init__.py:
--------------------------------------------------------------------------------
1 | """Store for caffe2 examples and common models."""
2 | from __future__ import absolute_import as _abs
3 | import os
4 | import importlib
5 |
6 | models = [
7 | 'squeezenet',
8 | 'resnet50',
9 | 'vgg19',
10 | ]
11 |
12 | # skip download if model exist
13 | for model in models:
14 | try:
15 | locals()['c2_' + model] = importlib.import_module('caffe2.python.models.' + model)
16 | except ImportError:
17 | os.system("python -m caffe2.python.models.download -i -f " + model)
18 | locals()['c2_' + model] = importlib.import_module('caffe2.python.models.' + model)
19 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/topi/python/topi/generic/__init__.py:
--------------------------------------------------------------------------------
1 | # pylint: disable=wildcard-import
2 | """Generic declaration and schedules.
3 |
4 | This is a recommended way of using TOPI API.
5 | To use the generic schedule function, user must set
6 | the current target scope using with block. See also :any:`tvm.target`
7 |
8 | Example
9 | -------
10 | .. code-block:: python
11 |
12 | # create schedule that dispatches to topi.cuda.schedule_injective
13 | with tvm.target.create("cuda"):
14 | s = tvm.generic.schedule_injective(outs)
15 | """
16 | from __future__ import absolute_import as _abs
17 |
18 | from .nn import *
19 | from .injective import *
20 | from .extern import *
21 | from .vision import *
22 | from .sort import *
23 |
--------------------------------------------------------------------------------
/topi/python/topi/nn/__init__.py:
--------------------------------------------------------------------------------
1 | # pylint: disable=wildcard-import
2 | """Neural network operators"""
3 | from __future__ import absolute_import as _abs
4 |
5 | from .conv2d import *
6 | from .deformable_conv2d import *
7 | from .depthwise_conv2d import *
8 | from .elemwise import *
9 | from .dilate import *
10 | from .flatten import *
11 | from .dense import *
12 | from .mapping import *
13 | from .pooling import *
14 | from .softmax import *
15 | from .conv2d_transpose import *
16 | from .bnn import *
17 | from .upsampling import *
18 | from .local_response_norm import *
19 | from .bitserial_conv2d import *
20 | from .bitserial_dense import *
21 | from .l2_normalize import *
22 | from .batch_matmul import *
23 | from .sparse import *
24 | from .pad import *
25 |
--------------------------------------------------------------------------------
/apps/ios_rpc/tvmrpcLauncher/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/vta/python/vta/__init__.py:
--------------------------------------------------------------------------------
1 | """VTA Package is a TVM backend extension to support VTA hardwares
2 |
3 | Besides the compiler toolchain.
4 | It also include utility functions to
5 | configure the hardware Environment and access remote through RPC
6 | """
7 | from __future__ import absolute_import as _abs
8 |
9 | import sys
10 |
11 | from .bitstream import get_bitstream_path, download_bitstream
12 | from .environment import get_env, Environment
13 | from .rpc_client import reconfig_runtime, program_fpga
14 |
15 | __version__ = "0.1.0"
16 |
17 | # do not import nnvm/topi when running vta.exec.rpc_server
18 | # to maintain minimum dependency on the board
19 | if sys.argv[0] not in ("-c", "-m"):
20 | from . import top
21 | from .build_module import build_config, lower, build
22 | from . import graph
23 |
--------------------------------------------------------------------------------
/nnvm/python/nnvm/compiler/__init__.py:
--------------------------------------------------------------------------------
1 | """NNVM compiler toolchain.
2 |
3 | User only need to use :any:`build` and :any:`build_config` to do the compilation,
4 | and :any:`save_param_dict` to save the parameters into bytes.
5 | The other APIs are for more advanced interaction with the compiler toolchain.
6 | """
7 | from __future__ import absolute_import
8 |
9 | import tvm
10 |
11 | from . import build_module
12 | from . build_module import build, optimize, build_config
13 | from . compile_engine import engine, graph_key
14 | from . param_dict import save_param_dict, load_param_dict
15 |
16 | from .. import symbol as _symbol
17 | from .. import graph as _graph
18 |
19 | from .. import top as _top
20 |
21 |
22 | tvm.register_extension(_symbol.Symbol, _symbol.Symbol)
23 | tvm.register_extension(_graph.Graph, _graph.Graph)
24 |
--------------------------------------------------------------------------------
/tests/python/frontend/caffe2/model_zoo/__init__.py:
--------------------------------------------------------------------------------
1 | """Store for caffe2 examples and common models."""
2 | from __future__ import absolute_import as _abs
3 | import os
4 | import sys
5 | import importlib
6 | from . import squeezenet
7 | from caffe2.python.models.download import ModelDownloader
8 |
9 | models = [
10 | 'squeezenet',
11 | 'resnet50',
12 | 'vgg19',
13 | ]
14 |
15 | mf = ModelDownloader()
16 |
17 | class Model:
18 | def __init__(self, model_name):
19 | self.init_net, self.predict_net, self.value_info = mf.get_c2_model(model_name)
20 |
21 | for model in models:
22 | try:
23 | locals()['c2_' + model] = importlib.import_module('caffe2.python.models.' + model)
24 | except ImportError:
25 | locals()['c2_' + model] = Model(model)
26 |
27 | # squeezenet
28 | def relay_squeezenet():
29 | return squeezenet.get_workload()
30 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | 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 :)
2 |
3 | Issues that are inactive for a period of time may get closed. We adopt this policy so that we won't lose track of actionable issues that may fall at the bottom of the pile. Feel free to reopen a new one if you feel there is an additional problem that needs attention when an old one gets closed.
4 |
5 | For bug reports, to help the developer act on the issues, please include a description of your environment, preferably a minimum script to reproduce the problem.
6 |
7 | For feature proposals, list clear, small actionable items so we can track the progress of the change.
8 |
--------------------------------------------------------------------------------
/apps/android_rpc/app/src/main/jni/Application.mk:
--------------------------------------------------------------------------------
1 | ifndef config
2 | ifneq ("$(wildcard ./config.mk)","")
3 | config ?= config.mk
4 | else
5 | config ?= make/config.mk
6 | endif
7 | endif
8 |
9 | include $(config)
10 |
11 | # We target every architecture except armeabi here, for two reasons:
12 | # 1) armeabi is deprecated in NDK r16 and removed in r17
13 | # 2) vulkan is not supported in armeabi
14 | APP_ABI ?= armeabi-v7a arm64-v8a x86 x86_64 mips
15 | APP_STL := c++_shared
16 |
17 | APP_CPPFLAGS += -DDMLC_LOG_STACK_TRACE=0 -DTVM4J_ANDROID=1 -std=c++11 -Oz -frtti
18 | ifeq ($(USE_OPENCL), 1)
19 | APP_CPPFLAGS += -DTVM_OPENCL_RUNTIME=1
20 | endif
21 |
22 | ifeq ($(USE_VULKAN), 1)
23 | APP_CPPFLAGS += -DTVM_VULKAN_RUNTIME=1
24 | APP_LDFLAGS += -lvulkan
25 | endif
26 |
27 | ifeq ($(USE_SORT), 1)
28 | APP_CPPFLAGS += -DUSE_SORT=1
29 | endif
30 |
--------------------------------------------------------------------------------
/tests/lint/rat-excludes:
--------------------------------------------------------------------------------
1 | # subdirectories
2 | 3rdparty
3 | .github
4 | jvm
5 | tutorials
6 |
7 | # Binary or data files
8 | .*\.css
9 | .*\.ipynb
10 | .*\.html
11 | .*\.pyc
12 | .*\.so
13 | .*\.json
14 | .*\.txt
15 | .*\.svg
16 | .*\.lst
17 | .*\.xcodeproj
18 | .*\.lproj
19 | .*\.plist
20 | .*\.lds
21 | .*\.in
22 | .*\.diff
23 | .*\.edl
24 | .*\.md5
25 | .*\.csv
26 | .*\.mk
27 | .*\.log
28 | .*\.interp
29 | .*\.tokens
30 |
31 | # Generated modules
32 | .*\.egg-info
33 | .*gen_modules
34 | .*doxygen
35 | core.cpp
36 | build
37 | _static
38 | _build
39 | .*~
40 | \#..*\#
41 | \.#.*
42 |
43 | # Relay parser
44 | RelayLexer.py
45 | RelayParser.py
46 | RelayVisitor.py
47 |
48 | # Specific files
49 | package-list
50 | MANIFEST
51 | .gitignore
52 | .gitattributes
53 | .gitmodules
54 | .clang-format
55 | .bash_history
56 | rat-excludes
57 | __init__.py
58 | pylintrc
59 | config.cmake
60 | Cargo.lock
61 |
--------------------------------------------------------------------------------
/tests/travis/travis_after_failure.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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/apps/sgx/enclave/x86_64-unknown-linux-sgx.json:
--------------------------------------------------------------------------------
1 | {
2 | "arch": "x86_64",
3 | "cpu": "x86-64",
4 | "data-layout": "e-m:e-i64:64-f80:128-n8:16:32:64-S128",
5 | "dynamic-linking": true,
6 | "env": "sgx",
7 | "exe-allocation-crate": "alloc_system",
8 | "executables": true,
9 | "has-elf-tls": true,
10 | "has-rpath": true,
11 | "linker-flavor": "gcc",
12 | "linker-is-gnu": true,
13 | "llvm-target": "x86_64-unknown-linux-gnu",
14 | "max-atomic-width": 64,
15 | "os": "linux",
16 | "position-independent-executables": true,
17 | "pre-link-args": {
18 | "gcc": [
19 | "-Wl,--as-needed",
20 | "-Wl,-z,noexecstack",
21 | "-m64"
22 | ]
23 | },
24 | "relro-level": "full",
25 | "stack-probes": true,
26 | "target-c-int-width": "32",
27 | "target-endian": "little",
28 | "target-family": "unix",
29 | "target-pointer-width": "64",
30 | "vendor": "unknown"
31 | }
32 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/topi/python/topi/x86/__init__.py:
--------------------------------------------------------------------------------
1 | # pylint: disable=redefined-builtin, wildcard-import
2 | """x86 specific declaration and schedules."""
3 | from __future__ import absolute_import as _abs
4 |
5 | from .conv2d import schedule_conv2d, schedule_conv2d_nhwc
6 | from .binarize_pack import schedule_binarize_pack
7 | from .binary_dense import schedule_binary_dense
8 | from .nn import *
9 | from .injective import *
10 | from .pooling import schedule_pool, schedule_adaptive_pool
11 | from .bitserial_conv2d import schedule_bitserial_conv2d
12 | from .bitserial_dense import schedule_bitserial_dense
13 | from .depthwise_conv2d import schedule_depthwise_conv2d_NCHWc
14 | from .dense import _schedule_dense, _schedule_dense_pack, _schedule_dense_nopack
15 | from .batch_matmul import schedule_batch_matmul
16 | from .roi_align import roi_align_nchw
17 | from .conv2d_transpose import schedule_conv2d_transpose
18 | from .sparse import *
19 |
--------------------------------------------------------------------------------
/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/scripts/task_build.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 | cd $1 && cmake .. && make $2 && cd ..
19 |
--------------------------------------------------------------------------------
/nnvm/python/nnvm/contrib.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 space to register contrib functions. Leave empty"""
18 |
--------------------------------------------------------------------------------
/nnvm/python/nnvm/_symbol_internal.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 space to register internal functions. Leave empty"""
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/scripts/task_clean.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 | echo "Cleanup data..."
19 | cd $1 && rm -rf Cmake* && cd ..
20 |
--------------------------------------------------------------------------------
/vta/hardware/chisel/project/build.properties:
--------------------------------------------------------------------------------
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 | sbt.version = 1.1.1
21 |
--------------------------------------------------------------------------------
/apps/android_deploy/app/src/main/jni/make/config.mk:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------------------------------------
2 | # Template configuration for compiling
3 | #
4 | # If you want to change the configuration, please use the following
5 | # steps. Assume you are on the root directory. First copy the this
6 | # file so that any local changes will be ignored by git
7 | #
8 | # cp make/config.mk .
9 | #
10 | # Next modify the according entries, and then compile by
11 | #
12 | # ./build.sh
13 | #
14 | #-------------------------------------------------------------------------------
15 | APP_ABI = all
16 |
17 | APP_PLATFORM = android-17
18 |
19 | # whether enable OpenCL during compile
20 | USE_OPENCL = 0
21 |
22 | # the additional include headers you want to add, e.g., SDK_PATH/adrenosdk/Development/Inc
23 | ADD_C_INCLUDES =
24 |
25 | # the additional link libs you want to add, e.g., ANDROID_LIB_PATH/libOpenCL.so
26 | ADD_LDLIBS =
27 |
--------------------------------------------------------------------------------
/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 codege modules for relay."""
18 | from . import compile_engine
19 |
--------------------------------------------------------------------------------
/rust/frontend/.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 |
--------------------------------------------------------------------------------
/rust/runtime/.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 |
--------------------------------------------------------------------------------
/conda/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.5
20 | - 3.6
21 | - 3.7
22 |
23 | cuda:
24 | - False
25 |
--------------------------------------------------------------------------------
/docs/vta/hardware.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 | VTA Hardware Design Overview
19 | ============================
20 |
--------------------------------------------------------------------------------
/vta/apps/tsim_example/hardware/chisel/project/build.properties:
--------------------------------------------------------------------------------
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 | sbt.version = 1.1.1
21 |
--------------------------------------------------------------------------------
/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
24 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/docs/api/python/module.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.module
19 | ----------
20 | .. automodule:: tvm.module
21 | :members:
22 |
--------------------------------------------------------------------------------
/docs/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 |
--------------------------------------------------------------------------------
/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.5.0
24 |
--------------------------------------------------------------------------------
/vta/hardware/chisel/.scalafmt.conf:
--------------------------------------------------------------------------------
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 | maxColumn = 100
21 | rewrite.rules = [SortModifiers, SortImports]
22 |
--------------------------------------------------------------------------------
/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 | from ..._ffi.function import _init_api
19 |
20 | _init_api("relay.op._make", __name__)
21 |
--------------------------------------------------------------------------------
/docs/api/python/container.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.container
19 | -------------
20 | .. automodule:: tvm.container
21 | :members:
22 |
--------------------------------------------------------------------------------
/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 | from ...._ffi.function import _init_api
19 |
20 | _init_api("relay.op.nn._make", __name__)
21 |
--------------------------------------------------------------------------------
/tests/scripts/task_web_build.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 | cp /emsdk-portable/.emscripten ~/.emscripten
19 | source /emsdk-portable/emsdk_env.sh
20 | make -j4
21 |
--------------------------------------------------------------------------------
/python/tvm/relay/backend/_vmobj.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 VM Object FFI namespace."""
18 | from tvm._ffi.function import _init_api
19 |
20 | _init_api("_vmobj", __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 | from ...._ffi.function import _init_api
19 |
20 | _init_api("relay.op.image._make", __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 | from ...._ffi.function import _init_api
19 |
20 | _init_api("relay.qnn.op._make", __name__)
21 |
--------------------------------------------------------------------------------
/vta/apps/tsim_example/hardware/chisel/.scalafmt.conf:
--------------------------------------------------------------------------------
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 | maxColumn = 100
21 | rewrite.rules = [SortModifiers, SortImports]
22 |
--------------------------------------------------------------------------------
/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 tensorflow==1.13.1 keras h5py
24 |
--------------------------------------------------------------------------------
/docs/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 |
--------------------------------------------------------------------------------
/python/tvm/relay/op/contrib/_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 | from ...._ffi.function import _init_api
19 |
20 | _init_api("relay.op.contrib._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 | from ...._ffi.function import _init_api
19 |
20 | _init_api("relay.op.vision._make", __name__)
21 |
--------------------------------------------------------------------------------
/vta/hardware/chisel/project/plugins.sbt:
--------------------------------------------------------------------------------
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 | logLevel := Level.Warn
21 | addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "1.5.1")
22 |
--------------------------------------------------------------------------------
/apps/android_deploy/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
22 | TVM Android Demo
23 |
24 |
--------------------------------------------------------------------------------
/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 | from ...._ffi.function import _init_api
19 |
20 | _init_api("relay.op.annotation._make", __name__)
21 |
--------------------------------------------------------------------------------
/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 "./node.pxi"
20 | include "./function.pxi"
21 | include "./ndarray.pxi"
22 | include "./vmobj.pxi"
23 |
--------------------------------------------------------------------------------
/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 | from tvm._ffi.function import _init_api
20 |
21 | _init_api("relay._vm", __name__)
22 |
--------------------------------------------------------------------------------
/vta/apps/tsim_example/hardware/chisel/project/plugins.sbt:
--------------------------------------------------------------------------------
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 | logLevel := Level.Warn
21 | addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "1.5.1")
22 |
--------------------------------------------------------------------------------
/docs/api/python/graph_runtime.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_runtime
19 | -------------------------
20 | .. automodule:: tvm.contrib.graph_runtime
21 | :members:
22 |
--------------------------------------------------------------------------------
/python/tvm/relay/_analysis.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 exposing the passes for Relay program analysis."""
18 |
19 | from tvm._ffi.function import _init_api
20 |
21 | _init_api("relay._analysis", __name__)
22 |
--------------------------------------------------------------------------------
/python/tvm/relay/_transform.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 exposing the Relay type inference and checking."""
18 |
19 | from tvm._ffi.function import _init_api
20 |
21 | _init_api("relay._transform", __name__)
22 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/api/python/build.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.build
19 | ---------
20 | .. autofunction:: tvm.lower
21 |
22 | .. autofunction:: tvm.build
23 |
24 | .. autofunction:: tvm.build_config
25 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/cmake/modules/contrib/HybridDump.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 | message(STATUS "Build with contrib.hybriddump")
19 | file(GLOB HYBRID_CONTRIB_SRC src/contrib/hybrid/*.cc)
20 | list(APPEND COMPILER_SRCS ${HYBRID_CONTRIB_SRC})
21 |
--------------------------------------------------------------------------------
/docker/install/ubuntu_install_antlr.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 | cd /usr/local/lib
24 | wget -q https://www.antlr.org/download/antlr-4.7.1-complete.jar
25 | cd -
26 |
--------------------------------------------------------------------------------
/docs/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 |
23 | .. automodule:: tvm.relay.op.nn.nn
24 | :members:
25 |
--------------------------------------------------------------------------------
/nnvm/tests/python/frontend/coreml/model_zoo/__init__.py:
--------------------------------------------------------------------------------
1 | import os
2 | from PIL import Image
3 | import numpy as np
4 | from tvm.contrib.download import download_testdata
5 |
6 | def get_mobilenet():
7 | url = 'https://docs-assets.developer.apple.com/coreml/models/MobileNet.mlmodel'
8 | dst = 'mobilenet.mlmodel'
9 | real_dst = download_testdata(url, dst, module='coreml')
10 | return real_dst
11 |
12 | def get_resnet50():
13 | url = 'https://docs-assets.developer.apple.com/coreml/models/Resnet50.mlmodel'
14 | dst = 'resnet50.mlmodel'
15 | real_dst = download_testdata(url, dst, module='coreml')
16 | return real_dst
17 |
18 | def get_cat_image():
19 | url = 'https://gist.githubusercontent.com/zhreshold/bcda4716699ac97ea44f791c24310193/raw/fa7ef0e9c9a5daea686d6473a62aacd1a5885849/cat.png'
20 | dst = 'cat.png'
21 | real_dst = download_testdata(url, dst, module='data')
22 | img = Image.open(real_dst).resize((224, 224))
23 | img = np.transpose(img, (2, 0, 1))[np.newaxis, :]
24 | return np.asarray(img)
25 |
--------------------------------------------------------------------------------
/python/tvm/relay/op/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
18 | """Neural network related operators."""
19 | from __future__ import absolute_import as _abs
20 | from .nn import *
21 | from . import _nn
22 |
--------------------------------------------------------------------------------
/docs/api/python/bridge.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 | Framework Bridge APIs
19 | ---------------------
20 |
21 | tvm.contrib.mxnet
22 | ~~~~~~~~~~~~~~~~~
23 | .. automodule:: tvm.contrib.mxnet
24 | :members:
25 |
--------------------------------------------------------------------------------
/docs/api/python/relay/module.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.module
19 | ----------------
20 |
21 | .. automodule:: tvm.relay.module
22 |
23 | .. autoclass:: tvm.relay.module.Module
24 | :members:
25 |
--------------------------------------------------------------------------------
/python/tvm/relay/qnn/__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 | """QNN dialect operators and IR passes."""
19 | from __future__ import absolute_import as _abs
20 | from . import op
21 | from . import transform
22 |
--------------------------------------------------------------------------------
/docs/api/python/function.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.Function
19 | ------------
20 | .. autoclass:: tvm.Function
21 |
22 | .. autofunction:: tvm.register_func
23 |
24 | .. autofunction:: tvm.get_global_func
25 |
--------------------------------------------------------------------------------
/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 __future__ import absolute_import as _abs
20 | from .image import *
21 | from ._image import *
22 |
--------------------------------------------------------------------------------
/python/tvm/relay/op/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 | # pylint: disable=wildcard-import
18 | """Neural network related operators."""
19 | from __future__ import absolute_import as _abs
20 | from .contrib import *
21 | from . import _contrib
22 |
--------------------------------------------------------------------------------
/rust/frontend/tests/callback/Cargo.toml:
--------------------------------------------------------------------------------
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 | [package]
19 | name = "callback"
20 | version = "0.0.0"
21 | authors = ["TVM Contributors"]
22 |
23 | [dependencies]
24 | ndarray = "0.12.1"
25 | tvm-frontend = { path = "../../" }
26 |
--------------------------------------------------------------------------------
/tests/scripts/task_cpp_unittest.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 | export LD_LIBRARY_PATH="lib:${LD_LIBRARY_PATH:-}"
23 |
24 | make cpptest -j8
25 | for test in build/*_test; do
26 | ./$test
27 | done
28 |
--------------------------------------------------------------------------------
/vta/hardware/chisel/src/main/scala/core/package.scala:
--------------------------------------------------------------------------------
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 | package vta
21 |
22 | /** This trick makes ISAConstants globally available */
23 | package object core extends vta.core.ISAConstants
24 |
--------------------------------------------------------------------------------
/cmake/modules/Micro.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 | if(USE_MICRO)
19 | message(STATUS "Build with Micro support")
20 | file(GLOB RUNTIME_MICRO_SRCS src/runtime/micro/*.cc)
21 | list(APPEND RUNTIME_SRCS ${RUNTIME_MICRO_SRCS})
22 | endif(USE_MICRO)
23 |
--------------------------------------------------------------------------------
/cmake/modules/contrib/Sort.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 | if(USE_SORT)
19 | message(STATUS "Build with contrib.sort")
20 | file(GLOB SORT_CONTRIB_SRC src/contrib/sort/*.cc)
21 | list(APPEND RUNTIME_SRCS ${SORT_CONTRIB_SRC})
22 | endif(USE_SORT)
23 |
--------------------------------------------------------------------------------
/docker/install/ubuntu_install_redis.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 | apt-get update && apt-get install -y redis-server
24 | pip2 install xgboost psutil
25 | pip3 install xgboost psutil
26 |
--------------------------------------------------------------------------------
/docs/api/python/nnvm/graph.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 | nnvm.graph
19 | ----------
20 | .. automodule:: nnvm.graph
21 |
22 | .. autofunction:: nnvm.graph.create
23 |
24 | .. autoclass:: nnvm.graph.Graph
25 | :members:
26 |
--------------------------------------------------------------------------------
/jvm/core/src/main/java/ml/dmlc/tvm/TVMValueNull.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * 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, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package ml.dmlc.tvm;
19 |
20 | public class TVMValueNull extends TVMValue {
21 | public TVMValueNull() {
22 | super(TypeCode.NULL);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/python/tvm/relay/qnn/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 | # pylint: disable=wildcard-import
18 | """QNN dialect related operators."""
19 | from __future__ import absolute_import as _abs
20 | from .qnn import *
21 | from .op import register_qnn_legalize
22 |
--------------------------------------------------------------------------------
/tests/scripts/task_verilog_test.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 | export PYTHONPATH=python
23 | make verilog
24 | python3 -m pytest -v tests/verilog/unittest
25 | python3 -m pytest -v tests/verilog/integration
26 |
--------------------------------------------------------------------------------
/docs/api/python/relay/image.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 |
19 | tvm.relay.image
20 | ---------------
21 |
22 | .. automodule:: tvm.relay.image
23 | :members:
24 |
25 | .. automodule:: tvm.relay.op.image
26 | :members:
27 |
--------------------------------------------------------------------------------
/python/tvm/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 | """Contrib APIs of TVM python package.
18 |
19 | Contrib API provides many useful not core features.
20 | Some of these are useful utilities to interact with
21 | thirdparty libraries and tools.
22 | """
23 |
--------------------------------------------------------------------------------
/python/tvm/relay/contrib.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, unused-import, unused-wildcard-import
18 | """Contrib operators."""
19 | # Re-export in a specific file name so that autodoc can pick it up
20 | from .op.contrib import *
21 |
--------------------------------------------------------------------------------
/apps/android_deploy/app/src/main/res/xml/provider_paths.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/docker/install/ubuntu_install_opengl.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 | apt-get update --fix-missing
24 |
25 | apt-get install -y --no-install-recommends \
26 | libgl1-mesa-dev libglfw3-dev
27 |
--------------------------------------------------------------------------------
/python/tvm/relay/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 | # pylint: disable=wildcard-import, unused-import, unused-wildcard-import
18 | """Neural network related operators."""
19 | # Re-export in a specific file name so that autodoc can pick it up
20 | from .op.nn import *
21 |
--------------------------------------------------------------------------------
/docker/install/ubuntu_install_sphinx.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 sphinx sphinx-gallery sphinx_rtd_theme sphinx_autodoc_annotation matplotlib Image commonmark>=0.7.3 docutils>=0.11
24 |
--------------------------------------------------------------------------------
/python/tvm/relay/image.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, unused-import, unused-wildcard-import
18 | """Image network related operators."""
19 | # Re-export in a specific file name so that autodoc can pick it up
20 | from .op.image import *
21 |
--------------------------------------------------------------------------------
/python/tvm/relay/vision.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, unused-import, unused-wildcard-import
18 | """Vision network related operators."""
19 | # Re-export in a specific file name so that autodoc can pick it up
20 | from .op.vision import *
21 |
--------------------------------------------------------------------------------
/cmake/modules/contrib/Random.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 | if(USE_RANDOM)
19 | message(STATUS "Build with contrib.random")
20 | file(GLOB RANDOM_CONTRIB_SRC src/contrib/random/random.cc)
21 | list(APPEND RUNTIME_SRCS ${RANDOM_CONTRIB_SRC})
22 | endif(USE_RANDOM)
23 |
--------------------------------------------------------------------------------
/python/tvm/relay/_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 | # pylint: disable=no-else-return, unidiomatic-typecheck, undefined-variable
18 | """The interface of expr function exposed from C++."""
19 | from tvm._ffi.function import _init_api
20 |
21 | _init_api("relay._base", __name__)
22 |
--------------------------------------------------------------------------------
/python/tvm/relay/_expr.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=no-else-return, unidiomatic-typecheck, undefined-variable
18 | """The interface of expr function exposed from C++."""
19 | from tvm._ffi.function import _init_api
20 |
21 | _init_api("relay._expr", __name__)
22 |
--------------------------------------------------------------------------------
/python/tvm/relay/_module.pyi:
--------------------------------------------------------------------------------
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 | from typing import Union, Tuple, Dict, List
19 | from relay.ir import GlobalId, OperatorId, Item, NodeBase, Span, FileId
20 | from relay.ir import ShapeExtension, Operator, Defn
21 |
22 | class Module(NodeBase): ...
23 |
--------------------------------------------------------------------------------
/docs/api/python/relay/scope_builder.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.scope_builder
19 | -----------------------
20 |
21 | .. automodule:: tvm.relay.scope_builder
22 |
23 | .. autoclass:: tvm.relay.scope_builder.ScopeBuilder
24 | :members:
25 |
--------------------------------------------------------------------------------
/python/tvm/relay/_module.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=no-else-return, unidiomatic-typecheck, undefined-variable
18 | """The interface to the Module exposed from C++."""
19 | from tvm._ffi.function import _init_api
20 |
21 | _init_api("relay._module", __name__)
22 |
--------------------------------------------------------------------------------
/python/tvm/relay/annotation.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, unused-import, unused-wildcard-import
19 | """Annotation related operators."""
20 | # Re-export in a specific file name so that autodoc can pick it up
21 | from .op.annotation import *
22 |
--------------------------------------------------------------------------------
/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 | from __future__ import absolute_import
20 | from tvm._ffi.function import _init_api
21 |
22 | _init_api("relay._quantize", __name__)
23 |
--------------------------------------------------------------------------------
/rust/runtime/tests/test_tvm_dso/Cargo.toml:
--------------------------------------------------------------------------------
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 | [package]
19 | name = "test-tvm-dso"
20 | version = "0.0.0"
21 | license = "Apache-2.0"
22 | authors = ["TVM Contributors"]
23 |
24 | [dependencies]
25 | ndarray="0.12"
26 | tvm-runtime = { path = "../../" }
27 |
--------------------------------------------------------------------------------
/python/tvm/relay/std/prelude.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 | v0.0.4
20 |
21 | def @id[a](%x: a) -> a {
22 | %x
23 | }
24 |
25 | def @compose[a, b, c](%f: fn(b) -> c, %g: fn(a) -> b) {
26 | fn (%x: a) -> c {
27 | %f(%g(%x))
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/apps/rocm_rpc/start_rpc_server.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 | PROJ_ROOT=$(realpath $(dirname "$0")/../..)
20 | export PYTHONPATH=${PROJ_ROOT}/python:${PYTHONPATH}
21 |
22 | python -m tvm.exec.rpc_server "$@" --load-library=${PROJ_ROOT}/apps/rocm_rpc/lib/libtvm_runtime_rocm.so
23 |
--------------------------------------------------------------------------------
/apps/sgx/enclave/build.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 | use std::env;
21 |
22 | fn main() {
23 | println!(
24 | "cargo:rustc-link-search=native={}",
25 | env::var("BUILD_DIR").unwrap()
26 | );
27 | println!("cargo:rustc-link-lib=static=model");
28 | }
29 |
--------------------------------------------------------------------------------
/jvm/core/src/main/java/ml/dmlc/tvm/rpc/ServerProcessor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * 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, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package ml.dmlc.tvm.rpc;
19 |
20 | /**
21 | * Abstract runnable class for RPC server process.
22 | */
23 | public interface ServerProcessor extends Runnable {
24 | public void terminate();
25 | }
26 |
--------------------------------------------------------------------------------
/python/tvm/relay/_build_module.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=no-else-return, unidiomatic-typecheck, undefined-variable
18 | """The interface for building Relay functions exposed from C++."""
19 | from tvm._ffi.function import _init_api
20 |
21 | _init_api("relay.build_module", __name__)
22 |
--------------------------------------------------------------------------------
/python/tvm/relay/_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 | """
18 | The constructors for all Relay AST nodes exposed from C++.
19 |
20 | This module includes MyPy type signatures for all of the
21 | exposed modules.
22 | """
23 | from .._ffi.function import _init_api
24 |
25 | _init_api("relay._make", __name__)
26 |
--------------------------------------------------------------------------------
/apps/android_rpc/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
21 |
22 |
23 | #3F51B5
24 | #303F9F
25 | #06d467
26 |
27 |
--------------------------------------------------------------------------------
/docs/api/python/nnvm/symbol.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 | nnvm.symbol
19 | -----------
20 | .. automodule:: nnvm.symbol
21 |
22 | .. autoclass:: nnvm.symbol.Symbol
23 | :members:
24 |
25 | .. autoclass:: nnvm.symbol.Variable
26 |
27 | .. autofunction:: nnvm.symbol.Group
28 |
--------------------------------------------------------------------------------
/vta/python/vta/top/util.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 | """VTA TOPI Utils."""
18 |
19 | def is_packed_layout(layout):
20 | """Check if layout is packed layout"""
21 | if layout == "NCHW":
22 | return False
23 | if "n" in layout and "c" in layout:
24 | return True
25 | return False
26 |
--------------------------------------------------------------------------------
/apps/android_deploy/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
21 |
22 |
23 | #3F51B5
24 | #303F9F
25 | #06d467
26 |
27 |
--------------------------------------------------------------------------------
/apps/sgx/run_example.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 | sgx_sdk=${SGX_SDK:=/opt/sgxsdk}
20 |
21 | export LD_LIBRARY_PATH="$sgx_sdk/lib64":${LD_LIBRARY_PATH}
22 | export CC=clang-6.0
23 | export AR=llvm-ar-6.0
24 | export TVM_CACHE_DIR=/tmp
25 |
26 | make && printf "\n" && python3 run_model.py
27 |
--------------------------------------------------------------------------------
/docker/install/ubuntu_install_caffe2.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 | python3 -m caffe2.python.models.download -i -f squeezenet
24 | python3 -m caffe2.python.models.download -i -f resnet50
25 | python3 -m caffe2.python.models.download -i -f vgg19
26 |
--------------------------------------------------------------------------------
/docs/api/python/hybrid.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.hybrid
19 | ----------
20 | .. automodule:: tvm.hybrid
21 |
22 | .. autosummary::
23 |
24 | tvm.hybrid.parse
25 | tvm.hybrid.script
26 |
27 | .. autofunction:: tvm.hybrid.parse
28 | .. autofunction:: tvm.hybrid.script
29 |
--------------------------------------------------------------------------------
/apps/vta_rpc/start_rpc_server.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 | PROJROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../../" && pwd )"
19 |
20 | export PYTHONPATH=${PYTHONPATH}:${PROJROOT}/python:${PROJROOT}/vta/python
21 | export PYTHONPATH=${PYTHONPATH}:/home/xilinx/pynq
22 | python3 -m vta.exec.rpc_server
23 |
--------------------------------------------------------------------------------
/python/tvm/node.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 | """Node is the base class of all TVM AST.
18 |
19 | Normally user do not need to touch this api.
20 | """
21 | # pylint: disable=unused-import
22 | from __future__ import absolute_import as _abs
23 | from ._ffi.node import NodeBase, register_node
24 |
25 | Node = NodeBase
26 |
--------------------------------------------------------------------------------
/docker/Dockerfile.ci_jekyll:
--------------------------------------------------------------------------------
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 | # CI docker Jekyll env for building website
19 | # tag: v0.50
20 | FROM ubuntu:16.04
21 |
22 | RUN apt-get update && apt-get install -y sudo wget
23 | RUN apt-get update && apt-get install -y ruby-full build-essential zlib1g-dev
24 | RUN gem install jekyll bundler
25 |
--------------------------------------------------------------------------------
/docker/install/ubuntu_install_golang.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 | #install the necessary dependancies for golang build
24 | apt-get update
25 | apt-get install -y golang-1.10-go
26 | apt-get install -y golang-1.10-doc
27 | apt-get install -y golint
28 |
--------------------------------------------------------------------------------
/apps/android_rpc/app/src/main/jni/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 | MY_PATH := $(LOCAL_PATH)
3 |
4 | include $(CLEAR_VARS)
5 |
6 | LOCAL_PATH := $(MY_PATH)
7 | ROOT_PATH := $(MY_PATH)/../../../../../..
8 |
9 | ifndef config
10 | ifneq ("$(wildcard ./config.mk)","")
11 | config ?= config.mk
12 | else
13 | config ?= make/config.mk
14 | endif
15 | endif
16 |
17 | include $(config)
18 |
19 | LOCAL_SRC_FILES := ml_dmlc_tvm_native_c_api.cc
20 | LOCAL_LDFLAGS := -L$(SYSROOT)/usr/lib/ -llog
21 |
22 | LOCAL_C_INCLUDES := $(ROOT_PATH)/include \
23 | $(ROOT_PATH)/3rdparty/dlpack/include \
24 | $(ROOT_PATH)/3rdparty/dmlc-core/include \
25 | $(ROOT_PATH)/3rdparty/HalideIR/src \
26 | $(ROOT_PATH)/topi/include
27 |
28 | LOCAL_MODULE = tvm4j_runtime_packed
29 |
30 | LOCAL_CPP_FEATURES += exceptions
31 | LOCAL_LDLIBS += -latomic
32 | LOCAL_ARM_MODE := arm
33 |
34 | ifdef ADD_C_INCLUDES
35 | LOCAL_C_INCLUDES += $(ADD_C_INCLUDES)
36 | endif
37 |
38 | ifdef ADD_LDLIBS
39 | LOCAL_LDLIBS += $(ADD_LDLIBS)
40 | endif
41 |
42 | include $(BUILD_SHARED_LIBRARY)
43 |
--------------------------------------------------------------------------------
/docs/api/python/nnvm/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 | NNVM API
19 | ========
20 |
21 | This document contains the python API to NNVM compiler toolchain.
22 |
23 | .. toctree::
24 | :maxdepth: 2
25 |
26 | compiler
27 | frontend
28 | symbol
29 | graph
30 | top
31 | testing
32 |
--------------------------------------------------------------------------------
/apps/android_deploy/app/src/main/jni/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 | MY_PATH := $(LOCAL_PATH)
3 |
4 | include $(CLEAR_VARS)
5 |
6 | LOCAL_PATH := $(MY_PATH)
7 | ROOT_PATH := $(MY_PATH)/../../../../../..
8 |
9 | ifndef config
10 | ifneq ("$(wildcard ./config.mk)","")
11 | config ?= config.mk
12 | else
13 | config ?= make/config.mk
14 | endif
15 | endif
16 |
17 | include $(config)
18 |
19 | LOCAL_SRC_FILES := ml_dmlc_tvm_native_c_api.cc
20 | LOCAL_LDFLAGS := -L$(SYSROOT)/usr/lib/ -llog
21 |
22 | LOCAL_C_INCLUDES := $(ROOT_PATH)/include \
23 | $(ROOT_PATH)/3rdparty/dlpack/include \
24 | $(ROOT_PATH)/3rdparty/dmlc-core/include \
25 | $(ROOT_PATH)/3rdparty/HalideIR/src \
26 | $(ROOT_PATH)/topi/include
27 |
28 | LOCAL_MODULE = tvm4j_runtime_packed
29 |
30 | LOCAL_CPP_FEATURES += exceptions
31 | LOCAL_LDLIBS += -latomic
32 | LOCAL_ARM_MODE := arm
33 |
34 | ifdef ADD_C_INCLUDES
35 | LOCAL_C_INCLUDES += $(ADD_C_INCLUDES)
36 | endif
37 |
38 | ifdef ADD_LDLIBS
39 | LOCAL_LDLIBS += $(ADD_LDLIBS)
40 | endif
41 |
42 | include $(BUILD_SHARED_LIBRARY)
43 |
--------------------------------------------------------------------------------
/docker/install/ubuntu_install_onnx.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 | # fix to certain version for now
24 | pip3 install onnx==1.5.0
25 |
26 | pip3 install https://download.pytorch.org/whl/cu80/torch-1.0.1.post2-cp36-cp36m-linux_x86_64.whl
27 | pip3 install torchvision
28 |
--------------------------------------------------------------------------------
/docs/api/python/relay/vision.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 |
19 | tvm.relay.vision
20 | ----------------
21 |
22 | .. automodule:: tvm.relay.vision
23 | :members:
24 |
25 | .. automodule:: tvm.relay.op.vision.multibox
26 | :members:
27 |
28 | .. automodule:: tvm.relay.op.vision.nms
29 | :members:
30 |
--------------------------------------------------------------------------------
/rust/frontend/examples/resnet/Cargo.toml:
--------------------------------------------------------------------------------
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 | [package]
19 | name = "resnet"
20 | version = "0.0.0"
21 | authors = ["TVM Contributors"]
22 | license = "Apache-2.0"
23 | build = "build.rs"
24 |
25 | [dependencies]
26 | ndarray = "0.12.1"
27 | tvm-frontend = { path = "../../" }
28 | image = "0.20.1"
29 | csv = "1"
30 |
--------------------------------------------------------------------------------
/rust/runtime/tests/test_tvm_basic/Cargo.toml:
--------------------------------------------------------------------------------
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 | [package]
19 | name = "test-tvm-basic"
20 | version = "0.0.0"
21 | license = "Apache-2.0"
22 | authors = ["TVM Contributors"]
23 |
24 | [dependencies]
25 | ndarray="0.12.1"
26 | tvm-runtime = { path = "../../" }
27 |
28 | [build-dependencies]
29 | ar = "0.6.0"
30 |
--------------------------------------------------------------------------------
/topi/python/topi/cuda/__init__.py:
--------------------------------------------------------------------------------
1 | # pylint: disable=redefined-builtin, wildcard-import
2 | """CUDA specific declaration and schedules."""
3 | from __future__ import absolute_import as _abs
4 |
5 | from . import conv2d, depthwise_conv2d, conv2d_transpose_nchw, deformable_conv2d, \
6 | group_conv2d_nchw, dense
7 | from .conv2d_hwcn import schedule_conv2d_hwcn
8 | from .depthwise_conv2d import schedule_depthwise_conv2d_backward_input_nhwc
9 | from .depthwise_conv2d import schedule_depthwise_conv2d_backward_weight_nhwc
10 | from .group_conv2d_nchw import schedule_conv2d_nchw_cuda
11 | from .reduction import schedule_reduce
12 | from .softmax import schedule_softmax
13 | from .injective import schedule_injective, schedule_elemwise, schedule_broadcast
14 | from .dense import schedule_dense
15 | from .pooling import schedule_pool, schedule_adaptive_pool
16 | from .extern import schedule_extern
17 | from .nn import schedule_lrn, schedule_l2_normalize
18 | from .batch_matmul import schedule_batch_matmul
19 | from .vision import *
20 | from . import ssd
21 | from .ssd import *
22 | from .nms import *
23 | from .rcnn import *
24 | from .sort import *
25 |
--------------------------------------------------------------------------------
/docs/api/python/nnvm/top.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 | nnvm.top
19 | --------
20 | .. automodule:: nnvm.top
21 |
22 | .. autofunction:: register_compute
23 |
24 | .. autofunction:: register_schedule
25 |
26 | .. autofunction:: register_pattern
27 |
28 |
29 | .. autoclass:: nnvm.top.AttrDict
30 | :members:
31 |
--------------------------------------------------------------------------------
/docs/README.txt:
--------------------------------------------------------------------------------
1 | TVM Documentations
2 | ==================
3 | This folder contains the source of TVM documents
4 |
5 | - A hosted version of doc is at http://docs.tvm.ai
6 | - pip install sphinx>=1.5.5 sphinx-gallery sphinx_rtd_theme matplotlib Image recommonmark Pillow
7 | - Build tvm first in the root folder.
8 | - To build locally, you need to enable USE_CUDA, USE_OPENCL, LLVM_CONFIG in config.mk and then type "make html" in this folder.
9 |
10 | Only Execute Specified Tutorials
11 | --------------------------------
12 | The document build process will execute all the tutorials in the sphinx gallery.
13 | This will cause failure in some cases when certain machines do not have necessary
14 | environment. You can set ```TVM_TUTORIAL_EXEC_PATTERN``` to only execute
15 | the path that matches the regular expression pattern.
16 |
17 | For example, to only build tutorials under /vta/tutorials, run
18 |
19 | ```bash
20 | TVM_TUTORIAL_EXEC_PATTERN=/vta/tutorials make html
21 | ```
22 |
23 | To only build one specific file, do
24 |
25 | ```bash
26 | # The slash \ is used to get . in regular expression
27 | TVM_TUTORIAL_EXEC_PATTERN=file_name\.py make html
28 | ```
29 |
--------------------------------------------------------------------------------
/vta/hardware/xilinx/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | Complete instructions on how to build custom FPGA hardware designs are available on the [TVM documentation webpage](https://docs.tvm.ai/vta/install.html#vta-fpga-toolchain-installation).
--------------------------------------------------------------------------------
/python/tvm/_pyversion.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 | """Python2 version check
18 | """
19 | import sys
20 |
21 | if not (sys.version_info[0] >= 3 and sys.version_info[1] >= 5):
22 | PY3STATEMENT = """TVM project proudly dropped support of Python2.
23 | The minimal Python requirement is Python 3.5
24 | """
25 | raise Exception(PY3STATEMENT)
26 |
--------------------------------------------------------------------------------
/rust/Cargo.toml:
--------------------------------------------------------------------------------
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 | [workspace]
19 | members = [
20 | "common",
21 | "macros",
22 | "runtime",
23 | "runtime/tests/test_tvm_basic",
24 | "runtime/tests/test_tvm_dso",
25 | "runtime/tests/test_nnvm",
26 | "frontend",
27 | "frontend/tests/basics",
28 | "frontend/tests/callback",
29 | "frontend/examples/resnet"
30 | ]
31 |
--------------------------------------------------------------------------------
/tests/scripts/task_golang.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 | export LD_LIBRARY_PATH="lib:${LD_LIBRARY_PATH:-}"
23 |
24 | tvm_root="$(git rev-parse --show-toplevel)"
25 | export PYTHONPATH="$tvm_root/python":"$tvm_root/nnvm/python":"$tvm_root/topi/python"
26 |
27 | # Golang tests
28 | make -C golang tests
29 |
--------------------------------------------------------------------------------
/vta/hardware/intel/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | Complete instructions on how to build custom FPGA hardware designs are available on the [TVM documentation webpage](https://docs.tvm.ai/vta/install.html#vta-fpga-toolchain-installation).
19 |
--------------------------------------------------------------------------------
/vta/hardware/xilinx/scripts/hsi.tcl:
--------------------------------------------------------------------------------
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 | # Copyright (c) 2018 by Contributors
19 | # file: hsi.tcl
20 | # brief: Driver generation script for ARMv7 driver libraries.
21 | #
22 |
23 | open_hw_design export/vta.hdf
24 | create_sw_design swdesign -proc ps7_cortexa9_0 -os standalone
25 | generate_bsp -dir bsp
26 |
27 | exit
28 |
--------------------------------------------------------------------------------
/python/tvm/autotvm/graph_tuner/_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 | # pylint: disable=invalid-name
18 | """Helper functions and global data"""
19 |
20 |
21 | # We set a large time to represent an invalid layout-transformation.
22 | # This number is set to be 10e9 seconds to align with autotvm.
23 | INVALID_LAYOUT_TIME = 10e9
24 |
25 | MAX_OUTPUT_NODES = 16
26 |
--------------------------------------------------------------------------------
/tests/python/frontend/coreml/model_zoo/__init__.py:
--------------------------------------------------------------------------------
1 | import os
2 | from PIL import Image
3 | import numpy as np
4 | from tvm.contrib.download import download_testdata
5 |
6 | def get_mobilenet():
7 | url = 'https://docs-assets.developer.apple.com/coreml/models/MobileNet.mlmodel'
8 | dst = 'mobilenet.mlmodel'
9 | real_dst = download_testdata(url, dst, module='coreml')
10 | return os.path.abspath(real_dst)
11 |
12 | def get_resnet50():
13 | url = 'https://docs-assets.developer.apple.com/coreml/models/Resnet50.mlmodel'
14 | dst = 'resnet50.mlmodel'
15 | real_dst = download_testdata(url, dst, module='coreml')
16 | return os.path.abspath(real_dst)
17 |
18 | def get_cat_image():
19 | url = 'https://gist.githubusercontent.com/zhreshold/bcda4716699ac97ea44f791c24310193/raw/fa7ef0e9c9a5daea686d6473a62aacd1a5885849/cat.png'
20 | dst = 'cat.png'
21 | real_dst = download_testdata(url, dst, module='data')
22 | img = Image.open(real_dst).resize((224, 224))
23 | # CoreML's standard model image format is BGR
24 | img_bgr = np.array(img)[:, :, ::-1]
25 | img = np.transpose(img_bgr, (2, 0, 1))[np.newaxis, :]
26 | return np.asarray(img)
--------------------------------------------------------------------------------
/docker/install/ubuntu_install_python_package.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 | # install libraries for python package on ubuntu
24 | pip3 install pylint==1.9.4 six numpy pytest cython decorator scipy tornado typed_ast pytest mypy orderedset antlr4-python3-runtime attrs requests Pillow packaging
25 |
--------------------------------------------------------------------------------
/python/tvm/autotvm/graph_tuner/__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 | """Autotvm graph tuner API."""
18 | from __future__ import absolute_import as _abs
19 |
20 | from . import _base
21 | from . import base_graph_tuner
22 |
23 | from .base_graph_tuner import BaseGraphTuner
24 | from .dynamic_programming_tuner import DPTuner
25 | from .pbqp_tuner import PBQPTuner
26 |
--------------------------------------------------------------------------------
/rust/common/Cargo.toml:
--------------------------------------------------------------------------------
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 | [package]
19 | name = "tvm-common"
20 | version = "0.1.0"
21 | authors = ["TVM Contributors"]
22 | license = "Apache-2.0"
23 | edition = "2018"
24 |
25 | [features]
26 | bindings = []
27 |
28 | [dependencies]
29 | failure = "0.1.5"
30 | ndarray = "0.12.1"
31 |
32 | [build-dependencies]
33 | bindgen = "0.37.4"
34 |
--------------------------------------------------------------------------------
/apps/ios_rpc/tvmrpc/AppDelegate.h:
--------------------------------------------------------------------------------
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 | /*!
21 | * Copyright (c) 2017 by Contributors
22 | * \file AppDelegate.h
23 | */
24 |
25 | #import
26 |
27 | @interface AppDelegate : UIResponder
28 |
29 | @property (strong, nonatomic) UIWindow *window;
30 |
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/docker/install/ubuntu_install_darknet.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 | #install the necessary dependancies, cffi, opencv
24 | wget -q 'https://github.com/siju-samuel/darknet/blob/master/lib/libdarknet.so?raw=true' -O libdarknet.so
25 | pip2 install opencv-python cffi
26 | pip3 install opencv-python cffi
27 |
--------------------------------------------------------------------------------
/rust/frontend/tests/basics/Cargo.toml:
--------------------------------------------------------------------------------
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 | [package]
19 | name = "basics"
20 | version = "0.0.0"
21 | authors = ["TVM Contributors"]
22 | license = "Apache-2.0"
23 | build = "build.rs"
24 |
25 | [dependencies]
26 | ndarray = "0.12.1"
27 | tvm-frontend = { path = "../../" }
28 |
29 | [features]
30 | default = ["cpu"]
31 | cpu = []
32 | gpu = []
33 |
--------------------------------------------------------------------------------
/rust/runtime/tests/test_nnvm/Cargo.toml:
--------------------------------------------------------------------------------
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 | [package]
19 | name = "test-nnvm"
20 | version = "0.0.0"
21 | license = "Apache-2.0"
22 | authors = ["TVM Contributors"]
23 |
24 | [dependencies]
25 | ndarray="0.12.1"
26 | serde = "1.0.59"
27 | serde_json = "1.0.17"
28 | tvm-runtime = { path = "../../" }
29 |
30 | [build-dependencies]
31 | ar = "0.6.0"
32 |
--------------------------------------------------------------------------------
/tests/scripts/task_python_unittest.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 | export PYTHONPATH=python:topi/python
23 |
24 | rm -rf python/tvm/*.pyc python/tvm/*/*.pyc python/tvm/*/*/*.pyc
25 |
26 | TVM_FFI=ctypes python3 -m pytest -v tests/python/unittest
27 | make cython3
28 | TVM_FFI=cython python3 -m pytest -v tests/python/unittest
29 |
--------------------------------------------------------------------------------
/python/tvm/relay/op/vision/__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 | """Vision network related operators."""
19 | from __future__ import absolute_import as _abs
20 |
21 | from .multibox import *
22 | from .nms import *
23 | from .rcnn import *
24 | from .yolo import *
25 | from . import _rcnn
26 | from . import _yolo
27 | from . import _vision
28 |
--------------------------------------------------------------------------------
/apps/sgx/enclave/Xargo.toml:
--------------------------------------------------------------------------------
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 | [dependencies]
19 | alloc = {}
20 | panic_unwind = {}
21 | panic_abort = {}
22 |
23 | [dependencies.std]
24 | path = "/opt/rust-sgx-sdk/xargo/sgx_tstd"
25 | features = ["backtrace", "stdio", "untrusted_time"]
26 | stage = 2
27 |
28 | [dependencies.xargo_sgx_rand]
29 | path = "/opt/rust-sgx-sdk/xargo/sgx_rand"
30 | stage = 3
31 |
--------------------------------------------------------------------------------
/docs/api_links.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 | Links to API References
19 | ==================================
20 |
21 | This page contains links to API references that are build with different doc build system.
22 |
23 | * `C++ doyxgen API `_
24 | * `Javascript jsdoc API `_
25 | * `Java Javadoc API `_
26 |
--------------------------------------------------------------------------------
/nnvm/python/nnvm/compiler/graph_pass.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=invalid-name
18 | """Namespace of graph pass.
19 |
20 | Principle:
21 | - Graph in, graph out: always takes in graph as first argument and returns a graph
22 | - Composable API: break graph transformation pass as segments of small transformations.
23 | """
24 | from __future__ import absolute_import as _abs
25 |
--------------------------------------------------------------------------------
/apps/android_rpc/dev_tools/sign_apk.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 | APK_DIR=$CURR_DIR/../app/build/outputs/apk/release
20 | UNSIGNED_APK=$APK_DIR/app-release-unsigned.apk
21 | SIGNED_APK=$APK_DIR/tvmrpc-release.apk
22 | jarsigner -verbose -keystore $CURR_DIR/tvmrpc.keystore -signedjar $SIGNED_APK $UNSIGNED_APK 'tvmrpc'
23 | echo $SIGNED_APK
24 |
--------------------------------------------------------------------------------
/docker/install/ubuntu_install_rat.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 | cd /tmp
24 | wget -q https://archive.apache.org/dist/creadur/apache-rat-0.12/apache-rat-0.12-bin.tar.gz
25 | tar xf apache-rat-0.12-bin.tar.gz
26 | mv apache-rat-0.12/apache-rat-0.12.jar /bin/apache-rat.jar
27 | rm -rf apache-rat-0.12-bin.tar.gz apache-rat-0.12
28 |
--------------------------------------------------------------------------------
/apps/android_deploy/dev_tools/sign_apk.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 | APK_DIR=$CURR_DIR/../app/build/outputs/apk/release
20 | UNSIGNED_APK=$APK_DIR/app-release-unsigned.apk
21 | SIGNED_APK=$APK_DIR/tvmdemo-release.apk
22 | jarsigner -verbose -keystore $CURR_DIR/tvmdemo.keystore -signedjar $SIGNED_APK $UNSIGNED_APK 'tvmdemo'
23 | echo $SIGNED_APK
24 |
--------------------------------------------------------------------------------
/vta/hardware/chisel/src/test/scala/unittest/utils/Helper.scala:
--------------------------------------------------------------------------------
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 | package unittest.util
21 |
22 | import scala.math.pow
23 |
24 | object helper {
25 | def getMask(bits: Int) : Long = {
26 | if (bits <= 0) throw new IllegalArgumentException ("bits should be greater than 0")
27 | return (pow(2, bits) - 1).toLong
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/jvm/conf/log4j.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 | # for development debugging
19 | log4j.rootLogger = info, stdout
20 |
21 | log4j.appender.stdout = org.apache.log4j.ConsoleAppender
22 | log4j.appender.stdout.Target = System.out
23 | log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
24 | log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} [%t] [%c] [%p] - %m%n
25 |
--------------------------------------------------------------------------------
/docker/install/ubuntu_install_vulkan.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 | wget -q https://sdk.lunarg.com/sdk/download/1.0.65.0/linux/vulkansdk-linux-x86_64-1.0.65.0.run
24 |
25 | bash vulkansdk-linux-x86_64-1.0.65.0.run
26 | mv VulkanSDK /usr/local/VulkanSDK
27 | cd /usr/local/VulkanSDK/1.0.65.0
28 | ./build_tools.sh
29 | ./build_samples.sh
30 |
--------------------------------------------------------------------------------
/docs/api/python/nnvm/testing.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 | nnvm.testing
19 | ------------
20 |
21 | .. automodule:: nnvm.testing
22 |
23 | .. autofunction:: nnvm.testing.ctx_list
24 |
25 | nnvm.testing.check_computation
26 | ------------------------------
27 |
28 | .. automodule:: nnvm.testing.check_computation
29 | :members:
30 |
31 | .. include:: testing_new_ops.rst
32 |
--------------------------------------------------------------------------------
/jvm/core/src/main/java/ml/dmlc/tvm/TVMValueLong.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * 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, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package ml.dmlc.tvm;
19 |
20 | public class TVMValueLong extends TVMValue {
21 | public final long value;
22 |
23 | public TVMValueLong(long value) {
24 | super(TypeCode.INT);
25 | this.value = value;
26 | }
27 |
28 | @Override public long asLong() {
29 | return value;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/python/tvm/relay/quantize/__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
18 | """Automatic quantization utilities."""
19 | from __future__ import absolute_import as _abs
20 |
21 | from .quantize import *
22 | from ._partition import register_partition_function
23 | from ._annotate import register_annotate_function
24 | from .kl_divergence import kl_divergence_scale
25 |
--------------------------------------------------------------------------------
/docs/api/python/relay/backend.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.backend
19 | -----------------
20 |
21 | .. automodule:: tvm.relay.backend
22 |
23 | .. automodule:: tvm.relay.backend.interpreter
24 | :members:
25 |
26 | .. automodule:: tvm.relay.backend.compile_engine
27 | :members:
28 |
29 | .. automodule:: tvm.relay.backend.graph_runtime_codegen
30 | :members:
31 |
--------------------------------------------------------------------------------
/apps/ios_rpc/tvmrpc/main.m:
--------------------------------------------------------------------------------
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 | /*!
21 | * Copyright (c) 2017 by Contributors
22 | * \file main.m
23 | */
24 |
25 | #import
26 | #import "AppDelegate.h"
27 |
28 | int main(int argc, char * argv[]) {
29 | @autoreleasepool {
30 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/apps/sgx/enclave/Cargo.toml:
--------------------------------------------------------------------------------
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 | [package]
19 | name = "model-enclave"
20 | version = "0.1.0"
21 | authors = ["Nick Hynes "]
22 |
23 | [lib]
24 | crate-type = ["staticlib"]
25 |
26 | [dependencies]
27 | lazy_static = "1.1.0"
28 | tvm = { path = "../../../rust", default-features = false, features = ["sgx"] }
29 |
30 | [profile.release]
31 | lto = true
32 | opt-level = 3
33 |
--------------------------------------------------------------------------------
/jvm/core/src/main/java/ml/dmlc/tvm/TVMValueBytes.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * 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, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package ml.dmlc.tvm;
19 |
20 | public class TVMValueBytes extends TVMValue {
21 | public final byte[] value;
22 |
23 | public TVMValueBytes(byte[] value) {
24 | super(TypeCode.BYTES);
25 | this.value = value;
26 | }
27 |
28 | @Override public byte[] asBytes() {
29 | return value;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/jvm/core/src/main/java/ml/dmlc/tvm/TVMValueString.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * 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, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package ml.dmlc.tvm;
19 |
20 | public class TVMValueString extends TVMValue {
21 | public final String value;
22 |
23 | public TVMValueString(String value) {
24 | super(TypeCode.STR);
25 | this.value = value;
26 | }
27 |
28 | @Override public String asString() {
29 | return value;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/jvm/core/src/main/java/ml/dmlc/tvm/TVMValueDouble.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * 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, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package ml.dmlc.tvm;
19 |
20 | public class TVMValueDouble extends TVMValue {
21 | public final double value;
22 |
23 | public TVMValueDouble(double value) {
24 | super(TypeCode.FLOAT);
25 | this.value = value;
26 | }
27 |
28 | @Override public double asDouble() {
29 | return value;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/python/tvm/autotvm/measure/__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 | """Distributed executor infrastructure to scale up the tuning"""
18 |
19 | from .measure import MeasureInput, MeasureResult, MeasureErrorNo, measure_option, \
20 | create_measure_batch
21 | from .measure_methods import LocalBuilder, LocalRunner, RPCRunner, request_remote
22 | from .executor import Executor
23 | from .local_executor import LocalExecutor
24 |
--------------------------------------------------------------------------------
/docker/install/ubuntu_install_iverilog.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 | apt-get install -y --no-install-recommends make bison flex
24 | wget -q ftp://icarus.com/pub/eda/verilog/v10/verilog-10.1.tar.gz
25 | tar xf verilog-10.1.tar.gz
26 | cd verilog-10.1
27 | ./configure --prefix=/usr
28 | make install -j8
29 | cd ..
30 | rm -rf verilog-10.1 verilog-10.1.tar.gz
31 |
--------------------------------------------------------------------------------
/docker/install/ubuntu_install_rocm.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 | # Install ROCm cross compilation toolchain.
24 | wget -qO - http://repo.radeon.com/rocm/apt/debian/rocm.gpg.key | sudo apt-key add -
25 | echo deb [arch=amd64] http://repo.radeon.com/rocm/apt/debian/ xenial main > /etc/apt/sources.list.d/rocm.list
26 | apt-get update && apt-get install -y rocm-dev
27 |
--------------------------------------------------------------------------------