23#ifndef TVM_IR_PRIM_OP_H_
24#define TVM_IR_PRIM_OP_H_
514template <
typename ValueType,
515 typename =
typename std::enable_if<(std::is_standard_layout<ValueType>::value &&
516 std::is_trivial<ValueType>::value) ||
517 std::is_same<ValueType, ffi::BigInt>::value>::type>
520template <
typename ValueType>
522 if constexpr (std::is_enum_v<ValueType>) {
523 return MakeConstScalar(dtype,
static_cast<std::underlying_type_t<ValueType>
>(value), loc);
525 DLDataTypeCode code = dtype.
code();
526 if (code == DLDataTypeCode::kDLInt || code == DLDataTypeCode::kDLBool) {
527 return IntImm(dtype, ffi::BigInt(value), loc);
529 if (code == DLDataTypeCode::kDLUInt) {
530 TVM_FFI_ICHECK(value >= 0) <<
"cannot make uint from negative value " << value;
531 return IntImm(dtype, ffi::BigInt(value), loc);
533 if (dtype.
MatchesCode(DLDataTypeCode::kDLFloat, DLDataTypeCode::kDLFloat8_e3m4,
534 DLDataTypeCode::kDLFloat8_e4m3, DLDataTypeCode::kDLFloat8_e4m3b11fnuz,
535 DLDataTypeCode::kDLFloat8_e4m3fn, DLDataTypeCode::kDLFloat8_e4m3fnuz,
536 DLDataTypeCode::kDLFloat8_e5m2, DLDataTypeCode::kDLFloat8_e5m2fnuz,
537 DLDataTypeCode::kDLFloat8_e8m0fnu, DLDataTypeCode::kDLFloat6_e2m3fn,
538 DLDataTypeCode::kDLFloat6_e3m2fn, DLDataTypeCode::kDLFloat4_e2m1fn) ||
540 return FloatImm(dtype,
static_cast<double>(value), loc);
542 TVM_FFI_THROW(InternalError) <<
"cannot make const for type " << dtype;
552template <
typename ValueType,
typename>
569#define TVM_DEFINE_ASSIGN_OP_OVERLOAD(Name, OpFunc) \
570 inline PrimExpr Name(PrimExpr& a, PrimExpr b) { \
575#define TVM_DEFINE_BINOP_CONST_VAL_OVERLOAD(Name) \
576 inline PrimExpr Name(const PrimExpr& a, float b) { return Name(a, PrimExpr(b)); } \
577 inline PrimExpr Name(float a, const PrimExpr& b) { return Name(PrimExpr(a), b); } \
578 inline PrimExpr Name(int a, const PrimExpr& b) { return Name(prim::MakeConst(b.ty(), a), b); } \
579 inline PrimExpr Name(const PrimExpr& a, int b) { return Name(a, prim::MakeConst(a.ty(), b)); } \
580 inline PrimExpr Name(const PrimExpr& a, double b) { \
581 return Name(a, FloatImm(PrimType::Float(64), b)); \
584#define TVM_DEFINE_BINOP_CONST_VAL_OVERLOAD_SPANNED(Name) \
585 inline PrimExpr Name(const PrimExpr& a, float b, Location loc = UnknownLoc()) { \
586 return Name(a, PrimExpr(b), loc); \
588 inline PrimExpr Name(float a, const PrimExpr& b, Location loc = UnknownLoc()) { \
589 return Name(PrimExpr(a), b, loc); \
591 inline PrimExpr Name(int a, const PrimExpr& b, Location loc = UnknownLoc()) { \
592 return Name(prim::MakeConst(b.ty(), a), b, loc); \
594 inline PrimExpr Name(const PrimExpr& a, int b, Location loc = UnknownLoc()) { \
595 return Name(a, prim::MakeConst(a.ty(), b), loc); \
597 inline PrimExpr Name(const PrimExpr& a, double b, Location loc = UnknownLoc()) { \
598 return Name(a, FloatImm(PrimType::Float(64), b), loc); \
601#define TVM_DEFINE_LOGICAL_OP_CONST_VAL_OVERLOAD(Name) \
602 inline PrimExpr Name(const PrimExpr& a, bool b) { return Name(a, PrimExpr(b)); } \
603 inline PrimExpr Name(bool a, const PrimExpr& b) { return Name(PrimExpr(a), b); }
605#define TVM_DEFINE_LOGICAL_OP_CONST_VAL_OVERLOAD_SPANNED(Name) \
606 inline PrimExpr Name(const PrimExpr& a, bool b, Location loc = UnknownLoc()) { \
607 return Name(a, PrimExpr(b), loc); \
609 inline PrimExpr Name(bool a, const PrimExpr& b, Location loc = UnknownLoc()) { \
610 return Name(PrimExpr(a), b, loc); \
613#define TVM_DEFINE_INT_OP_CONST_VAL_OVERLOAD(Name) \
614 inline PrimExpr Name(const PrimExpr& a, int b) { return Name(a, prim::MakeConst(a.ty(), b)); } \
615 inline PrimExpr Name(int a, const PrimExpr& b) { return Name(prim::MakeConst(b.ty(), a), b); }
617#define TVM_DEFINE_INT_OP_CONST_VAL_OVERLOAD_SPANNED(Name) \
618 inline PrimExpr Name(const PrimExpr& a, int b, Location loc = UnknownLoc()) { \
619 return Name(a, prim::MakeConst(a.ty(), b), loc); \
621 inline PrimExpr Name(int a, const PrimExpr& b, Location loc = UnknownLoc()) { \
622 return Name(prim::MakeConst(b.ty(), a), b, loc); \
673template <
typename TA>
675 constexpr bool div_ambiguity = !std::is_class<TA>::value;
676 static_assert(div_ambiguity,
677 "TVM supports multiple types of integer divisions, "
678 "please call div, indexdiv/indexmod, "
679 "floordiv/floormod or truncdiv/truncmod directly "
680 "to avoid ambiguity in the code. "
681 "Checkout these functions in ir/prim/op.h.");
689template <
typename TB>
695template <
typename TB>
701template <
typename TB>
716inline bool IsConstInt(
const PrimExpr& x, int64_t value);
724inline bool IsOne(
const PrimExpr& x);
732inline bool IsZero(
const PrimExpr& x);
738inline bool IsConstInt(
const PrimExpr& x);
745inline bool IsConstNumber(
const PrimExpr& x);
779 return as_int && as_int->
value > 0;
784 return as_int && as_int->
value < 0;
789 return as_int && as_int->
value == value;
967 return Call(x.
ty(),
fma_op(), {x, y, z}, {}, {}, loc).as_or_throw<PrimExpr>();
971 TVM_FFI_CHECK(dtype.
code() == DLDataTypeCode::kDLFloat ||
974 <<
"prim." << op_name <<
" only supports floating-point inputs, but got " << dtype;
978#define TVM_DECLARE_INTRIN_UNARY_WITH_CHECK(OpName, CheckInputDType) \
979 inline PrimExpr OpName(PrimExpr x, Location loc = UnknownLoc()) { \
980 static const Op op = Op::Get("prim." #OpName); \
981 PrimType x_ty = x.ty(); \
982 CheckInputDType(#OpName, x_ty); \
983 if (x_ty.MatchesElementType(DLDataTypeCode::kDLBfloat, 16)) { \
984 PrimType bf16_ty = x_ty; \
986 x_ty.IsScalableVector() \
987 ? PrimType::ScalableVector(DLDataTypeCode::kDLFloat, 32, x_ty.VScaleFactor()) \
988 : PrimType::Float(32, x_ty.lanes()); \
989 PrimExpr x_fp32 = prim::Cast(f32_ty, x, loc); \
990 PrimExpr result_fp32 = Call(f32_ty, op, {x_fp32}, {}, {}, loc).as_or_throw<PrimExpr>(); \
991 return prim::Cast(bf16_ty, result_fp32, loc); \
993 return Call(x_ty, op, {x}, {}, {}, loc).as_or_throw<PrimExpr>(); \
997#define TVM_DECLARE_INTRIN_UNARY(OpName) \
998 TVM_DECLARE_INTRIN_UNARY_WITH_CHECK(OpName, [](const char*, const PrimType&) {})
1000#define TVM_DECLARE_FLOAT_INTRIN_UNARY(OpName) \
1001 TVM_DECLARE_INTRIN_UNARY_WITH_CHECK(OpName, CheckMathUnaryOpInputDType)
1027#define TVM_DECLARE_INTRIN_BINARY(OpName) \
1028 inline PrimExpr OpName(PrimExpr x, PrimExpr y, Location loc = UnknownLoc()) { \
1029 static const Op op = Op::Get("prim." #OpName); \
1030 return Call(x.ty(), op, {x, y}, {}, {}, loc).as_or_throw<PrimExpr>(); \
1039template <
typename FReduce>
1043 init_value = freduce(init_value, val, loc);
Managed reference to CallNode.
Definition expr.h:972
Constant floating point literals in the program.
Definition expr.h:215
Managed reference class to FloatImmNode.
Definition expr.h:232
Constant integer literals in the program.
Definition expr.h:135
ffi::BigInt value
the Internal value.
Definition expr.h:138
Managed reference class to IntImmNode.
Definition expr.h:152
Non-nullable source-location metadata.
Definition location.h:91
Reference-counted handle to a canonical named operator.
Definition op.h:147
Typed reference/view over any Expr whose ExprNode::ty is PrimType.
Definition base_expr.h:447
Definition base_expr.h:161
TVM_FFI_INLINE DLDataTypeCode code() const
Definition base_expr.h:198
TVM_FFI_INLINE PrimType WithLanes(int lanes) const
Return the same scalar element type with a fixed lane count.
Definition base_expr.h:298
TVM_FFI_INLINE bool IsScalableVector() const
Whether this type is a scalable vector.
Definition base_expr.h:251
TVM_FFI_INLINE bool IsFixedLengthVector() const
Whether this type is a fixed-length vector.
Definition base_expr.h:256
TVM_FFI_INLINE bool MatchesCode(Codes... codes) const
Check whether the dtype code matches any of the provided DLPack codes.
Definition base_expr.h:232
TVM_FFI_INLINE bool MatchesElementType(DLDataTypeCode code, int bits) const
Check the scalar element code and bit width.
Definition base_expr.h:222
static TVM_TIRX_DLL PrimType Int(int bits, int lanes=1)
Construct a signed integer type with fixed lanes.
TVM_FFI_INLINE int32_t VScaleFactor() const
Definition base_expr.h:303
TVM_FFI_INLINE int32_t lanes() const
Definition base_expr.h:209
ExpectedType ty() const
Definition base_expr.h:424
Reference to the shared immutable unknown location.
Definition location.h:105
Create a vector where all the elements are value.
Definition vector_expr.h:79
Managed reference to BroadcastNode.
Definition vector_expr.h:102
Managed reference to MulNode.
Definition expr.h:266
Canonical primitive operators and their registration.
#define TVM_DECLARE_INTRIN_UNARY(OpName)
Definition op.h:997
#define TVM_DEFINE_INT_OP_CONST_VAL_OVERLOAD(Name)
Definition op.h:613
#define TVM_DEFINE_LOGICAL_OP_CONST_VAL_OVERLOAD_SPANNED(Name)
Definition op.h:605
#define TVM_DEFINE_ASSIGN_OP_OVERLOAD(Name, OpFunc)
Definition op.h:569
#define TVM_DECLARE_FLOAT_INTRIN_UNARY(OpName)
Definition op.h:1000
#define TVM_DEFINE_BINOP_CONST_VAL_OVERLOAD_SPANNED(Name)
Definition op.h:584
#define TVM_DEFINE_BINOP_CONST_VAL_OVERLOAD(Name)
Definition op.h:575
#define TVM_DEFINE_LOGICAL_OP_CONST_VAL_OVERLOAD(Name)
Definition op.h:601
#define TVM_DECLARE_INTRIN_BINARY(OpName)
Definition op.h:1027
#define TVM_DEFINE_INT_OP_CONST_VAL_OVERLOAD_SPANNED(Name)
Definition op.h:617
TVM_TIRX_DLL PrimExpr nearbyint(PrimExpr x, Location loc=UnknownLoc())
Round x to the nearest integer, ties to even.
TVM_TIRX_DLL const Op & log_op()
Natural logarithm. Argument: x.
TVM_TIRX_DLL const Op & assume_op()
Record a known condition for simplification. Argument: condition.
TVM_TIRX_DLL const Op & log10_op()
Base-ten logarithm. Argument: x.
TVM_TIRX_DLL PrimExpr isfinite(PrimExpr x, Location loc=UnknownLoc())
Check if x is finite.
TVM_TIRX_DLL const Op & atan_op()
Inverse tangent. Argument: x.
TVM_TIRX_DLL const Op & isnan_op()
Check for NaN, preserving the lane count. Argument: x.
TVM_TIRX_DLL bool IsPowerOfTwoInt(const PrimExpr &x, int *shift)
Check whether x is a constant power of two If x is power of two, write the power to the shift.
TVM_TIRX_DLL const Op & tan_op()
Tangent. Argument: x.
void CheckMathUnaryOpInputDType(const char *op_name, const PrimType &dtype)
Definition op.h:970
TVM_TIRX_DLL PrimExpr min_value(PrimType dtype, Location loc=UnknownLoc())
PrimExpr foldl(FReduce freduce, PrimExpr init_value, const ffi::Array< PrimExpr > &values, Location loc=UnknownLoc())
Definition op.h:1040
TVM_TIRX_DLL const Op & ceil_op()
Round up to the nearest integral value.
TVM_TIRX_DLL PrimExpr IntegerAbs(PrimExpr x, Location loc=UnknownLoc())
Construct integer absolute value; floating absolute value belongs to TIRX.
TVM_TIRX_DLL const Op & sqrt_op()
Square root. Argument: x.
TVM_TIRX_DLL const Op & clz_op()
Count leading zero bits.
TVM_TIRX_DLL const Op & acos_op()
Inverse cosine. Argument: x.
TVM_TIRX_DLL const Op & pow_op()
Raise x to the power y. Arguments: x, y.
TVM_TIRX_DLL const Op & ldexp_op()
Multiply x by two raised to exponent. Arguments: x, exponent.
TVM_TIRX_DLL PrimExpr isnan(PrimExpr x, Location loc=UnknownLoc())
Check if x is NaN.
TVM_TIRX_DLL PrimExpr trunc(PrimExpr x, Location loc=UnknownLoc())
Calculate trunc(x)
PrimExpr MakeConstScalar(PrimType dtype, ValueType value, Location loc=UnknownLoc())
Definition op.h:521
TVM_TIRX_DLL PrimExpr isinf(PrimExpr x, Location loc=UnknownLoc())
Check if x is infinite.
TVM_TIRX_DLL PrimExpr floor(PrimExpr x, Location loc=UnknownLoc())
Calculate floor(x)
TVM_TIRX_DLL const Op & cosh_op()
Hyperbolic cosine. Argument: x.
TVM_TIRX_DLL const Op & fma_op()
Fused multiply-add, x * y + z. Arguments: x, y, z.
TVM_TIRX_DLL PrimExpr assume(PrimExpr condition, Location loc=UnknownLoc())
Record a known condition for compile-time simplification.
TVM_TIRX_DLL const Op & round_op()
Round to nearest integer, ties to even. Argument: x.
TVM_TIRX_DLL const Op & nextafter_op()
Next representable value from x toward y. Arguments: x, y.
TVM_TIRX_DLL const Op & atan2_op()
Inverse tangent of y/x with quadrant selection. Arguments: y, x.
TVM_TIRX_DLL const Op & cos_op()
Cosine. Argument: x.
TVM_TIRX_DLL PrimExpr max_value(PrimType dtype, Location loc=UnknownLoc())
TVM_TIRX_DLL const Op & asinh_op()
Inverse hyperbolic sine. Argument: x.
TVM_TIRX_DLL const Op & exp2_op()
Base-two exponential. Argument: x.
TVM_TIRX_DLL const Op & tanh_op()
Hyperbolic tangent. Argument: x.
TVM_TIRX_DLL const Op & sin_op()
Sine. Argument: x.
bool IsOne(const PrimExpr &x)
Check whether x is a constant integer 1.
Definition op.h:792
TVM_TIRX_DLL PrimExpr fmod(PrimExpr x, PrimExpr y, Location loc=UnknownLoc())
Floating-point remainder of x divided by y.
TVM_TIRX_DLL const Op & exp_op()
Natural exponential. Argument: x.
TVM_TIRX_DLL const Op & nearbyint_op()
Round to nearest integer, ties to even. Argument: x.
TVM_TIRX_DLL const Op & exp10_op()
Base-ten exponential. Argument: x.
bool IsConstNumber(const PrimExpr &x)
Check whether x is an integer or floating-point constant.
Definition op.h:766
TVM_TIRX_DLL PrimExpr round(PrimExpr x, Location loc=UnknownLoc())
Round x to the nearest integer, ties to even.
TVM_TIRX_DLL PrimExpr infinity(PrimType dtype, Location loc=UnknownLoc())
TVM_TIRX_DLL const Op & trunc_op()
Round toward zero. Argument: x.
TVM_TIRX_DLL const Op & log1p_op()
Natural logarithm of one plus x. Argument: x.
bool IsZero(const PrimExpr &x)
Check whether x is a constant integer 0.
Definition op.h:794
TVM_TIRX_DLL const Op & sinh_op()
Hyperbolic sine. Argument: x.
TVM_TIRX_DLL const Op & likely_op()
Marks a condition is likely going to happen.
TVM_TIRX_DLL PrimExpr abs(PrimExpr x, Location loc=UnknownLoc())
Calculate absolute value of x.
TVM_TIRX_DLL const Op & fabs_op()
Absolute value. Argument: x.
TVM_TIRX_DLL const Op & vscale_op()
Get the target's vscale value. It will be lowered to llvm.vscale intrinsic (https://llvm....
bool IsConstInt(const PrimExpr &x, int64_t value)
Check whether x is a constant integer expression.
Definition op.h:787
TVM_TIRX_DLL const Op & acosh_op()
Inverse hyperbolic cosine. Argument: x.
PrimExpr MakeConst(PrimType dtype, ValueType value, Location loc=UnknownLoc())
Make a const value with certain data type.
Definition op.h:553
TVM_TIRX_DLL const Op & sigmoid_op()
Logistic sigmoid. Argument: x.
TVM_TIRX_DLL const Op & popcount_op()
Count set bits. Argument: x.
bool IsNegativeConst(const PrimExpr &a)
Check whether a is a negative integer constant.
Definition op.h:782
TVM_TIRX_DLL const Op & asin_op()
Inverse sine. Argument: x.
TVM_TIRX_DLL PrimExpr cast(PrimType t, PrimExpr value, Location loc=UnknownLoc())
cast value to type.
PrimExpr fma(PrimExpr x, PrimExpr y, PrimExpr z, Location loc=UnknownLoc())
Fused multiply-add of x, y and z, in that order.
Definition op.h:966
TVM_TIRX_DLL const Op & hypot_op()
Euclidean length of x and y. Arguments: x, y.
TVM_TIRX_DLL const Op & if_then_else_op()
Same as select, used for unsafe memory access.
TVM_TIRX_DLL const Op & erf_op()
Error function. Argument: x.
TVM_TIRX_DLL PrimExpr clz(PrimExpr x, Location loc=UnknownLoc())
Count leading zero bits, preserving the input primitive type.
TVM_TIRX_DLL const Op & rsqrt_op()
Reciprocal square root. Argument: x.
TVM_TIRX_DLL PrimExpr pow(PrimExpr x, PrimExpr y, Location loc=UnknownLoc())
Calculate power(x, y)
TVM_TIRX_DLL const Op & floor_op()
Round toward negative infinity. Argument: x.
TVM_TIRX_DLL const Op & copysign_op()
Magnitude of x with the sign of y. Arguments: x, y.
TVM_TIRX_DLL const Op & fmod_op()
Floating-point remainder. Arguments: x, y.
bool IsPositiveConst(const PrimExpr &a)
Check whether a is a positive integer constant.
Definition op.h:777
TVM_TIRX_DLL const Op & atanh_op()
Inverse hyperbolic tangent. Argument: x.
TVM_TIRX_DLL const Op & log2_op()
Base-two logarithm.
An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
Definition attr.h:23
TVM_TIRX_DLL PrimExpr log2(PrimExpr x, Location loc=UnknownLoc())
Construct a base-two logarithm with the input's primitive type.
TVM_TIRX_DLL PrimExpr bitwise_and(PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
take bitwise and of two values
TVM_TIRX_DLL PrimExpr logical_and(PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
and
TVM_TIRX_DLL PrimExpr mul(PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
multiplication operator
TVM_TIRX_DLL PrimExpr max(PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
take maximum of two values
TVM_TIRX_DLL PrimExpr bitwise_neg(PrimExpr a, Location loc=UnknownLoc())
take bitwise negation of two values
void DivAmbiguityError(const TA &a)
Helper function to raise a compiler error about division ambiguity.
Definition op.h:674
TVM_TIRX_DLL PrimExpr not_equal(PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
not_equal
TVM_TIRX_DLL PrimExpr if_then_else(PrimExpr cond, PrimExpr true_value, PrimExpr false_value, Location loc=UnknownLoc())
Conditional expression.
TVM_TIRX_DLL PrimExpr min(PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
take minimum of two values
TVM_TIRX_DLL PrimExpr greater_equal(PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
greater_equal
TVM_TIRX_DLL PrimExpr truncdiv(PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
compute trunc(a / b)
TVM_TIRX_DLL PrimExpr left_shift(PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
left shift operator
TVM_TIRX_DLL PrimExpr less_equal(PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
less_equal
PrimExpr operator/=(const PrimExpr &a, const TB &b)
Definition op.h:696
TVM_TIRX_DLL PrimExpr neg(PrimExpr a, Location loc=UnknownLoc())
negation.
TVM_TIRX_DLL PrimExpr indexdiv(PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
compute floor(a / b) where a and b are non-negative.
TVM_TIRX_DLL PrimExpr greater(PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
greater
TVM_TIRX_DLL PrimExpr div(PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
compute division in C semantics.
TVM_TIRX_DLL PrimExpr right_shift(PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
right shift operator
TVM_TIRX_DLL PrimExpr equal(PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
equal
TVM_TIRX_DLL PrimExpr logical_or(PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
or
TVM_TIRX_DLL PrimExpr operator/(PrimExpr a, PrimExpr b)
division operator
TVM_TIRX_DLL PrimExpr floormod(PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
compute the remainder of floordiv
TVM_TIRX_DLL PrimExpr truncmod(PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
compute the remainder of truncdiv
TVM_TIRX_DLL PrimExpr logical_not(PrimExpr a, Location loc=UnknownLoc())
not
TVM_TIRX_DLL PrimExpr likely(PrimExpr cond, Location loc=UnknownLoc())
Mark condition as likely.
TVM_TIRX_DLL PrimExpr floordiv(PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
compute floor(a / b)
TVM_TIRX_DLL PrimExpr add(PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
add operator
TVM_TIRX_DLL PrimExpr sub(PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
subtraction operator
TVM_TIRX_DLL PrimExpr less(PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
less
PrimExpr operator%(const PrimExpr &a, const TB &b)
Definition op.h:702
TVM_TIRX_DLL PrimExpr shapediv(PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
compute ceil(a / b) where a and b are non-negative.
TVM_TIRX_DLL PrimExpr ceildiv(PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
compute ceil(a / b)
TVM_TIRX_DLL PrimExpr bitwise_xor(PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
take bitwise xor of two values
TVM_TIRX_DLL PrimExpr bitwise_or(PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
take bitwise or of two values
TVM_TIRX_DLL PrimExpr ceil(PrimExpr x, Location loc=UnknownLoc())
Round up to the nearest integral value, preserving the input type.
TVM_TIRX_DLL PrimExpr indexmod(PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
compute the remainder floor(a / b) where a and b are non-negative.
#define TVM_TIRX_DLL
Definition base.h:83