tvm-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tianqi Chen <>
Subject Re: [dmlc/tvm] [RFC] Node Construction Style: Use Constructor When Possible (#3223)
Date Thu, 23 May 2019 03:17:32 GMT
Some further thoughts: in many cases, a static factory function gives more information than
a constructor. For example, ```NDArray::Empty``` is certainly better than just using NDArray's

So we do want to keep static factory function if they are in reference types. Perhaps the
usage of the constructor should be restricted to the case where it is apparently initializing
the corresponding fields in the node, which is the case raised in the PR.

However, even if we want to use static factory functions, they should be in the NodeRef class,
as opposed to the Node class.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message