-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Relay][Runtime] Add support for virtual machine Objects #3120
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm.
include/tvm/runtime/object.h
Outdated
*/ | ||
class Object { | ||
public: | ||
ObjectPtr<ObjectCell> ptr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because we do not want the user to touch ptr, consider rename to ptr_,
Some minor nits. After some thoughts, I personally do not like the fact that Node and Object system are separate. Eventually, we want to merge them into a single node system, but still have a clear separation of compiler and runtime node objects. For now, we could even reuse the NodeBase class for object(which allows the effective use of make_node). This may need to happen in a few months and I don't want to block the PR, but it might be helpful to keep that in mind when polishing this PR, e.g., the naming(XXXCell-> XXXNode?). Possible way of unification, for reference:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM: unaddress comment: Please rename Object::ptr ->Object::ptr_
This PR separates the functionality for passing
runtime::Object
s around from the VM, VM memory manager and VM compiler.See #2810 and #2889.