You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/01/16 21:41:32 UTC

[GitHub] [incubator-tvm] zhiics commented on a change in pull request #4693: [runtime][refactor] Unify vm and interpreter objects

zhiics commented on a change in pull request #4693: [runtime][refactor] Unify vm and interpreter objects
URL: https://github.com/apache/incubator-tvm/pull/4693#discussion_r367664773
 
 

 ##########
 File path: include/tvm/runtime/vm.h
 ##########
 @@ -25,34 +25,48 @@
 #define TVM_RUNTIME_VM_H_
 
 #include <tvm/runtime/object.h>
+#include <tvm/runtime/memory.h>
 #include <tvm/runtime/packed_func.h>
 #include <tvm/runtime/registry.h>
 #include <memory>
 #include <string>
 #include <unordered_map>
+#include <utility>
 #include <vector>
 
 namespace tvm {
 namespace runtime {
 namespace vm {
 
-/*! \brief An object representing a closure. */
+/*!
+ * \brief An object representing a closure. This object is used by both the
+ * Relay VM and interpreter.
+ */
 class ClosureObj : public Object {
  public:
-  /*! \brief The index into the VM function table. */
+  /*!
+   * \brief The index into the function list. The function could be any
+   * function object that is compatible to a certain runtime, i.e. VM or
+   * interpreter.
+   */
   size_t func_index;
   /*! \brief The free variables of the closure. */
   std::vector<ObjectRef> free_vars;
 
-  static constexpr const uint32_t _type_index = TypeIndex::kVMClosure;
-  static constexpr const char* _type_key = "vm.Closure";
 
 Review comment:
   Sure. I will change them back.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services