junrushao1994 commented on a change in pull request #10031:
URL: https://github.com/apache/tvm/pull/10031#discussion_r790195851
##########
File path: include/tvm/runtime/packed_func.h
##########
@@ -117,16 +170,12 @@ class PackedFunc {
* \param rv The return value.
*/
inline void CallPacked(TVMArgs args, TVMRetValue* rv) const;
- /*! \return the internal body function */
- inline FType body() const;
/*! \return Whether the packed function is nullptr */
- bool operator==(std::nullptr_t null) const { return body_ == nullptr; }
+ bool operator==(std::nullptr_t null) const { return data_ == nullptr; }
/*! \return Whether the packed function is not nullptr */
- bool operator!=(std::nullptr_t null) const { return body_ != nullptr; }
+ bool operator!=(std::nullptr_t null) const { return data_ != nullptr; }
Review comment:
Let's consider more carefully about the definition of nullability of
`PackedFunc`. There are two cases:
- C1. `PackedFunc::data_` is null
- C2. `PackedFunc::data_::f_call_packed_` is null
How do we formally define if a `PackedFunc` is null then?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]