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

 ##########
 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:
   There is no Node anymore in the c++ side, see 
https://github.com/apache/incubator-tvm/pull/4603 and 
https://github.com/apache/incubator-tvm/issues/4647
   
   So NodeBase was a legacy item that we might need to upgrade on the python 
side.
   
   

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to