You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "jinhongyii (via GitHub)" <gi...@apache.org> on 2023/09/05 23:36:07 UTC
[GitHub] [tvm] jinhongyii commented on a diff in pull request #15674: [Unity][Disco] Minor change for MLC+Disco integration
jinhongyii commented on code in PR #15674:
URL: https://github.com/apache/tvm/pull/15674#discussion_r1316518795
##########
include/tvm/runtime/disco/session.h:
##########
@@ -236,7 +248,7 @@ class Session : public ObjectRef {
public:
/*! \brief Create a session backed by a thread pool of workers */
static Session ThreadedSession(int num_workers);
- TVM_DEFINE_MUTABLE_NOTNULLABLE_OBJECT_REF_METHODS(Session, ObjectRef, SessionObj);
+ TVM_DEFINE_MUTABLE_OBJECT_REF_METHODS(Session, ObjectRef, SessionObj);
Review Comment:
In MLC we want to make Session a field. To initialize it, we are using ThreadSession(worker_num) instead of its constructor to create a session, so it has to be nullable to compile. Another reason is that in definition of DRef, we are already having
``` /*! \brief Back-pointer to the host controler session */
ObjectRef session{nullptr};
```
So there's no reason session can't be nullable.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org