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/08 06:05:29 UTC

[GitHub] [incubator-tvm] jroesch commented on a change in pull request #4643: [REFACTOR] Replace TensorObj and TensorValue with NDArray

jroesch commented on a change in pull request #4643: [REFACTOR] Replace TensorObj and TensorValue with NDArray
URL: https://github.com/apache/incubator-tvm/pull/4643#discussion_r364075487
 
 

 ##########
 File path: python/tvm/relay/backend/interpreter.py
 ##########
 @@ -23,27 +23,13 @@
 from . import _backend
 from .. import _make, analysis, transform
 from .. import module
-from ... import register_func, nd
+from ... import nd
 from ..base import NodeBase, register_relay_node
 from ..expr import Tuple, RefCreate, Call, Constant, GlobalVar, Function, const
 from ..scope_builder import ScopeBuilder
-from . import _vm
-
-class Value(NodeBase):
-    """Base class of all values.
-    """
-    @staticmethod
-    @register_func("relay.from_scalar")
-    def from_scalar(value, dtype=None):
-        """Convert a Python scalar to a Relay scalar."""
-        return TensorValue(const(value, dtype).data)
-
-    def to_vm(self):
-        return _vm._ValueToVM(self)
-
 
 @register_relay_node
-class TupleValue(Value):
+class TupleValue(NodeBase):
 
 Review comment:
   Shouldn't this be Object? or the equivalent Object base class, seems wrong to inherit from node. cc @tqchen 

----------------------------------------------------------------
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