@@ -466,6 +466,44 @@ def tvm_struct_set(arr, index, field, value):
466466 return call_intrin ("handle" , "tir.tvm_struct_set" , arr , index , field , value )
467467
468468
469+ def address_of (buffer_load , span = None ):
470+ """Returns the address of an element in the buffer
471+
472+ Parameters
473+ ----------
474+ buffer_load: BufferLoad
475+ The buffer load.
476+
477+ span : Optional[Span]
478+ The location of this operator in the source code.
479+
480+ Returns
481+ -------
482+ call : PrimExpr
483+ The call expression.
484+ """
485+ return call_intrin ("handle" , "tir.address_of" , buffer_load , span = span )
486+
487+
488+ def lookup_param (param_name , span = None ):
489+ """Returns the param by name
490+
491+ Parameters
492+ ----------
493+ param_name : str
494+ The name of param.
495+
496+ span : Optional[Span]
497+ The location of this operator in the source code.
498+
499+ Returns
500+ -------
501+ call : PrimExpr
502+ The call expression.
503+ """
504+ return call_intrin ("handle" , "tir.lookup_param" , param_name , span = span )
505+
506+
469507def ret (val ):
470508 """Create a tir return expression
471509
@@ -610,6 +648,47 @@ def max_value(dtype: str, span: Optional[Span] = None) -> Any:
610648 return _ffi_api .max_value (dtype , span ) # type: ignore
611649
612650
651+ def infinity (dtype : str , span : Optional [Span ] = None ) -> Any :
652+ """infinity value of dtype
653+
654+ Parameters
655+ ----------
656+ dtype : str
657+ The data type.
658+
659+ span : Optional[Span]
660+ The location of this operator in the source code.
661+
662+ Returns
663+ -------
664+ value : tvm.Expr
665+ The infinity value of dtype.
666+ """
667+ return _ffi_api .infinity (dtype , span ) # type: ignore
668+
669+
670+ def reinterpret (dtype , value ) -> Any :
671+ """infinity value of dtype
672+
673+ Parameters
674+ ----------
675+ dtype : str
676+ The data type.
677+
678+ value : PrimExpr
679+ The input value.
680+
681+ span : Optional[Span]
682+ The location of this operator in the source code.
683+
684+ Returns
685+ -------
686+ value : tvm.Expr
687+ The reinterpret cast value of dtype.
688+ """
689+ return call_intrin (dtype , "tir.reinterpret" , value )
690+
691+
613692def exp (x ):
614693 """Take exponential of input x.
615694
@@ -1253,6 +1332,25 @@ def isnan(x, span=None):
12531332 return _ffi_api .isnan (x , span ) # type: ignore
12541333
12551334
1335+ def isnullptr (x , span = None ):
1336+ """Check if input value is nullptr.
1337+
1338+ Parameters
1339+ ----------
1340+ x : PrimExpr
1341+ Input argument.
1342+
1343+ span : Optional[Span]
1344+ The location of this operator in the source code.
1345+
1346+ Returns
1347+ -------
1348+ y : PrimExpr
1349+ The result.
1350+ """
1351+ return call_intrin ("bool" , "tir.isnullptr" , x , span = span ) # type: ignore
1352+
1353+
12561354def isfinite (x , span = None ):
12571355 """Check if input value is finite.
12581356
0 commit comments