24#ifndef TVM_TOPI_DETAIL_TENSOR_UTILS_H_
25#define TVM_TOPI_DETAIL_TENSOR_UTILS_H_
43inline bool is_empty_shape(
const ffi::Array<PrimExpr>&
x) {
45 for (
const auto& dim :
x) {
66inline PrimExpr bilinear_sample_nchw(
const Tensor&
input,
const ffi::Array<PrimExpr>& indices,
70 auto in_y = indices[2];
71 auto in_x = indices[3];
110inline PrimExpr bilinear_sample_nhwc(
const Tensor&
input,
const ffi::Array<PrimExpr>& indices,
114 auto in_y = indices[1];
115 auto in_x = indices[2];
Constant integer literals in the program.
Definition expr.h:487
Typed reference/view over any Expr whose ExprNode::ty is PrimType.
Definition base_expr.h:401
static PrimType Int(int bits, int lanes=1)
Construct a signed integer type with fixed lanes.
RAII wrapper function to enter and exit a context object similar to python's with syntax.
Definition with_context.h:59
Tensor structure representing a possible input, or intermediate computation result.
Definition tensor.h:98
Tensor expression language DSL.
Definition extracted_task.h:33
An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
Definition analyzer.h:40
PrimExpr if_then_else(PrimExpr cond, PrimExpr true_value, PrimExpr false_value, Span span=Span())
Conditional expression.
PrimExpr cast(PrimType t, PrimExpr value, Span span=Span())
cast value to type.
PrimExpr floor(PrimExpr x, Span span=Span())
Calculate floor(x)
Operation node can generate one or multiple Tensors.