From 040a53276b17dd808c2dea2933c3ef7364ec63c8 Mon Sep 17 00:00:00 2001 From: Zhi Chen Date: Thu, 16 Jan 2020 21:59:26 +0000 Subject: [PATCH] adt/closure back to vm.adt/vm.closure --- include/tvm/relay/interpreter.h | 2 +- include/tvm/runtime/container.h | 4 ++-- include/tvm/runtime/object.h | 4 ++-- include/tvm/runtime/vm.h | 4 ++-- python/tvm/container.py | 2 +- src/runtime/container.cc | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/tvm/relay/interpreter.h b/include/tvm/relay/interpreter.h index d5e58c126b36..9309171003c2 100644 --- a/include/tvm/relay/interpreter.h +++ b/include/tvm/relay/interpreter.h @@ -25,7 +25,7 @@ * Given a Relay module, and a Relay expression it produces a value. * * The interpreter's values are a naive representation of the values that - * can be produced by a Relay program and are exposed via tvm's object + * can be produced by a Relay program and are exposed via TVM's object * protocol to Python for introspection and debugging. * * The interpreter's intent is to serve as a reference semantics for the Relay IR, diff --git a/include/tvm/runtime/container.h b/include/tvm/runtime/container.h index 29125b4a25a0..92d3e7149463 100644 --- a/include/tvm/runtime/container.h +++ b/include/tvm/runtime/container.h @@ -169,8 +169,8 @@ class ADTObj : public Object, public InplaceArrayBase { uint32_t size; // The fields of the structure follows directly in memory. - static constexpr const uint32_t _type_index = TypeIndex::kADT; - static constexpr const char* _type_key = "ADT"; + static constexpr const uint32_t _type_index = TypeIndex::kVMADT; + static constexpr const char* _type_key = "vm.ADT"; TVM_DECLARE_FINAL_OBJECT_INFO(ADTObj, Object); private: diff --git a/include/tvm/runtime/object.h b/include/tvm/runtime/object.h index 8e7727894af1..30b91865a041 100644 --- a/include/tvm/runtime/object.h +++ b/include/tvm/runtime/object.h @@ -51,8 +51,8 @@ namespace runtime { enum TypeIndex { /*! \brief Root object type. */ kRoot = 0, - kClosure = 1, - kADT = 2, + kVMClosure = 1, + kVMADT = 2, kRuntimeModule = 3, kStaticIndexEnd, /*! \brief Type index is allocated during runtime. */ diff --git a/include/tvm/runtime/vm.h b/include/tvm/runtime/vm.h index 4881b0ad2552..17ffd474c427 100644 --- a/include/tvm/runtime/vm.h +++ b/include/tvm/runtime/vm.h @@ -53,8 +53,8 @@ class ClosureObj : public Object { /*! \brief The free variables of the closure. */ std::vector free_vars; - static constexpr const uint32_t _type_index = TypeIndex::kClosure; - static constexpr const char* _type_key = "Closure"; + static constexpr const uint32_t _type_index = TypeIndex::kVMClosure; + static constexpr const char* _type_key = "vm.Closure"; TVM_DECLARE_FINAL_OBJECT_INFO(ClosureObj, Object); }; diff --git a/python/tvm/container.py b/python/tvm/container.py index 70aa0c6ef6c3..673afb428987 100644 --- a/python/tvm/container.py +++ b/python/tvm/container.py @@ -118,7 +118,7 @@ class LoweredFunc(Object): DeviceFunc = 2 -@register_object +@register_object("vm.ADT") class ADT(Object): """Algebatic data type(ADT) object. diff --git a/src/runtime/container.cc b/src/runtime/container.cc index 2688930242b5..cd426482d285 100644 --- a/src/runtime/container.cc +++ b/src/runtime/container.cc @@ -19,7 +19,7 @@ /*! * \file src/runtime/container.cc - * \brief Implementation of common POD containers. + * \brief Implementations of common plain old data (POD) containers. */ #include #include