Skip to content

Commit

Permalink
adt/closure back to vm.adt/vm.closure
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiics committed Jan 16, 2020
1 parent a00a3fc commit 040a532
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion include/tvm/relay/interpreter.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions include/tvm/runtime/container.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ class ADTObj : public Object, public InplaceArrayBase<ADTObj, ObjectRef> {
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:
Expand Down
4 changes: 2 additions & 2 deletions include/tvm/runtime/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
4 changes: 2 additions & 2 deletions include/tvm/runtime/vm.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ class ClosureObj : public Object {
/*! \brief The free variables of the closure. */
std::vector<ObjectRef> 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);
};

Expand Down
2 changes: 1 addition & 1 deletion python/tvm/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class LoweredFunc(Object):
DeviceFunc = 2


@register_object
@register_object("vm.ADT")
class ADT(Object):
"""Algebatic data type(ADT) object.
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/container.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <tvm/runtime/container.h>
#include <tvm/runtime/memory.h>
Expand Down

0 comments on commit 040a532

Please sign in to comment.