junrushao commented on code in PR #12875:
URL: https://github.com/apache/tvm/pull/12875#discussion_r977975093
##########
python/tvm/tir/function.py:
##########
@@ -228,20 +228,24 @@ def register(name: str, desc: PrimFunc, impl: PrimFunc):
return _ffi_api.TensorIntrinRegister(name, TensorIntrin(desc, impl))
# type: ignore
@staticmethod
- def get(name: str):
+ def get(name: str, allow_missing: bool = False):
"""Look up a tensor intrinsic by its name.
Parameters
----------
name : str
The name of the TensorIntrin to look up.
+ allow_missing : bool
+ Whether to allow missing tensor intrin. If False, raise an error
if the tensor intrin
+ doesn't exist.
+
Returns
-------
result : TensorIntrin
Review Comment:
use Optional
--
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]