zhiics 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_r364077173
########## 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: I noticed this as well. It is from here: https://github.com/apache/incubator-tvm/blob/bc0274d307226408c69226cf922dd916d773e265/python/tvm/_ffi/node.py#L33 and used as the base by `Value` before so I just kept it. ---------------------------------------------------------------- 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