Unverified Commit 5e3ceaa0 by Tianqi Chen Committed by GitHub

[DOCKER] Update docker protocol (#2793)

parent f8ac138e
...@@ -3,6 +3,28 @@ ...@@ -3,6 +3,28 @@
// Jenkins pipeline // Jenkins pipeline
// See documents at https://jenkins.io/doc/book/pipeline/jenkinsfile/ // See documents at https://jenkins.io/doc/book/pipeline/jenkinsfile/
// Docker env used for testing
// Different image may have different version tag
// because some of them are more stable than anoter.
//
// Docker images are maintained by PMC, cached in dockerhub
// and remains relatively stable over the time.
// Flow for upgrading docker env(need commiter)
//
// - Send PR to upgrade build script in the repo
// - Build the new docker image
// - Tag the docker image with a new version and push to tvmai
// - Update the version in the Jenkinsfile, send a PR
// - Fix any issues wrt to the new image version in the PR
// - Merge the PR and now we are in new version
// - Tag the new version as the lates
// - Periodically cleanup the old versions on local workers
//
ci_lint = "tvmai/ci-lint:v0.50"
ci_gpu = "tvmai/ci-gpu:v0.50"
ci_cpu = "tvmai/ci-cpu:v0.41"
ci_i386 = "tvmai/ci-i386:v0.50"
// tvm libraries // tvm libraries
tvm_runtime = "build/libtvm_runtime.so, build/config.cmake" tvm_runtime = "build/libtvm_runtime.so, build/config.cmake"
tvm_lib = "build/libtvm.so, " + tvm_runtime tvm_lib = "build/libtvm.so, " + tvm_runtime
...@@ -39,7 +61,7 @@ stage("Sanity Check") { ...@@ -39,7 +61,7 @@ stage("Sanity Check") {
node('CPU') { node('CPU') {
ws('workspace/tvm/sanity') { ws('workspace/tvm/sanity') {
init_git() init_git()
sh "${docker_run} tvmai/ci-lint ./tests/scripts/task_lint.sh" sh "${docker_run} ${ci_lint} ./tests/scripts/task_lint.sh"
} }
} }
} }
...@@ -103,7 +125,7 @@ stage('Build') { ...@@ -103,7 +125,7 @@ stage('Build') {
echo set\\(CMAKE_CXX_COMPILER g++\\) >> config.cmake echo set\\(CMAKE_CXX_COMPILER g++\\) >> config.cmake
echo set\\(CMAKE_CXX_FLAGS -Werror\\) >> config.cmake echo set\\(CMAKE_CXX_FLAGS -Werror\\) >> config.cmake
""" """
make('tvmai/ci-gpu', 'build', '-j2') make(ci_gpu, 'build', '-j2')
pack_lib('gpu', tvm_multilib) pack_lib('gpu', tvm_multilib)
// compiler test // compiler test
sh """ sh """
...@@ -117,7 +139,7 @@ stage('Build') { ...@@ -117,7 +139,7 @@ stage('Build') {
echo set\\(CMAKE_CXX_COMPILER clang-6.0\\) >> config.cmake echo set\\(CMAKE_CXX_COMPILER clang-6.0\\) >> config.cmake
echo set\\(CMAKE_CXX_FLAGS -Werror\\) >> config.cmake echo set\\(CMAKE_CXX_FLAGS -Werror\\) >> config.cmake
""" """
make('tvmai/ci-gpu', 'build2', '-j2') make(ci_gpu, 'build2', '-j2')
} }
} }
}, },
...@@ -138,15 +160,15 @@ stage('Build') { ...@@ -138,15 +160,15 @@ stage('Build') {
echo set\\(CMAKE_CXX_COMPILER g++\\) >> config.cmake echo set\\(CMAKE_CXX_COMPILER g++\\) >> config.cmake
echo set\\(CMAKE_CXX_FLAGS -Werror\\) >> config.cmake echo set\\(CMAKE_CXX_FLAGS -Werror\\) >> config.cmake
""" """
make('tvmai/ci-cpu', 'build', '-j2') make(ci_cpu, 'build', '-j2')
pack_lib('cpu', tvm_lib) pack_lib('cpu', tvm_lib)
timeout(time: max_time, unit: 'MINUTES') { timeout(time: max_time, unit: 'MINUTES') {
sh "${docker_run} tvmai/ci-cpu ./tests/scripts/task_cpp_unittest.sh" sh "${docker_run} ${ci_cpu} ./tests/scripts/task_cpp_unittest.sh"
sh "${docker_run} tvmai/ci-cpu ./tests/scripts/task_python_vta.sh" sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_vta.sh"
sh "${docker_run} tvmai/ci-cpu ./tests/scripts/task_rust.sh" sh "${docker_run} ${ci_cpu} ./tests/scripts/task_rust.sh"
sh "${docker_run} tvmai/ci-cpu ./tests/scripts/task_golang.sh" sh "${docker_run} ${ci_cpu} ./tests/scripts/task_golang.sh"
sh "${docker_run} tvmai/ci-cpu ./tests/scripts/task_python_unittest.sh" sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_unittest.sh"
sh "${docker_run} tvmai/ci-cpu ./tests/scripts/task_python_integration.sh" sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_integration.sh"
} }
} }
} }
...@@ -166,7 +188,7 @@ stage('Build') { ...@@ -166,7 +188,7 @@ stage('Build') {
echo set\\(CMAKE_CXX_COMPILER g++\\) >> config.cmake echo set\\(CMAKE_CXX_COMPILER g++\\) >> config.cmake
echo set\\(CMAKE_CXX_FLAGS -Werror\\) >> config.cmake echo set\\(CMAKE_CXX_FLAGS -Werror\\) >> config.cmake
""" """
make('tvmai/ci-i386', 'build', '-j2') make(ci_i386, 'build', '-j2')
pack_lib('i386', tvm_multilib) pack_lib('i386', tvm_multilib)
} }
} }
...@@ -180,8 +202,8 @@ stage('Unit Test') { ...@@ -180,8 +202,8 @@ stage('Unit Test') {
init_git() init_git()
unpack_lib('gpu', tvm_multilib) unpack_lib('gpu', tvm_multilib)
timeout(time: max_time, unit: 'MINUTES') { timeout(time: max_time, unit: 'MINUTES') {
sh "${docker_run} tvmai/ci-gpu ./tests/scripts/task_python_unittest.sh" sh "${docker_run} ${ci_gpu} ./tests/scripts/task_python_unittest.sh"
sh "${docker_run} tvmai/ci-gpu ./tests/scripts/task_python_integration.sh" sh "${docker_run} ${ci_gpu} ./tests/scripts/task_python_integration.sh"
} }
} }
} }
...@@ -192,9 +214,9 @@ stage('Unit Test') { ...@@ -192,9 +214,9 @@ stage('Unit Test') {
init_git() init_git()
unpack_lib('i386', tvm_multilib) unpack_lib('i386', tvm_multilib)
timeout(time: max_time, unit: 'MINUTES') { timeout(time: max_time, unit: 'MINUTES') {
sh "${docker_run} tvmai/ci-i386 ./tests/scripts/task_python_unittest.sh" sh "${docker_run} ${ci_i386} ./tests/scripts/task_python_unittest.sh"
sh "${docker_run} tvmai/ci-i386 ./tests/scripts/task_python_integration.sh" sh "${docker_run} ${ci_i386} ./tests/scripts/task_python_integration.sh"
sh "${docker_run} tvmai/ci-i386 ./tests/scripts/task_python_vta.sh" sh "${docker_run} ${ci_i386} ./tests/scripts/task_python_vta.sh"
} }
} }
} }
...@@ -205,7 +227,7 @@ stage('Unit Test') { ...@@ -205,7 +227,7 @@ stage('Unit Test') {
init_git() init_git()
unpack_lib('gpu', tvm_multilib) unpack_lib('gpu', tvm_multilib)
timeout(time: max_time, unit: 'MINUTES') { timeout(time: max_time, unit: 'MINUTES') {
sh "${docker_run} tvmai/ci-gpu ./tests/scripts/task_java_unittest.sh" sh "${docker_run} ${ci_gpu} ./tests/scripts/task_java_unittest.sh"
} }
} }
} }
...@@ -219,7 +241,7 @@ stage('Integration Test') { ...@@ -219,7 +241,7 @@ stage('Integration Test') {
init_git() init_git()
unpack_lib('gpu', tvm_multilib) unpack_lib('gpu', tvm_multilib)
timeout(time: max_time, unit: 'MINUTES') { timeout(time: max_time, unit: 'MINUTES') {
sh "${docker_run} tvmai/ci-gpu ./tests/scripts/task_python_topi.sh" sh "${docker_run} ${ci_gpu} ./tests/scripts/task_python_topi.sh"
} }
} }
} }
...@@ -230,7 +252,7 @@ stage('Integration Test') { ...@@ -230,7 +252,7 @@ stage('Integration Test') {
init_git() init_git()
unpack_lib('gpu', tvm_multilib) unpack_lib('gpu', tvm_multilib)
timeout(time: max_time, unit: 'MINUTES') { timeout(time: max_time, unit: 'MINUTES') {
sh "${docker_run} tvmai/ci-gpu ./tests/scripts/task_python_frontend.sh" sh "${docker_run} ${ci_gpu} ./tests/scripts/task_python_frontend.sh"
} }
} }
} }
...@@ -241,7 +263,7 @@ stage('Integration Test') { ...@@ -241,7 +263,7 @@ stage('Integration Test') {
init_git() init_git()
unpack_lib('gpu', tvm_multilib) unpack_lib('gpu', tvm_multilib)
timeout(time: max_time, unit: 'MINUTES') { timeout(time: max_time, unit: 'MINUTES') {
sh "${docker_run} tvmai/ci-gpu ./tests/scripts/task_python_docs.sh" sh "${docker_run} ${ci_gpu} ./tests/scripts/task_python_docs.sh"
} }
pack_lib('mydocs', 'docs.tgz') pack_lib('mydocs', 'docs.tgz')
} }
......
# CI docker CPU env # CI docker CPU env
# tag: v0.41
FROM ubuntu:16.04 FROM ubuntu:16.04
RUN apt-get update --fix-missing RUN apt-get update --fix-missing
......
# CI docker GPU env # CI docker GPU env
# tag: v0.41 # tag: v0.50
FROM nvidia/cuda:8.0-cudnn7-devel FROM nvidia/cuda:8.0-cudnn7-devel
# Base scripts # Base scripts
......
# CI docker i386 env # CI docker i386 env
# tag: v0.50
FROM ioft/i386-ubuntu:16.04 FROM ioft/i386-ubuntu:16.04
......
...@@ -33,6 +33,12 @@ else ...@@ -33,6 +33,12 @@ else
DOCKER_BINARY="docker" DOCKER_BINARY="docker"
fi fi
if [[ ! -z $CUDA_VISIBLE_DEVICES ]]; then
CUDA_ENV="-e CUDA_VISIBLE_DEVICES=${CUDA_VISIBLE_DEVICES}"
else
CUDA_ENV=""
fi
# Print arguments. # Print arguments.
echo "WORKSPACE: ${WORKSPACE}" echo "WORKSPACE: ${WORKSPACE}"
echo "DOCKER CONTAINER NAME: ${DOCKER_IMAGE_NAME}" echo "DOCKER CONTAINER NAME: ${DOCKER_IMAGE_NAME}"
...@@ -53,6 +59,8 @@ ${DOCKER_BINARY} run --rm --pid=host\ ...@@ -53,6 +59,8 @@ ${DOCKER_BINARY} run --rm --pid=host\
-e "CI_BUILD_UID=$(id -u)" \ -e "CI_BUILD_UID=$(id -u)" \
-e "CI_BUILD_GROUP=$(id -g -n)" \ -e "CI_BUILD_GROUP=$(id -g -n)" \
-e "CI_BUILD_GID=$(id -g)" \ -e "CI_BUILD_GID=$(id -g)" \
-e "PYTHONPATH=python:topi/python"\
${CUDA_ENV}\
${CI_DOCKER_EXTRA_PARAMS[@]} \ ${CI_DOCKER_EXTRA_PARAMS[@]} \
${DOCKER_IMAGE_NAME}\ ${DOCKER_IMAGE_NAME}\
bash --login /docker/with_the_same_user \ bash --login /docker/with_the_same_user \
......
...@@ -5,10 +5,7 @@ set -u ...@@ -5,10 +5,7 @@ set -u
set -o pipefail set -o pipefail
# fix to certain version for now # fix to certain version for now
pip2 install onnx>=1.1.0
pip3 install onnx>=1.1.0 pip3 install onnx>=1.1.0
pip2 install http://download.pytorch.org/whl/cu75/torch-0.2.0.post3-cp27-cp27mu-manylinux1_x86_64.whl pip3 install https://download.pytorch.org/whl/cu80/torch-1.0.1.post2-cp36-cp36m-linux_x86_64.whl
pip2 install torchvision
pip3 install http://download.pytorch.org/whl/cu75/torch-0.2.0.post3-cp35-cp35m-manylinux1_x86_64.whl
pip3 install torchvision pip3 install torchvision
...@@ -26,8 +26,15 @@ getent passwd "${CI_BUILD_UID}" || adduser --gid "${CI_BUILD_GID}" --uid "${CI_B ...@@ -26,8 +26,15 @@ getent passwd "${CI_BUILD_UID}" || adduser --gid "${CI_BUILD_GID}" --uid "${CI_B
usermod -a -G sudo "${CI_BUILD_USER}" usermod -a -G sudo "${CI_BUILD_USER}"
echo "${CI_BUILD_USER} ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/90-nopasswd-sudo echo "${CI_BUILD_USER} ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/90-nopasswd-sudo
if [[ ! -z $CUDA_VISIBLE_DEVICES ]]; then
CUDA_ENV="CUDA_VISIBLE_DEVICES=${CUDA_VISIBLE_DEVICES}"
else
CUDA_ENV=""
fi
HOME=${CI_BUILD_HOME}\ HOME=${CI_BUILD_HOME}\
sudo -u "#${CI_BUILD_UID}" --preserve-env\ sudo -u "#${CI_BUILD_UID}" --preserve-env\
${CUDA_ENV}\
PATH=${PATH}\ PATH=${PATH}\
JAVA_HOME=${JAVA_HOME}\ JAVA_HOME=${JAVA_HOME}\
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}\ LD_LIBRARY_PATH=${LD_LIBRARY_PATH}\
......
...@@ -12,7 +12,7 @@ This is a quick guide to submit a pull request, please also refer to the detaile ...@@ -12,7 +12,7 @@ This is a quick guide to submit a pull request, please also refer to the detaile
git rebase upstream/master git rebase upstream/master
- Make sure code style check pass by typing the following command, and all the existing test-cases pass. - Make sure code style check pass by typing the following command, and all the existing test-cases pass.
- ``docker/bash.sh tvmai/ci-lint ./tests/scripts/task_lint.sh`` - ``docker/bash.sh tvmai/ci-lint ./tests/scripts/task_lint.sh``
(Note: You must install docker beforehand so you can run a docker image.) (Note: You must install docker beforehand so you can run a docker image.)
- Add test-cases to cover the new features or bugfix the patch introduces. - Add test-cases to cover the new features or bugfix the patch introduces.
- Document the code you wrote, see more at :ref:`doc_guide` - Document the code you wrote, see more at :ref:`doc_guide`
...@@ -27,6 +27,28 @@ This is a quick guide to submit a pull request, please also refer to the detaile ...@@ -27,6 +27,28 @@ This is a quick guide to submit a pull request, please also refer to the detaile
- The patch can be merged after the reviewers approve the pull request. - The patch can be merged after the reviewers approve the pull request.
CI Environment
--------------
We use docker container to create stable CI environments
that can be deployed to multiple machines.
You can find the prebuilt images in `<https://hub.docker.com/r/tvmai/>`_ .
Because we want a relatively stable CI environment and make use of pre-cached image,
all of the CI images are built and maintained by comitters.
Upgrade of CI images can cause problems and need fixes to accommodate the new env.
Here is the protocol to update CI image:
- Send PR to upgrade build script in the repo
- Can be done by a contributor, the following steps need committership.
- Build the new docker image
- Tag the docker image with a new version and push to tvmai
- Update the version(most of the time increase the minor version) in the Jenkinsfile, send a PR.
- Fix any issues wrt to the new image versions in the PR.
- Merge the PR and now we are in new version.
- Tag the new version as the latest.
- Periodically cleanup the old versions on local workers
Testing Testing
------- -------
Even though we have hooks to run unit tests automatically for each pull request, It's always recommended to run unit tests Even though we have hooks to run unit tests automatically for each pull request, It's always recommended to run unit tests
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#define TVM_API_REGISTRY_H_ #define TVM_API_REGISTRY_H_
#include <string> #include <string>
#include <utility>
#include "base.h" #include "base.h"
#include "packed_func_ext.h" #include "packed_func_ext.h"
#include "runtime/registry.h" #include "runtime/registry.h"
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include <functional> #include <functional>
#include <type_traits> #include <type_traits>
#include <string> #include <string>
#include <utility>
#include "ir.h" #include "ir.h"
#include "base.h" #include "base.h"
#include "expr.h" #include "expr.h"
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <utility> #include <utility>
#include <unordered_map>
#include <unordered_set>
#include "runtime/packed_func.h" #include "runtime/packed_func.h"
#include "schedule_pass.h" #include "schedule_pass.h"
#include "lowered_func.h" #include "lowered_func.h"
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <ir/IRPrinter.h> #include <ir/IRPrinter.h>
#include <string> #include <string>
#include <algorithm> #include <algorithm>
#include <unordered_map>
#include "base.h" #include "base.h"
#include "runtime/c_runtime_api.h" #include "runtime/c_runtime_api.h"
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include "tvm/node/ir_functor.h" #include "tvm/node/ir_functor.h"
#include "ir.h" #include "ir.h"
#include <utility>
namespace tvm { namespace tvm {
namespace ir { namespace ir {
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <arithmetic/Simplify.h> #include <arithmetic/Simplify.h>
#include <unordered_map> #include <unordered_map>
#include <unordered_set>
#include <vector> #include <vector>
#include <string> #include <string>
#include "expr.h" #include "expr.h"
...@@ -336,7 +337,7 @@ Stmt RewriteUnsafeSelect(Stmt stmt); ...@@ -336,7 +337,7 @@ Stmt RewriteUnsafeSelect(Stmt stmt);
Stmt LowerStorageAccessInfo(Stmt stmt); Stmt LowerStorageAccessInfo(Stmt stmt);
/*! /*!
* \brief Decorate the stmt with a device scope, this is helpful for * \brief Decorate the stmt with a device scope, this is helpful for
* hardware accelerator without thread blocks. * hardware accelerator without thread blocks.
* *
* \param stmt The stmt to be trasnformed * \param stmt The stmt to be trasnformed
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <sstream> #include <sstream>
#include <unordered_map>
#include "./base.h" #include "./base.h"
#include "./expr.h" #include "./expr.h"
#include "./module.h" #include "./module.h"
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
#include <tvm/node/ir_functor.h> #include <tvm/node/ir_functor.h>
#include <string> #include <string>
#include <utility>
#include <unordered_map>
#include "./expr.h" #include "./expr.h"
#include "./adt.h" #include "./adt.h"
#include "./op.h" #include "./op.h"
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
#include <tvm/node/ir_functor.h> #include <tvm/node/ir_functor.h>
#include <string> #include <string>
#include <utility>
#include <unordered_map>
#include "./expr.h" #include "./expr.h"
#include "./op.h" #include "./op.h"
#include "./error.h" #include "./error.h"
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <string> #include <string>
#include <limits> #include <limits>
#include <memory> #include <memory>
#include <utility>
#include <type_traits> #include <type_traits>
#include "c_runtime_api.h" #include "c_runtime_api.h"
#include "module.h" #include "module.h"
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#define TVM_SCHEDULE_H_ #define TVM_SCHEDULE_H_
#include <string> #include <string>
#include <unordered_map>
#include "base.h" #include "base.h"
#include "expr.h" #include "expr.h"
#include "tensor.h" #include "tensor.h"
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <tvm/node/container.h> #include <tvm/node/container.h>
#include <string> #include <string>
#include <vector> #include <vector>
#include <utility>
#include <type_traits> #include <type_traits>
#include "base.h" #include "base.h"
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <string> #include <string>
#include <utility> #include <utility>
#include <algorithm> #include <algorithm>
#include <memory>
#include <unordered_map> #include <unordered_map>
#include <unordered_set> #include <unordered_set>
#include "base.h" #include "base.h"
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <vector> #include <vector>
#include <string> #include <string>
#include <unordered_map>
#include "tuple.h" #include "tuple.h"
#include "layout.h" #include "layout.h"
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <memory> #include <memory>
#include <string> #include <string>
#include <vector> #include <vector>
#include <utility>
#include <unordered_map> #include <unordered_map>
#include "base.h" #include "base.h"
#include "op.h" #include "op.h"
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <string> #include <string>
#include <utility> #include <utility>
#include <functional> #include <functional>
#include <unordered_map>
#include "base.h" #include "base.h"
#include "node.h" #include "node.h"
#include "tuple.h" #include "tuple.h"
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <string> #include <string>
#include <memory> #include <memory>
#include <vector> #include <vector>
#include <utility>
#include "base.h" #include "base.h"
#include "pass.h" #include "pass.h"
#include "graph_attr_types.h" #include "graph_attr_types.h"
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <vector> #include <vector>
#include <tuple> #include <tuple>
#include <utility> #include <utility>
#include <unordered_map>
#include "base.h" #include "base.h"
#include "node.h" #include "node.h"
......
...@@ -198,7 +198,9 @@ def compute_contrib_conv2d_NCHWc(attrs, inputs, _): ...@@ -198,7 +198,9 @@ def compute_contrib_conv2d_NCHWc(attrs, inputs, _):
# pylint: disable=assignment-from-no-return # pylint: disable=assignment-from-no-return
out = topi.nn.conv2d_NCHWc(inputs[0], inputs[1], strides, padding, dilation, out = topi.nn.conv2d_NCHWc(inputs[0], inputs[1], strides, padding, dilation,
layout, out_layout, out_dtype) layout, out_layout, out_dtype)
# pylint: enable=assignment-from-no-return
elif groups == in_channel and groups == out_channel: elif groups == in_channel and groups == out_channel:
# pylint: disable=assignment-from-no-return
out = topi.nn.depthwise_conv2d_NCHWc(inputs[0], inputs[1], strides, padding, out = topi.nn.depthwise_conv2d_NCHWc(inputs[0], inputs[1], strides, padding,
dilation, layout, out_layout, out_dtype) dilation, layout, out_layout, out_dtype)
# pylint: enable=assignment-from-no-return # pylint: enable=assignment-from-no-return
......
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
#include <nnvm/symbolic.h> #include <nnvm/symbolic.h>
#include <vector> #include <vector>
#include <string> #include <string>
#include <utility>
#include <unordered_map>
/*! \brief macro to guard beginning and end section of all functions */ /*! \brief macro to guard beginning and end section of all functions */
#define API_BEGIN() try { #define API_BEGIN() try {
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <tuple> #include <tuple>
#include <vector> #include <vector>
#include <limits> #include <limits>
#include <unordered_map>
#include "graph_hash.h" #include "graph_hash.h"
#include "compile_engine.h" #include "compile_engine.h"
......
...@@ -14,7 +14,10 @@ ...@@ -14,7 +14,10 @@
#include <nnvm/tuple.h> #include <nnvm/tuple.h>
#include <tvm/lowered_func.h> #include <tvm/lowered_func.h>
#include <tvm/runtime/packed_func.h> #include <tvm/runtime/packed_func.h>
#include <memory>
#include <utility>
#include <limits> #include <limits>
#include <unordered_map>
#include "graph_fuse.h" #include "graph_fuse.h"
#include "graph_runtime.h" #include "graph_runtime.h"
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <nnvm/graph.h> #include <nnvm/graph.h>
#include <vector> #include <vector>
#include <unordered_map>
#include "compile_engine.h" #include "compile_engine.h"
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <tvm/runtime/packed_func.h> #include <tvm/runtime/packed_func.h>
#include <functional> #include <functional>
#include <vector> #include <vector>
#include <utility>
#include <algorithm> #include <algorithm>
#include "node_attr.h" #include "node_attr.h"
#include "graph_hash.h" #include "graph_hash.h"
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <nnvm/graph.h> #include <nnvm/graph.h>
#include <tvm/operation.h> #include <tvm/operation.h>
#include <string> #include <string>
#include <utility>
namespace nnvm { namespace nnvm {
namespace compiler { namespace compiler {
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
* \brief Interface code with TVM graph runtime. * \brief Interface code with TVM graph runtime.
*/ */
#include <dmlc/memory_io.h> #include <dmlc/memory_io.h>
#include <utility>
#include "graph_runtime.h" #include "graph_runtime.h"
namespace nnvm { namespace nnvm {
......
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
#include <nnvm/graph.h> #include <nnvm/graph.h>
#include <vector> #include <vector>
#include <utility>
#include <unordered_map>
namespace nnvm { namespace nnvm {
namespace compiler { namespace compiler {
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <vector> #include <vector>
#include <utility> #include <utility>
#include <string> #include <string>
#include <unordered_map>
namespace nnvm { namespace nnvm {
namespace compiler { namespace compiler {
......
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
#include <nnvm/top/tensor.h> #include <nnvm/top/tensor.h>
#include <string> #include <string>
#include <vector> #include <vector>
#include <utility>
#include <unordered_map>
#include <unordered_set> #include <unordered_set>
namespace nnvm { namespace nnvm {
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
#include <map> #include <map>
#include <limits> #include <limits>
#include <vector> #include <vector>
#include <memory>
#include <unordered_map>
#include "canonical.h" #include "canonical.h"
#include "compute_expr.h" #include "compute_expr.h"
#include "arithmetic/Simplify.h" #include "arithmetic/Simplify.h"
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <tvm/expr.h> #include <tvm/expr.h>
#include <tvm/schedule.h> #include <tvm/schedule.h>
#include <memory>
namespace tvm { namespace tvm {
namespace arith { namespace arith {
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <set> #include <set>
#include <algorithm> #include <algorithm>
#include <cmath> #include <cmath>
#include <unordered_map>
namespace tvm { namespace tvm {
namespace autotvm { namespace autotvm {
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <map> #include <map>
#include <string> #include <string>
#include <deque> #include <deque>
#include <unordered_map>
#include "feature_visitor.h" #include "feature_visitor.h"
namespace tvm { namespace tvm {
......
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
#include <tvm/packed_func_ext.h> #include <tvm/packed_func_ext.h>
#include <vector> #include <vector>
#include <string> #include <string>
#include <utility>
#include <unordered_map>
#include "codegen_opengl.h" #include "codegen_opengl.h"
#include "build_common.h" #include "build_common.h"
#include "../runtime/thread_storage_scope.h" #include "../runtime/thread_storage_scope.h"
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
#include <tvm/codegen.h> #include <tvm/codegen.h>
#include <tvm/packed_func_ext.h> #include <tvm/packed_func_ext.h>
#include <string> #include <string>
#include <unordered_set>
#include <unordered_map>
#include "codegen_c.h" #include "codegen_c.h"
#include "../runtime/opengl/opengl_module.h" #include "../runtime/opengl/opengl_module.h"
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <tvm/runtime/c_runtime_api.h> #include <tvm/runtime/c_runtime_api.h>
#include <tvm/ir_pass.h> #include <tvm/ir_pass.h>
#include <unordered_map>
#include "codegen_cpu.h" #include "codegen_cpu.h"
#include "../../pass/ir_util.h" #include "../../pass/ir_util.h"
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include <string> #include <string>
#include <unordered_map>
#include "codegen_llvm.h" #include "codegen_llvm.h"
namespace tvm { namespace tvm {
......
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include <string> #include <string>
#include <unordered_map>
#include <unordered_set>
#include "llvm_common.h" #include "llvm_common.h"
#include "../../runtime/thread_storage_scope.h" #include "../../runtime/thread_storage_scope.h"
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <tvm/base.h> #include <tvm/base.h>
#include <atomic> #include <atomic>
#include <mutex> #include <mutex>
#include <memory>
#include "llvm_common.h" #include "llvm_common.h"
namespace tvm { namespace tvm {
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
#include <utility> #include <utility>
#include <string> #include <string>
#include <memory>
namespace tvm { namespace tvm {
namespace codegen { namespace codegen {
......
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
#include <tvm/lowered_func.h> #include <tvm/lowered_func.h>
#include <vector> #include <vector>
#include <memory>
#include <unordered_map>
#include "ir_builder.h" #include "ir_builder.h"
#include "../../runtime/thread_storage_scope.h" #include "../../runtime/thread_storage_scope.h"
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <vector> #include <vector>
#include <string> #include <string>
#include <map> #include <map>
#include <unordered_map>
#include <spirv.hpp> #include <spirv.hpp>
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include <tvm/runtime/registry.h> #include <tvm/runtime/registry.h>
#include <tvm/packed_func_ext.h> #include <tvm/packed_func_ext.h>
#include <limits> #include <limits>
#include <utility>
#include "codegen_stackvm.h" #include "codegen_stackvm.h"
#include "../../runtime/stackvm/stackvm_module.h" #include "../../runtime/stackvm/stackvm_module.h"
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <cctype> #include <cctype>
#include <sstream> #include <sstream>
#include <iostream> #include <iostream>
#include <utility>
#include "codegen_verilog.h" #include "codegen_verilog.h"
#include "../../arithmetic/compute_expr.h" #include "../../arithmetic/compute_expr.h"
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
* \brief IPC session call to verilog simulator via VPI. * \brief IPC session call to verilog simulator via VPI.
*/ */
#include <tvm/api_registry.h> #include <tvm/api_registry.h>
#include <memory>
#include "vpi_session.h" #include "vpi_session.h"
namespace tvm { namespace tvm {
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <tvm/base.h> #include <tvm/base.h>
#include <vector> #include <vector>
#include <string> #include <string>
#include <memory>
#include "../../common/pipe.h" #include "../../common/pipe.h"
#include "../../../verilog/tvm_vpi.h" #include "../../../verilog/tvm_vpi.h"
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#ifndef TVM_COMMON_ARENA_H_ #ifndef TVM_COMMON_ARENA_H_
#define TVM_COMMON_ARENA_H_ #define TVM_COMMON_ARENA_H_
#include <utility>
#include <type_traits> #include <type_traits>
namespace tvm { namespace tvm {
......
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
#ifndef TVM_LANG_ATTR_FUNCTOR_H_ #ifndef TVM_LANG_ATTR_FUNCTOR_H_
#define TVM_LANG_ATTR_FUNCTOR_H_ #define TVM_LANG_ATTR_FUNCTOR_H_
#include <utility>
namespace tvm { namespace tvm {
template <typename FType> template <typename FType>
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <tvm/ir_pass.h> #include <tvm/ir_pass.h>
#include <unordered_set> #include <unordered_set>
#include <string> #include <string>
#include <utility>
#include "compute_op.h" #include "compute_op.h"
#include "op_util.h" #include "op_util.h"
#include "../schedule/message_passing.h" #include "../schedule/message_passing.h"
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <ir/Expr.h> #include <ir/Expr.h>
#include <unordered_set> #include <unordered_set>
#include <string> #include <string>
#include <utility>
#include "op_util.h" #include "op_util.h"
#include "hybrid_op.h" #include "hybrid_op.h"
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <tvm/buffer.h> #include <tvm/buffer.h>
#include <string> #include <string>
#include <vector> #include <vector>
#include <unordered_map>
namespace tvm { namespace tvm {
namespace ir { namespace ir {
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <tvm/ir_mutator.h> #include <tvm/ir_mutator.h>
#include <tvm/target_info.h> #include <tvm/target_info.h>
#include <string> #include <string>
#include <utility>
#include "ir_util.h" #include "ir_util.h"
#include "storage_access.h" #include "storage_access.h"
#include "../arithmetic/compute_expr.h" #include "../arithmetic/compute_expr.h"
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <limits> #include <limits>
#include <mutex> #include <mutex>
#include <functional> #include <functional>
#include <unordered_map>
#include "compile_engine.h" #include "compile_engine.h"
namespace tvm { namespace tvm {
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <utility>
namespace tvm { namespace tvm {
namespace relay { namespace relay {
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
* \file type_functor.cc * \file type_functor.cc
* \brief Implementations of type functors. * \brief Implementations of type functors.
*/ */
#include <utility>
#include "type_functor.h" #include "type_functor.h"
namespace tvm { namespace tvm {
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <tvm/relay/adt.h> #include <tvm/relay/adt.h>
#include <string> #include <string>
#include <vector> #include <vector>
#include <utility>
namespace tvm { namespace tvm {
namespace relay { namespace relay {
......
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
#include <vector> #include <vector>
#include <functional> #include <functional>
#include <string> #include <string>
#include <utility>
#include <unordered_map>
#include "alter_op_layout.h" #include "alter_op_layout.h"
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <tvm/relay/op.h> #include <tvm/relay/op.h>
#include <tvm/relay/expr.h> #include <tvm/relay/expr.h>
#include <tvm/relay/attrs/transform.h> #include <tvm/relay/attrs/transform.h>
#include <unordered_map>
namespace tvm { namespace tvm {
namespace relay { namespace relay {
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <stack> #include <stack>
#include <utility>
#include "pattern_util.h" #include "pattern_util.h"
#include "quantize.h" #include "quantize.h"
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
* \brief Type solver implementations. * \brief Type solver implementations.
*/ */
#include <string> #include <string>
#include <memory>
#include "type_solver.h" #include "type_solver.h"
#include "../ir/type_functor.h" #include "../ir/type_functor.h"
......
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
#include <tvm/relay/error.h> #include <tvm/relay/error.h>
#include <vector> #include <vector>
#include <queue> #include <queue>
#include <unordered_map>
#include <unordered_set>
#include "../../common/arena.h" #include "../../common/arena.h"
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <array> #include <array>
#include <string> #include <string>
#include <mutex> #include <mutex>
#include <unordered_map>
#include "cuda_common.h" #include "cuda_common.h"
#include "../pack_args.h" #include "../pack_args.h"
#include "../thread_storage_scope.h" #include "../thread_storage_scope.h"
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include <string> #include <string>
#include <unordered_map>
#include "../meta_data.h" #include "../meta_data.h"
namespace tvm { namespace tvm {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include <tvm/runtime/serializer.h> #include <tvm/runtime/serializer.h>
#include <fstream> #include <fstream>
#include <vector> #include <vector>
#include <unordered_map>
#include "file_util.h" #include "file_util.h"
namespace tvm { namespace tvm {
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#define TVM_RUNTIME_FILE_UTIL_H_ #define TVM_RUNTIME_FILE_UTIL_H_
#include <string> #include <string>
#include <unordered_map>
#include "meta_data.h" #include "meta_data.h"
namespace tvm { namespace tvm {
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
#include <numeric> #include <numeric>
#include <vector> #include <vector>
#include <string> #include <string>
#include <memory>
#include <utility>
namespace tvm { namespace tvm {
namespace runtime { namespace runtime {
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
#include <tvm/runtime/ndarray.h> #include <tvm/runtime/ndarray.h>
#include <tvm/runtime/packed_func.h> #include <tvm/runtime/packed_func.h>
#include <memory>
#include <utility>
#include <vector> #include <vector>
#include <string> #include <string>
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <mutex> #include <mutex>
#include <string> #include <string>
#include <vector> #include <vector>
#include <memory>
#include "../workspace_pool.h" #include "../workspace_pool.h"
namespace tvm { namespace tvm {
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include <string> #include <string>
#include <unordered_map>
#include "../meta_data.h" #include "../meta_data.h"
namespace tvm { namespace tvm {
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <tvm/runtime/module.h> #include <tvm/runtime/module.h>
#include <tvm/runtime/registry.h> #include <tvm/runtime/registry.h>
#include <string> #include <string>
#include <memory>
#include "module_util.h" #include "module_util.h"
namespace tvm { namespace tvm {
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <tvm/runtime/module.h> #include <tvm/runtime/module.h>
#include <tvm/runtime/c_runtime_api.h> #include <tvm/runtime/c_runtime_api.h>
#include <tvm/runtime/c_backend_api.h> #include <tvm/runtime/c_backend_api.h>
#include <memory>
#include <vector> #include <vector>
extern "C" { extern "C" {
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#ifndef TVM_RUNTIME_OPENCL_AOCL_AOCL_COMMON_H_ #ifndef TVM_RUNTIME_OPENCL_AOCL_AOCL_COMMON_H_
#define TVM_RUNTIME_OPENCL_AOCL_AOCL_COMMON_H_ #define TVM_RUNTIME_OPENCL_AOCL_AOCL_COMMON_H_
#include <memory>
#include "../opencl_common.h" #include "../opencl_common.h"
namespace tvm { namespace tvm {
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include <string> #include <string>
#include <unordered_map>
#include "../../meta_data.h" #include "../../meta_data.h"
namespace tvm { namespace tvm {
......
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
#include <mutex> #include <mutex>
#include <string> #include <string>
#include <vector> #include <vector>
#include <memory>
#include <unordered_map>
#include "../workspace_pool.h" #include "../workspace_pool.h"
#include "../pack_args.h" #include "../pack_args.h"
#include "../thread_storage_scope.h" #include "../thread_storage_scope.h"
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include <string> #include <string>
#include <unordered_map>
#include "../meta_data.h" #include "../meta_data.h"
namespace tvm { namespace tvm {
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#ifndef TVM_RUNTIME_OPENCL_SDACCEL_SDACCEL_COMMON_H_ #ifndef TVM_RUNTIME_OPENCL_SDACCEL_SDACCEL_COMMON_H_
#define TVM_RUNTIME_OPENCL_SDACCEL_SDACCEL_COMMON_H_ #define TVM_RUNTIME_OPENCL_SDACCEL_SDACCEL_COMMON_H_
#include <memory>
#include "../opencl_common.h" #include "../opencl_common.h"
namespace tvm { namespace tvm {
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include <string> #include <string>
#include <unordered_map>
#include "../../meta_data.h" #include "../../meta_data.h"
namespace tvm { namespace tvm {
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <tuple> #include <tuple>
#include <utility> #include <utility>
#include <vector> #include <vector>
#include <memory>
namespace tvm { namespace tvm {
namespace runtime { namespace runtime {
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
*/ */
#include <tvm/runtime/registry.h> #include <tvm/runtime/registry.h>
#include <utility> #include <utility>
#include <unordered_map>
#include "opengl_common.h" #include "opengl_common.h"
#include "opengl_module.h" #include "opengl_module.h"
#include "../pack_args.h" #include "../pack_args.h"
......
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
#include <memory> #include <memory>
#include <string> #include <string>
#include <vector> #include <vector>
#include <utility>
#include <unordered_map>
#include "../meta_data.h" #include "../meta_data.h"
namespace tvm { namespace tvm {
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <array> #include <array>
#include <string> #include <string>
#include <mutex> #include <mutex>
#include <unordered_map>
#include "rocm_module.h" #include "rocm_module.h"
#include "rocm_common.h" #include "rocm_common.h"
#include "../pack_args.h" #include "../pack_args.h"
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include <string> #include <string>
#include <unordered_map>
#include "../meta_data.h" #include "../meta_data.h"
namespace tvm { namespace tvm {
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
#include <tvm/runtime/device_api.h> #include <tvm/runtime/device_api.h>
#include <mutex> #include <mutex>
#include <string> #include <string>
#include <memory>
#include <utility>
#include "../../common/ring_buffer.h" #include "../../common/ring_buffer.h"
namespace tvm { namespace tvm {
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <tvm/runtime/packed_func.h> #include <tvm/runtime/packed_func.h>
#include <string> #include <string>
#include <utility>
#include "../common.h" #include "../common.h"
namespace tvm { namespace tvm {
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
#include <tvm/runtime/registry.h> #include <tvm/runtime/registry.h>
#include <tvm/runtime/module.h> #include <tvm/runtime/module.h>
#include <dmlc/memory_io.h> #include <dmlc/memory_io.h>
#include <memory>
#include <utility>
#include <unordered_map>
#include "stackvm_module.h" #include "stackvm_module.h"
#include "../file_util.h" #include "../file_util.h"
#include "../module_util.h" #include "../module_util.h"
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <tvm/runtime/packed_func.h> #include <tvm/runtime/packed_func.h>
#include <string> #include <string>
#include <unordered_map>
#include "stackvm.h" #include "stackvm.h"
namespace tvm { namespace tvm {
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <mutex> #include <mutex>
#include <string> #include <string>
#include <vector> #include <vector>
#include <memory>
#include "../workspace_pool.h" #include "../workspace_pool.h"
namespace tvm { namespace tvm {
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
* \file workspace_pool.h * \file workspace_pool.h
* \brief Workspace pool utility. * \brief Workspace pool utility.
*/ */
#include <memory>
#include "workspace_pool.h" #include "workspace_pool.h"
namespace tvm { namespace tvm {
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <tvm/runtime/device_api.h> #include <tvm/runtime/device_api.h>
#include <vector> #include <vector>
#include <memory>
namespace tvm { namespace tvm {
namespace runtime { namespace runtime {
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <tvm/ir.h> #include <tvm/ir.h>
#include <tvm/ir_visitor.h> #include <tvm/ir_visitor.h>
#include <tvm/operation.h> #include <tvm/operation.h>
#include <utility>
#include <unordered_set> #include <unordered_set>
#include <unordered_map> #include <unordered_map>
#include "graph.h" #include "graph.h"
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# Add files or directories to the blacklist. They should be base names, not # Add files or directories to the blacklist. They should be base names, not
# paths. # paths.
ignore=CVS, _cy2, _cy3 ignore=CVS, _cy2, _cy3, grammar
# Add files or directories matching the regex patterns to the blacklist. The # Add files or directories matching the regex patterns to the blacklist. The
# regex matches against base names, not paths. # regex matches against base names, not paths.
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <iterator> #include <iterator>
#include <algorithm> #include <algorithm>
#include <limits> #include <limits>
#include <unordered_set>
#include "topi/tags.h" #include "topi/tags.h"
#include "topi/detail/ravel_unravel.h" #include "topi/detail/ravel_unravel.h"
......
...@@ -51,11 +51,11 @@ def verify_upsampling(batch, in_channel, in_height, in_width, scale, layout='NCH ...@@ -51,11 +51,11 @@ def verify_upsampling(batch, in_channel, in_height, in_width, scale, layout='NCH
def test_upsampling(): def test_upsampling():
# NEAREST_NEIGHBOR - NCHW # NEAREST_NEIGHBOR - NCHW
verify_upsampling(8, 16, 32, 32, 2) verify_upsampling(8, 16, 32, 32, 2)
verify_upsampling(12, 32, 64, 64, 3) verify_upsampling(2, 32, 64, 64, 3)
# NEAREST_NEIGHBOR - NHWC # NEAREST_NEIGHBOR - NHWC
verify_upsampling(8, 16, 32, 32, 2, layout="NHWC") verify_upsampling(8, 16, 32, 32, 2, layout="NHWC")
verify_upsampling(12, 32, 64, 64, 3, layout="NHWC") verify_upsampling(2, 32, 64, 64, 3, layout="NHWC")
# BILINEAR - NCHW # BILINEAR - NCHW
verify_upsampling(2, 2, 32, 32, 2, method="BILINEAR") verify_upsampling(2, 2, 32, 32, 2, method="BILINEAR")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment