tvm
Loading...
Searching...
No Matches
Functions
tvm::prim::detail Namespace Reference

Functions

bool IsIndexType (DLDataType type)
 Check whether type is used to represent index.
 
bool IsIndexTypedExpr (const ExprObj *expr)
 
bool IsIndexTypedExpr (const PrimExpr &expr)
 
bool IsRepresentable (const ffi::BigInt &value, const PrimType &dtype)
 Whether an exact integer is a valid literal of the given scalar type.
 
bool IsInFloat32Range (double value)
 Check float32 range, allowing rounding and supported special values.
 

Function Documentation

◆ IsIndexType()

bool tvm::prim::detail::IsIndexType ( DLDataType  type)
inline

Check whether type is used to represent index.

Index types are frequently used in shape computation and need to be aggressively constant-folded.

Parameters
typeThe type to represent index.
Returns
the checked result.

◆ IsIndexTypedExpr() [1/2]

bool tvm::prim::detail::IsIndexTypedExpr ( const ExprObj *  expr)
inline

◆ IsIndexTypedExpr() [2/2]

bool tvm::prim::detail::IsIndexTypedExpr ( const PrimExpr &  expr)
inline

◆ IsInFloat32Range()

bool tvm::prim::detail::IsInFloat32Range ( double  value)
inline

Check float32 range, allowing rounding and supported special values.

◆ IsRepresentable()

bool tvm::prim::detail::IsRepresentable ( const ffi::BigInt &  value,
const PrimType &  dtype 
)
inline

Whether an exact integer is a valid literal of the given scalar type.