tvm
Namespaces | Macros | Functions
broadcast.h File Reference

Broadcast op constructions. More...

#include <tvm/topi/detail/broadcast.h>
#include <tvm/topi/detail/constant_utils.h>
#include <tvm/topi/tags.h>
#include <algorithm>
#include <string>
Include dependency graph for broadcast.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 tvm
 runtime implementation for LibTorch/TorchScript.
 
 tvm::topi
 

Macros

#define TOPI_DEFINE_BCAST_OP(Name, ComputeRule)
 
#define TOPI_DEFINE_OP_OVERLOAD(Name, OpName)
 

Functions

tvm::te::Tensor tvm::topi::broadcast_to (const tvm::te::Tensor &t, const tvm::Array< tvm::PrimExpr > &output_shape, std::string name="T_broadcast_to", std::string tag=kBroadcast)
 Creates an operation that broadcasts a tensor into a compatible shape according to numpy's rules. More...
 
tvm::PrimExpr tvm::topi::logical_and (const tvm::PrimExpr &a, const tvm::PrimExpr &b)
 
tvm::te::Tensor tvm::topi::logical_and (const tvm::te::Tensor &A, const tvm::te::Tensor &B, std::string name="T_" "logical_and", std::string tag=kBroadcast)
 
tvm::te::Tensor tvm::topi::logical_and (const tvm::te::Tensor &A, const tvm::PrimExpr &B, std::string name="T_" "logical_and", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::logical_and (const tvm::PrimExpr &A, const tvm::te::Tensor &B, std::string name="T_" "logical_and", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::operator&& (const tvm::te::Tensor &A, const tvm::te::Tensor &B)
 
tvm::te::Tensor tvm::topi::operator&& (const tvm::PrimExpr &A, const tvm::te::Tensor &B)
 
tvm::te::Tensor tvm::topi::operator&& (const tvm::te::Tensor &A, const tvm::PrimExpr &B)
 
tvm::PrimExpr tvm::topi::logical_or (const tvm::PrimExpr &a, const tvm::PrimExpr &b)
 
tvm::te::Tensor tvm::topi::logical_or (const tvm::te::Tensor &A, const tvm::te::Tensor &B, std::string name="T_" "logical_or", std::string tag=kBroadcast)
 
tvm::te::Tensor tvm::topi::logical_or (const tvm::te::Tensor &A, const tvm::PrimExpr &B, std::string name="T_" "logical_or", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::logical_or (const tvm::PrimExpr &A, const tvm::te::Tensor &B, std::string name="T_" "logical_or", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::operator|| (const tvm::te::Tensor &A, const tvm::te::Tensor &B)
 
tvm::te::Tensor tvm::topi::operator|| (const tvm::PrimExpr &A, const tvm::te::Tensor &B)
 
tvm::te::Tensor tvm::topi::operator|| (const tvm::te::Tensor &A, const tvm::PrimExpr &B)
 
tvm::PrimExpr tvm::topi::logical_xor (const tvm::PrimExpr &a, const tvm::PrimExpr &b)
 
tvm::te::Tensor tvm::topi::logical_xor (const tvm::te::Tensor &A, const tvm::te::Tensor &B, std::string name="T_" "logical_xor", std::string tag=kBroadcast)
 
tvm::te::Tensor tvm::topi::logical_xor (const tvm::te::Tensor &A, const tvm::PrimExpr &B, std::string name="T_" "logical_xor", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::logical_xor (const tvm::PrimExpr &A, const tvm::te::Tensor &B, std::string name="T_" "logical_xor", std::string tag=kElementWise)
 
tvm::PrimExpr tvm::topi::bitwise_and (const tvm::PrimExpr &a, const tvm::PrimExpr &b)
 
tvm::te::Tensor tvm::topi::bitwise_and (const tvm::te::Tensor &A, const tvm::te::Tensor &B, std::string name="T_" "bitwise_and", std::string tag=kBroadcast)
 
tvm::te::Tensor tvm::topi::bitwise_and (const tvm::te::Tensor &A, const tvm::PrimExpr &B, std::string name="T_" "bitwise_and", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::bitwise_and (const tvm::PrimExpr &A, const tvm::te::Tensor &B, std::string name="T_" "bitwise_and", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::operator& (const tvm::te::Tensor &A, const tvm::te::Tensor &B)
 
tvm::te::Tensor tvm::topi::operator& (const tvm::PrimExpr &A, const tvm::te::Tensor &B)
 
tvm::te::Tensor tvm::topi::operator& (const tvm::te::Tensor &A, const tvm::PrimExpr &B)
 
tvm::PrimExpr tvm::topi::bitwise_or (const tvm::PrimExpr &a, const tvm::PrimExpr &b)
 
tvm::te::Tensor tvm::topi::bitwise_or (const tvm::te::Tensor &A, const tvm::te::Tensor &B, std::string name="T_" "bitwise_or", std::string tag=kBroadcast)
 
tvm::te::Tensor tvm::topi::bitwise_or (const tvm::te::Tensor &A, const tvm::PrimExpr &B, std::string name="T_" "bitwise_or", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::bitwise_or (const tvm::PrimExpr &A, const tvm::te::Tensor &B, std::string name="T_" "bitwise_or", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::operator| (const tvm::te::Tensor &A, const tvm::te::Tensor &B)
 
tvm::te::Tensor tvm::topi::operator| (const tvm::PrimExpr &A, const tvm::te::Tensor &B)
 
tvm::te::Tensor tvm::topi::operator| (const tvm::te::Tensor &A, const tvm::PrimExpr &B)
 
tvm::PrimExpr tvm::topi::bitwise_xor (const tvm::PrimExpr &a, const tvm::PrimExpr &b)
 
tvm::te::Tensor tvm::topi::bitwise_xor (const tvm::te::Tensor &A, const tvm::te::Tensor &B, std::string name="T_" "bitwise_xor", std::string tag=kBroadcast)
 
tvm::te::Tensor tvm::topi::bitwise_xor (const tvm::te::Tensor &A, const tvm::PrimExpr &B, std::string name="T_" "bitwise_xor", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::bitwise_xor (const tvm::PrimExpr &A, const tvm::te::Tensor &B, std::string name="T_" "bitwise_xor", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::operator^ (const tvm::te::Tensor &A, const tvm::te::Tensor &B)
 
tvm::te::Tensor tvm::topi::operator^ (const tvm::PrimExpr &A, const tvm::te::Tensor &B)
 
tvm::te::Tensor tvm::topi::operator^ (const tvm::te::Tensor &A, const tvm::PrimExpr &B)
 
tvm::PrimExpr tvm::topi::add (const tvm::PrimExpr &a, const tvm::PrimExpr &b)
 
tvm::te::Tensor tvm::topi::add (const tvm::te::Tensor &A, const tvm::te::Tensor &B, std::string name="T_" "add", std::string tag=kBroadcast)
 
tvm::te::Tensor tvm::topi::add (const tvm::te::Tensor &A, const tvm::PrimExpr &B, std::string name="T_" "add", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::add (const tvm::PrimExpr &A, const tvm::te::Tensor &B, std::string name="T_" "add", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::operator+ (const tvm::te::Tensor &A, const tvm::te::Tensor &B)
 
tvm::te::Tensor tvm::topi::operator+ (const tvm::PrimExpr &A, const tvm::te::Tensor &B)
 
tvm::te::Tensor tvm::topi::operator+ (const tvm::te::Tensor &A, const tvm::PrimExpr &B)
 
tvm::PrimExpr tvm::topi::subtract (const tvm::PrimExpr &a, const tvm::PrimExpr &b)
 
tvm::te::Tensor tvm::topi::subtract (const tvm::te::Tensor &A, const tvm::te::Tensor &B, std::string name="T_" "subtract", std::string tag=kBroadcast)
 
tvm::te::Tensor tvm::topi::subtract (const tvm::te::Tensor &A, const tvm::PrimExpr &B, std::string name="T_" "subtract", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::subtract (const tvm::PrimExpr &A, const tvm::te::Tensor &B, std::string name="T_" "subtract", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::operator- (const tvm::te::Tensor &A, const tvm::te::Tensor &B)
 
tvm::te::Tensor tvm::topi::operator- (const tvm::PrimExpr &A, const tvm::te::Tensor &B)
 
tvm::te::Tensor tvm::topi::operator- (const tvm::te::Tensor &A, const tvm::PrimExpr &B)
 
tvm::PrimExpr tvm::topi::multiply (const tvm::PrimExpr &a, const tvm::PrimExpr &b)
 
tvm::te::Tensor tvm::topi::multiply (const tvm::te::Tensor &A, const tvm::te::Tensor &B, std::string name="T_" "multiply", std::string tag=kBroadcast)
 
tvm::te::Tensor tvm::topi::multiply (const tvm::te::Tensor &A, const tvm::PrimExpr &B, std::string name="T_" "multiply", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::multiply (const tvm::PrimExpr &A, const tvm::te::Tensor &B, std::string name="T_" "multiply", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::operator* (const tvm::te::Tensor &A, const tvm::te::Tensor &B)
 
tvm::te::Tensor tvm::topi::operator* (const tvm::PrimExpr &A, const tvm::te::Tensor &B)
 
tvm::te::Tensor tvm::topi::operator* (const tvm::te::Tensor &A, const tvm::PrimExpr &B)
 
tvm::PrimExpr tvm::topi::divide (const tvm::PrimExpr &a, const tvm::PrimExpr &b)
 
tvm::te::Tensor tvm::topi::divide (const tvm::te::Tensor &A, const tvm::te::Tensor &B, std::string name="T_" "divide", std::string tag=kBroadcast)
 
tvm::te::Tensor tvm::topi::divide (const tvm::te::Tensor &A, const tvm::PrimExpr &B, std::string name="T_" "divide", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::divide (const tvm::PrimExpr &A, const tvm::te::Tensor &B, std::string name="T_" "divide", std::string tag=kElementWise)
 
tvm::PrimExpr tvm::topi::floor_divide (const tvm::PrimExpr &a, const tvm::PrimExpr &b)
 
tvm::te::Tensor tvm::topi::floor_divide (const tvm::te::Tensor &A, const tvm::te::Tensor &B, std::string name="T_" "floor_divide", std::string tag=kBroadcast)
 
tvm::te::Tensor tvm::topi::floor_divide (const tvm::te::Tensor &A, const tvm::PrimExpr &B, std::string name="T_" "floor_divide", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::floor_divide (const tvm::PrimExpr &A, const tvm::te::Tensor &B, std::string name="T_" "floor_divide", std::string tag=kElementWise)
 
tvm::PrimExpr tvm::topi::trunc_divide (const tvm::PrimExpr &a, const tvm::PrimExpr &b)
 
tvm::te::Tensor tvm::topi::trunc_divide (const tvm::te::Tensor &A, const tvm::te::Tensor &B, std::string name="T_" "trunc_divide", std::string tag=kBroadcast)
 
tvm::te::Tensor tvm::topi::trunc_divide (const tvm::te::Tensor &A, const tvm::PrimExpr &B, std::string name="T_" "trunc_divide", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::trunc_divide (const tvm::PrimExpr &A, const tvm::te::Tensor &B, std::string name="T_" "trunc_divide", std::string tag=kElementWise)
 
tvm::PrimExpr tvm::topi::mod (const tvm::PrimExpr &a, const tvm::PrimExpr &b)
 
tvm::te::Tensor tvm::topi::mod (const tvm::te::Tensor &A, const tvm::te::Tensor &B, std::string name="T_" "mod", std::string tag=kBroadcast)
 
tvm::te::Tensor tvm::topi::mod (const tvm::te::Tensor &A, const tvm::PrimExpr &B, std::string name="T_" "mod", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::mod (const tvm::PrimExpr &A, const tvm::te::Tensor &B, std::string name="T_" "mod", std::string tag=kElementWise)
 
tvm::PrimExpr tvm::topi::floor_mod (const tvm::PrimExpr &a, const tvm::PrimExpr &b)
 
tvm::te::Tensor tvm::topi::floor_mod (const tvm::te::Tensor &A, const tvm::te::Tensor &B, std::string name="T_" "floor_mod", std::string tag=kBroadcast)
 
tvm::te::Tensor tvm::topi::floor_mod (const tvm::te::Tensor &A, const tvm::PrimExpr &B, std::string name="T_" "floor_mod", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::floor_mod (const tvm::PrimExpr &A, const tvm::te::Tensor &B, std::string name="T_" "floor_mod", std::string tag=kElementWise)
 
tvm::PrimExpr tvm::topi::trunc_mod (const tvm::PrimExpr &a, const tvm::PrimExpr &b)
 
tvm::te::Tensor tvm::topi::trunc_mod (const tvm::te::Tensor &A, const tvm::te::Tensor &B, std::string name="T_" "trunc_mod", std::string tag=kBroadcast)
 
tvm::te::Tensor tvm::topi::trunc_mod (const tvm::te::Tensor &A, const tvm::PrimExpr &B, std::string name="T_" "trunc_mod", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::trunc_mod (const tvm::PrimExpr &A, const tvm::te::Tensor &B, std::string name="T_" "trunc_mod", std::string tag=kElementWise)
 
tvm::PrimExpr tvm::topi::maximum (const tvm::PrimExpr &a, const tvm::PrimExpr &b)
 
tvm::te::Tensor tvm::topi::maximum (const tvm::te::Tensor &A, const tvm::te::Tensor &B, std::string name="T_" "maximum", std::string tag=kBroadcast)
 
tvm::te::Tensor tvm::topi::maximum (const tvm::te::Tensor &A, const tvm::PrimExpr &B, std::string name="T_" "maximum", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::maximum (const tvm::PrimExpr &A, const tvm::te::Tensor &B, std::string name="T_" "maximum", std::string tag=kElementWise)
 
tvm::PrimExpr tvm::topi::minimum (const tvm::PrimExpr &a, const tvm::PrimExpr &b)
 
tvm::te::Tensor tvm::topi::minimum (const tvm::te::Tensor &A, const tvm::te::Tensor &B, std::string name="T_" "minimum", std::string tag=kBroadcast)
 
tvm::te::Tensor tvm::topi::minimum (const tvm::te::Tensor &A, const tvm::PrimExpr &B, std::string name="T_" "minimum", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::minimum (const tvm::PrimExpr &A, const tvm::te::Tensor &B, std::string name="T_" "minimum", std::string tag=kElementWise)
 
tvm::PrimExpr tvm::topi::power (const tvm::PrimExpr &a, const tvm::PrimExpr &b)
 
tvm::te::Tensor tvm::topi::power (const tvm::te::Tensor &A, const tvm::te::Tensor &B, std::string name="T_" "power", std::string tag=kBroadcast)
 
tvm::te::Tensor tvm::topi::power (const tvm::te::Tensor &A, const tvm::PrimExpr &B, std::string name="T_" "power", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::power (const tvm::PrimExpr &A, const tvm::te::Tensor &B, std::string name="T_" "power", std::string tag=kElementWise)
 
tvm::PrimExpr tvm::topi::left_shift (const tvm::PrimExpr &a, const tvm::PrimExpr &b)
 
tvm::te::Tensor tvm::topi::left_shift (const tvm::te::Tensor &A, const tvm::te::Tensor &B, std::string name="T_" "left_shift", std::string tag=kBroadcast)
 
tvm::te::Tensor tvm::topi::left_shift (const tvm::te::Tensor &A, const tvm::PrimExpr &B, std::string name="T_" "left_shift", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::left_shift (const tvm::PrimExpr &A, const tvm::te::Tensor &B, std::string name="T_" "left_shift", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::operator<< (const tvm::te::Tensor &A, const tvm::te::Tensor &B)
 
tvm::te::Tensor tvm::topi::operator<< (const tvm::PrimExpr &A, const tvm::te::Tensor &B)
 
tvm::te::Tensor tvm::topi::operator<< (const tvm::te::Tensor &A, const tvm::PrimExpr &B)
 
tvm::PrimExpr tvm::topi::right_shift (const tvm::PrimExpr &a, const tvm::PrimExpr &b)
 
tvm::te::Tensor tvm::topi::right_shift (const tvm::te::Tensor &A, const tvm::te::Tensor &B, std::string name="T_" "right_shift", std::string tag=kBroadcast)
 
tvm::te::Tensor tvm::topi::right_shift (const tvm::te::Tensor &A, const tvm::PrimExpr &B, std::string name="T_" "right_shift", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::right_shift (const tvm::PrimExpr &A, const tvm::te::Tensor &B, std::string name="T_" "right_shift", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::operator>> (const tvm::te::Tensor &A, const tvm::te::Tensor &B)
 
tvm::te::Tensor tvm::topi::operator>> (const tvm::PrimExpr &A, const tvm::te::Tensor &B)
 
tvm::te::Tensor tvm::topi::operator>> (const tvm::te::Tensor &A, const tvm::PrimExpr &B)
 
tvm::PrimExpr tvm::topi::greater (const tvm::PrimExpr &a, const tvm::PrimExpr &b)
 
tvm::te::Tensor tvm::topi::greater (const tvm::te::Tensor &A, const tvm::te::Tensor &B, std::string name="T_" "greater", std::string tag=kBroadcast)
 
tvm::te::Tensor tvm::topi::greater (const tvm::te::Tensor &A, const tvm::PrimExpr &B, std::string name="T_" "greater", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::greater (const tvm::PrimExpr &A, const tvm::te::Tensor &B, std::string name="T_" "greater", std::string tag=kElementWise)
 
tvm::PrimExpr tvm::topi::less (const tvm::PrimExpr &a, const tvm::PrimExpr &b)
 
tvm::te::Tensor tvm::topi::less (const tvm::te::Tensor &A, const tvm::te::Tensor &B, std::string name="T_" "less", std::string tag=kBroadcast)
 
tvm::te::Tensor tvm::topi::less (const tvm::te::Tensor &A, const tvm::PrimExpr &B, std::string name="T_" "less", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::less (const tvm::PrimExpr &A, const tvm::te::Tensor &B, std::string name="T_" "less", std::string tag=kElementWise)
 
tvm::PrimExpr tvm::topi::equal (const tvm::PrimExpr &a, const tvm::PrimExpr &b)
 
tvm::te::Tensor tvm::topi::equal (const tvm::te::Tensor &A, const tvm::te::Tensor &B, std::string name="T_" "equal", std::string tag=kBroadcast)
 
tvm::te::Tensor tvm::topi::equal (const tvm::te::Tensor &A, const tvm::PrimExpr &B, std::string name="T_" "equal", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::equal (const tvm::PrimExpr &A, const tvm::te::Tensor &B, std::string name="T_" "equal", std::string tag=kElementWise)
 
tvm::PrimExpr tvm::topi::not_equal (const tvm::PrimExpr &a, const tvm::PrimExpr &b)
 
tvm::te::Tensor tvm::topi::not_equal (const tvm::te::Tensor &A, const tvm::te::Tensor &B, std::string name="T_" "not_equal", std::string tag=kBroadcast)
 
tvm::te::Tensor tvm::topi::not_equal (const tvm::te::Tensor &A, const tvm::PrimExpr &B, std::string name="T_" "not_equal", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::not_equal (const tvm::PrimExpr &A, const tvm::te::Tensor &B, std::string name="T_" "not_equal", std::string tag=kElementWise)
 
tvm::PrimExpr tvm::topi::greater_equal (const tvm::PrimExpr &a, const tvm::PrimExpr &b)
 
tvm::te::Tensor tvm::topi::greater_equal (const tvm::te::Tensor &A, const tvm::te::Tensor &B, std::string name="T_" "greater_equal", std::string tag=kBroadcast)
 
tvm::te::Tensor tvm::topi::greater_equal (const tvm::te::Tensor &A, const tvm::PrimExpr &B, std::string name="T_" "greater_equal", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::greater_equal (const tvm::PrimExpr &A, const tvm::te::Tensor &B, std::string name="T_" "greater_equal", std::string tag=kElementWise)
 
tvm::PrimExpr tvm::topi::less_equal (const tvm::PrimExpr &a, const tvm::PrimExpr &b)
 
tvm::te::Tensor tvm::topi::less_equal (const tvm::te::Tensor &A, const tvm::te::Tensor &B, std::string name="T_" "less_equal", std::string tag=kBroadcast)
 
tvm::te::Tensor tvm::topi::less_equal (const tvm::te::Tensor &A, const tvm::PrimExpr &B, std::string name="T_" "less_equal", std::string tag=kElementWise)
 
tvm::te::Tensor tvm::topi::less_equal (const tvm::PrimExpr &A, const tvm::te::Tensor &B, std::string name="T_" "less_equal", std::string tag=kElementWise)
 

Detailed Description

Broadcast op constructions.

Macro Definition Documentation

◆ TOPI_DEFINE_BCAST_OP

#define TOPI_DEFINE_BCAST_OP (   Name,
  ComputeRule 
)
Value:
inline tvm::PrimExpr Name(const tvm::PrimExpr& a, const tvm::PrimExpr& b) { ComputeRule; } \
inline tvm::te::Tensor Name(const tvm::te::Tensor& A, const tvm::te::Tensor& B, \
std::string name = "T_" #Name, std::string tag = kBroadcast) { \
auto l = [](tvm::PrimExpr a, tvm::PrimExpr b) { ComputeRule; }; \
return detail::WithBroadcast(l, A, B, name, tag); \
} \
inline tvm::te::Tensor Name(const tvm::te::Tensor& A, const tvm::PrimExpr& B, \
std::string name = "T_" #Name, std::string tag = kElementWise) { \
auto l = [](tvm::PrimExpr a, tvm::PrimExpr b) { ComputeRule; }; \
return tvm::te::compute( \
A->shape, [&](const ::tvm::Array<::tvm::tir::Var>& i) { return l(A(i), B); }, name, tag); \
} \
inline tvm::te::Tensor Name(const tvm::PrimExpr& A, const tvm::te::Tensor& B, \
std::string name = "T_" #Name, std::string tag = kElementWise) { \
auto l = [&](tvm::PrimExpr a, tvm::PrimExpr b) { ComputeRule; }; \
return tvm::te::compute( \
B->shape, [&](const ::tvm::Array<::tvm::tir::Var>& i) { return l(A, B(i)); }, name, tag); \
}
Reference to PrimExprNode.
Definition: expr.h:115
Tensor structure representing a possible input, or intermediate computation result.
Definition: tensor.h:102
@ kBroadcast
Definition: op_attr_types.h:51
Tensor compute(Array< PrimExpr > shape, FCompute fcompute, std::string name="tensor", std::string tag="", Map< String, ObjectRef > attrs={})
Construct a new tensor by computing over shape, using the computation rule: result_tensor[axis] = fco...
constexpr auto kElementWise
Definition: tags.h:32

◆ TOPI_DEFINE_OP_OVERLOAD

#define TOPI_DEFINE_OP_OVERLOAD (   Name,
  OpName 
)
Value:
inline tvm::te::Tensor Name(const tvm::te::Tensor& A, const tvm::te::Tensor& B) { \
return topi::OpName(A, B); \
} \
inline tvm::te::Tensor Name(const tvm::PrimExpr& A, const tvm::te::Tensor& B) { \
return topi::OpName(A, B); \
} \
inline tvm::te::Tensor Name(const tvm::te::Tensor& A, const tvm::PrimExpr& B) { \
return topi::OpName(A, B); \
}