24 #ifndef TVM_TOPI_NN_DILATE_H_ 25 #define TVM_TOPI_NN_DILATE_H_ 48 ICHECK_GT(args.
size(), 0) <<
"all requires at least one argument";
51 for (
size_t i = 1; i < args.
size(); ++i) {
71 std::string name =
"tensor", std::string tag =
kInjective) {
72 auto n = x->shape.size();
73 ICHECK_EQ(n, strides.
size()) <<
"strides size (" << strides.
size()
74 <<
") must match dimension of x (" << n <<
")";
78 for (
size_t i = 0; i < n; ++i) {
88 for (
size_t i = 0; i < n; ++i) {
89 if (IsConstInt(strides[i]) && GetConstInt(strides[i]) == 1) {
96 if (not_zero.
size() > 0) {
97 auto all_not_zero =
all(not_zero);
101 return x(index_tuple);
109 #endif // TVM_TOPI_NN_DILATE_H_ PrimExpr indexmod(PrimExpr a, PrimExpr b, Span span=Span())
compute the remainder floor(a / b) where a and b are non-negative.
PrimExpr make_const(DataType t, ValueType value, Span span=Span())
Make a const value with certain data type.
Definition: op.h:954
runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36
Tensor expression language DSL.
Definition: extracted_task.h:33
PrimExpr if_then_else(PrimExpr cond, PrimExpr true_value, PrimExpr false_value, Span span=Span())
Conditional expression.
Algebra expression simplifications.
constexpr auto kInjective
Definition: tags.h:33
PrimExpr Simplify(const PrimExpr &expr, int steps=2)
Simplify expr.
void push_back(const T &item)
push a new item to the back of the list
Definition: array.h:457
size_t size() const
Definition: array.h:420
Array, container representing a contiguous sequence of ObjectRefs.
Definition: array.h:289
PrimExpr indexdiv(PrimExpr a, PrimExpr b, Span span=Span())
compute floor(a / b) where a and b are non-negative.
Tensor structure representing a possible input, or intermediate computation result.
Definition: tensor.h:102
Operation node can generate one or multiple Tensors.
PrimExpr ret(PrimExpr value, Span span=Span())
Return the value.
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...
Tensor cast(const Tensor &x, DataType type, std::string name="T_cast", std::string tag=kElementWise)
Cast each element of x to the given type. If expr is scalar and type is a corresponding vector type...
Definition: elemwise.h:281
Reference to PrimExprNode.
Definition: expr.h:114
Tensor dilate(const Tensor &x, Array< PrimExpr > strides, double dilation_value, std::string name="tensor", std::string tag=kInjective)
Dilate data with given dilation value (0 by default).
Definition: dilate.h:70
Analyzer that contains bunch of sub-analyzers.
Definition: analyzer.h:579
PrimExpr all(Array< PrimExpr > args)
Create a new expression of the logical and of all conditions in the arguments.
Definition: dilate.h:47
static DataType Int(int bits, int lanes=1)
Construct an int type.
Definition: data_type.h:164