Skip to content

Commit

Permalink
DLR 1.3 + Update TVM version (#221)
Browse files Browse the repository at this point in the history
* Update TVM commit and cmake rules for TRT

* Update tvm

* Update to latest release branch

* update

* sync dmlc-core with Treelite

* Update treelite commit id
  • Loading branch information
Trevor Morris authored Jul 29, 2020
1 parent c6933ff commit 9204cd0
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 289 deletions.
2 changes: 1 addition & 1 deletion 3rdparty/treelite
Submodule treelite updated 1 files
+1 −1 dmlc-core
2 changes: 1 addition & 1 deletion 3rdparty/tvm
Submodule tvm updated 1558 files
120 changes: 48 additions & 72 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ FILE(GLOB DLR_SRC
"src/*.cc"
${TVM_SRC}/src/runtime/dso_library.cc
${TVM_SRC}/src/runtime/cpu_device_api.cc
${TVM_SRC}/src/runtime/metadata_module.cc
${TVM_SRC}/src/runtime/contrib/sort/sort.cc
)

Expand Down Expand Up @@ -219,78 +220,53 @@ if(USE_TENSORRT)
include_directories("${TVM_SRC}/3rdparty/rang/include")
include_directories("${TVM_SRC}/3rdparty/compiler-rt")
include_directories("${TVM_SRC}/topi/include")
list(APPEND DLR_SRC
# Ops
${TVM_SRC}/src/relay/op/nn/nn.cc
${TVM_SRC}/src/relay/op/nn/pooling.cc
${TVM_SRC}/src/relay/op/nn/convolution.cc
${TVM_SRC}/src/relay/op/nn/pad.cc
${TVM_SRC}/src/relay/op/tensor/binary.cc
${TVM_SRC}/src/relay/op/tensor/unary.cc
${TVM_SRC}/src/relay/op/tensor/transform.cc
${TVM_SRC}/src/relay/op/tensor/reduce.cc
${TVM_SRC}/src/relay/op/image/resize.cc
${TVM_SRC}/src/node/container.cc
${TVM_SRC}/src/ir/attrs.cc

${TVM_SRC}/src/relay/ir/expr_functor.cc
${TVM_SRC}/src/relay/ir/pattern_functor.cc
${TVM_SRC}/src/relay/op/type_relations.cc
${TVM_SRC}/src/tir/ir/op.cc
${TVM_SRC}/src/arith/int_set.cc
${TVM_SRC}/src/tir/ir/expr.cc
${TVM_SRC}/src/te/tensor.cc
${TVM_SRC}/src/relay/ir/expr.cc
${TVM_SRC}/src/ir/expr.cc
${TVM_SRC}/src/relay/ir/function.cc
${TVM_SRC}/src/arith/canonical_simplify.cc
${TVM_SRC}/src/arith/rewrite_simplify.cc
${TVM_SRC}/src/arith/ir_mutator_with_analyzer.cc
${TVM_SRC}/src/tir/ir/stmt_functor.cc
${TVM_SRC}/src/tir/ir/expr_functor.cc
${TVM_SRC}/src/tir/ir/stmt.cc
${TVM_SRC}/src/tir/analysis/deep_equal.cc
${TVM_SRC}/src/relay/ir/adt.cc
${TVM_SRC}/src/arith/const_int_bound.cc
${TVM_SRC}/src/tir/ir/data_layout.cc
${TVM_SRC}/src/tir/pass/simple_passes.cc
${TVM_SRC}/src/ir/type.cc
${TVM_SRC}/src/ir/tensor_type.cc
${TVM_SRC}/src/ir/op.cc
${TVM_SRC}/src/arith/analyzer.cc
${TVM_SRC}/src/arith/modular_set.cc
${TVM_SRC}/src/arith/stmt_simplify.cc
${TVM_SRC}/src/node/repr_printer.cc
${TVM_SRC}/src/ir/env_func.cc
${TVM_SRC}/src/relay/analysis/util.cc
${TVM_SRC}/src/ir/type_functor.cc
${TVM_SRC}/src/ir/module.cc
${TVM_SRC}/src/relay/transforms/type_infer.cc
${TVM_SRC}/src/ir/error.cc
${TVM_SRC}/src/relay/analysis/type_solver.cc
${TVM_SRC}/src/node/reflection.cc
${TVM_SRC}/src/relay/ir/base.cc
${TVM_SRC}/src/relay/analysis/kind_check.cc
${TVM_SRC}/src/printer/relay_text_printer.cc
${TVM_SRC}/src/printer/doc.cc
${TVM_SRC}/src/relay/analysis/dependency_graph.cc
${TVM_SRC}/src/node/structural_equal.cc
${TVM_SRC}/src/relay/analysis/match_exhaustion.cc
${TVM_SRC}/src/node/serialization.cc
${TVM_SRC}/src/relay/transforms/eta_expand.cc
${TVM_SRC}/src/ir/transform.cc
${TVM_SRC}/src/ir/type_relation.cc
${TVM_SRC}/src/relay/transforms/de_duplicate.cc
${TVM_SRC}/src/te/operation/compute_op.cc
${TVM_SRC}/src/te/schedule/message_passing.cc
${TVM_SRC}/src/te/operation/op_util.cc
${TVM_SRC}/src/tir/pass/ir_util.cc
${TVM_SRC}/src/te/operation/cross_thread_reduction.cc
${TVM_SRC}/src/te/operation/tensorize.cc
${TVM_SRC}/src/tir/pass/arg_binder.cc
${TVM_SRC}/src/relay/ir/transform.cc
${TVM_SRC}/src/relay/analysis/well_formed.cc
)
file(GLOB_RECURSE COMPILER_SRCS
${TVM_SRC}/src/node/*.cc
${TVM_SRC}/src/ir/*.cc
${TVM_SRC}/src/arith/*.cc
${TVM_SRC}/src/te/*.cc
${TVM_SRC}/src/autotvm/*.cc
${TVM_SRC}/src/tir/*.cc
${TVM_SRC}/src/driver/*.cc
${TVM_SRC}/src/printer/*.cc
${TVM_SRC}/src/support/*.cc
)
file(GLOB CODEGEN_SRCS
${TVM_SRC}/src/target/*.cc
${TVM_SRC}/src/target/source/*.cc
)
list(APPEND COMPILER_SRCS ${CODEGEN_SRCS})
file(GLOB_RECURSE RELAY_OP_SRCS
${TVM_SRC}/src/relay/op/*.cc
)
file(GLOB_RECURSE RELAY_PASS_SRCS
${TVM_SRC}/src/relay/analysis/*.cc
${TVM_SRC}/src/relay/transforms/*.cc
${TVM_SRC}/src/relay/quantize/*.cc
)
file(GLOB RELAY_BACKEND_SRCS
${TVM_SRC}/src/relay/backend/*.cc
${TVM_SRC}/src/relay/backend/vm/*.cc
)
file(GLOB_RECURSE RELAY_IR_SRCS
${TVM_SRC}/src/relay/ir/*.cc
)
file(GLOB_RECURSE RELAY_QNN_SRCS
${TVM_SRC}/src/relay/qnn/*.cc
)
list(APPEND COMPILER_SRCS ${RELAY_OP_SRCS})
list(APPEND COMPILER_SRCS ${RELAY_PASS_SRCS})
list(APPEND COMPILER_SRCS ${RELAY_BACKEND_SRCS})
list(APPEND COMPILER_SRCS ${RELAY_IR_SRCS})
list(APPEND COMPILER_SRCS ${RELAY_QNN_SRCS})
file(GLOB DATATYPE_SRCS ${TVM_SRC}/src/target/datatype/*.cc)
list(APPEND COMPILER_SRCS ${DATATYPE_SRCS})
list(APPEND COMPILER_SRCS ${TVM_SRC}/src/target/opt/build_metal_off.cc)
list(APPEND COMPILER_SRCS ${TVM_SRC}/src/target/opt/build_sdaccel_off.cc)
list(APPEND COMPILER_SRCS ${TVM_SRC}/src/target/opt/build_aocl_off.cc)
list(APPEND COMPILER_SRCS ${TVM_SRC}/src/target/opt/build_opencl_off.cc)
list(APPEND COMPILER_SRCS ${TVM_SRC}/src/runtime/container.cc)
list(APPEND DLR_SRC ${COMPILER_SRCS})
set(USE_TENSORRT OFF)
endif()
if(WITH_TENSORFLOW_LITE_LIB)
Expand Down
2 changes: 1 addition & 1 deletion include/dlr.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ extern "C" { // Open extern "C" block
/*! \brief major version */
#define DLR_MAJOR 1
/*! \brief minor version */
#define DLR_MINOR 2
#define DLR_MINOR 3
/*! \brief patch version */
#define DLR_PATCH 0
/*! \brief DLR version */
Expand Down
2 changes: 1 addition & 1 deletion python/dlr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@

__all__ = ['DLRModel']

__version__ = "1.2.0"
__version__ = "1.3.0"
207 changes: 0 additions & 207 deletions python/dlr/compatibility.py

This file was deleted.

4 changes: 1 addition & 3 deletions python/dlr/dlr_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from pathlib import Path

from .api import IDLRModel
from .compatibility import check_tensorrt_compatibility
from .libpath import find_lib_path
from .neologger import create_logger

Expand Down Expand Up @@ -88,10 +87,9 @@ def __init__(self, model_path, dev_type='cpu', dev_id=0, error_log_file=None, us

if not os.path.exists(model_path):
raise ValueError("model_path %s doesn't exist" % model_path)
# Backwards compatibility for .tensorrt artifacts.
for file_name in os.listdir(model_path):
if file_name.endswith(".tensorrt"):
check_tensorrt_compatibility(os.path.join(model_path, file_name))
raise Exception("This model requires DLR release-1.1.0 to run.")
self.handle = c_void_p()
device_table = {
'cpu': 1,
Expand Down
6 changes: 3 additions & 3 deletions version.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"dlc_version": "1.2.0",
"dlc_version": "1.3.0",
"commit_ids": {
"neo-ai/tvm": "d361502f2c02fbc432ab009fa55aa65c179ded32",
"neo-ai/treelite": "938af7867641fb09a8c93aadb66587ad9cbed9c2"
"neo-ai/tvm": "14200c39ee7a61640739a83cb268e6dce3ca4143",
"neo-ai/treelite": "38964865d624048d1a432af2763ee1dcdbe3ce5d"
}
}

0 comments on commit 9204cd0

Please sign in to comment.