tvm
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
intrin_rule.h File Reference

Utility to generate intrinsic rules. More...

#include <tvm/ffi/container/array.h>
#include <tvm/ffi/dtype.h>
#include <tvm/ir/expr.h>
#include <tvm/ir/op.h>
#include <tvm/runtime/base.h>
#include <tvm/target/target.h>
#include <tvm/tirx/op/abi.h>
#include <string>
Include dependency graph for intrin_rule.h:

Go to the source code of this file.

Classes

struct  tvm::codegen::intrin::FloatSuffix
 Append f for scalar float32, preserve scalar float64, and reject other types. More...
 
struct  tvm::codegen::intrin::Direct
 Preserve the intrinsic name for every primitive type. More...
 

Namespaces

namespace  tvm
 An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
 
namespace  tvm::codegen
 namespace for target translation and codegen.
 
namespace  tvm::codegen::intrin
 

Functions

template<typename T , bool dtype_from_arg = false>
PrimExpr tvm::codegen::intrin::DispatchPureExtern (const PrimExpr &e, const Target &target)
 Dispatch pure extern function.
 
TVM_TIRX_DLL PrimExpr tvm::codegen::intrin::DispatchFastErf (const PrimExpr &e, const Target &target)
 Lower a unary float16/float32 erf call to a rational approximation. The expansion clamps the input to [-4, 4] and evaluates numerator and denominator polynomials using the input element width; other types are rejected.
 
TVM_TIRX_DLL PrimExpr tvm::codegen::intrin::DispatchNumericallyStableTanh (const PrimExpr &e, const Target &target)
 Lower a unary floating-point tanh call using sign-dependent exponential formulas. The expansion avoids the large-positive-input overflow of the symmetric formula; accuracy follows the floating-point arithmetic and exponential lowering in use.
 

Detailed Description

Utility to generate intrinsic rules.