junrushao commented on code in PR #12875: URL: https://github.com/apache/tvm/pull/12875#discussion_r977974861
########## include/tvm/tir/function.h: ########## @@ -233,10 +233,13 @@ class TensorIntrin : public ObjectRef { /*! * \brief Look up TensorIntrin by name. Raises an exception if not found. * \param name The name of the TensorIntrin. + * \param allow_missing Whether to allow missing tensor intrin. If false, an exception is raised + * if the tensor intrin is not found. * \return The TensorIntrin with the specified name. - * \throws This method throws an exception if the TensorIntrin does not exist. + * \throws This method throws an exception if the TensorIntrin does not exist and allow_missing is + * false. */ - TVM_DLL static TensorIntrin Get(String name); + TVM_DLL static TensorIntrin Get(String name, bool allow_missing = false); Review Comment: ```suggestion TVM_DLL static Optional<TensorIntrin> Get(String name, bool allow_missing = false); ``` -- 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