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-unsubscr...@tvm.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org