tvm
Classes | Namespaces | Macros | Functions
tensor.h File Reference

Dataflow tensor object. More...

#include <tvm/arith/bound.h>
#include <tvm/tir/expr.h>
#include <tvm/tir/op.h>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>
Include dependency graph for tensor.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  tvm::te::Operation
 Operation that produces tensors. More...
 
class  tvm::te::TensorNode
 Node to represent a tensor. More...
 
class  tvm::te::Tensor
 Tensor structure representing a possible input, or intermediate computation result. More...
 
class  tvm::te::Tensor::Slice
 data structure to represent a slice that fixes first k coordinates. This is used to enable syntax sugar of Tensor[x][y][z] to get the element. More...
 

Namespaces

 tvm
 runtime implementation for LibTorch/TorchScript.
 
 tvm::te
 Tensor expression language DSL.
 

Macros

#define DEFINE_OVERLOAD_SLICE_UNARY_OP(Op)    inline PrimExpr operator Op(const Tensor::Slice& a) { return Op a.operator PrimExpr(); }
 
#define DEFINE_OVERLOAD_SLICE_BINARY_OP(Op)
 

Functions

PrimExpr tvm::te::operator! (const Tensor::Slice &a)
 
PrimExpr tvm::te::operator- (const Tensor::Slice &a)
 
template<typename T >
PrimExpr tvm::te::operator+ (const Tensor::Slice &a, const T &b)
 
template<typename T >
PrimExpr tvm::te::operator+ (const T &a, const Tensor::Slice &b)
 
PrimExpr tvm::te::operator+ (const Tensor::Slice &a, const Tensor::Slice &b)
 
template<typename T >
PrimExpr tvm::te::operator- (const Tensor::Slice &a, const T &b)
 
template<typename T >
PrimExpr tvm::te::operator- (const T &a, const Tensor::Slice &b)
 
PrimExpr tvm::te::operator- (const Tensor::Slice &a, const Tensor::Slice &b)
 
template<typename T >
PrimExpr tvm::te::operator* (const Tensor::Slice &a, const T &b)
 
template<typename T >
PrimExpr tvm::te::operator* (const T &a, const Tensor::Slice &b)
 
PrimExpr tvm::te::operator* (const Tensor::Slice &a, const Tensor::Slice &b)
 
template<typename T >
PrimExpr tvm::te::operator== (const Tensor::Slice &a, const T &b)
 
template<typename T >
PrimExpr tvm::te::operator== (const T &a, const Tensor::Slice &b)
 
PrimExpr tvm::te::operator== (const Tensor::Slice &a, const Tensor::Slice &b)
 
template<typename T >
PrimExpr tvm::te::operator<= (const Tensor::Slice &a, const T &b)
 
template<typename T >
PrimExpr tvm::te::operator<= (const T &a, const Tensor::Slice &b)
 
PrimExpr tvm::te::operator<= (const Tensor::Slice &a, const Tensor::Slice &b)
 
template<typename T >
PrimExpr tvm::te::operator>= (const Tensor::Slice &a, const T &b)
 
template<typename T >
PrimExpr tvm::te::operator>= (const T &a, const Tensor::Slice &b)
 
PrimExpr tvm::te::operator>= (const Tensor::Slice &a, const Tensor::Slice &b)
 
template<typename T >
PrimExpr tvm::te::operator!= (const Tensor::Slice &a, const T &b)
 
template<typename T >
PrimExpr tvm::te::operator!= (const T &a, const Tensor::Slice &b)
 
PrimExpr tvm::te::operator!= (const Tensor::Slice &a, const Tensor::Slice &b)
 
template<typename T >
PrimExpr tvm::te::operator&& (const Tensor::Slice &a, const T &b)
 
template<typename T >
PrimExpr tvm::te::operator&& (const T &a, const Tensor::Slice &b)
 
PrimExpr tvm::te::operator&& (const Tensor::Slice &a, const Tensor::Slice &b)
 
template<typename T >
PrimExpr tvm::te::operator|| (const Tensor::Slice &a, const T &b)
 
template<typename T >
PrimExpr tvm::te::operator|| (const T &a, const Tensor::Slice &b)
 
PrimExpr tvm::te::operator|| (const Tensor::Slice &a, const Tensor::Slice &b)
 
template<typename T >
PrimExpr tvm::te::operator>> (const Tensor::Slice &a, const T &b)
 
template<typename T >
PrimExpr tvm::te::operator>> (const T &a, const Tensor::Slice &b)
 
PrimExpr tvm::te::operator>> (const Tensor::Slice &a, const Tensor::Slice &b)
 
template<typename T >
PrimExpr tvm::te::operator<< (const Tensor::Slice &a, const T &b)
 
template<typename T >
PrimExpr tvm::te::operator<< (const T &a, const Tensor::Slice &b)
 
PrimExpr tvm::te::operator<< (const Tensor::Slice &a, const Tensor::Slice &b)
 
template<typename T >
PrimExpr tvm::te::operator> (const Tensor::Slice &a, const T &b)
 
template<typename T >
PrimExpr tvm::te::operator> (const T &a, const Tensor::Slice &b)
 
PrimExpr tvm::te::operator> (const Tensor::Slice &a, const Tensor::Slice &b)
 
template<typename T >
PrimExpr tvm::te::operator< (const Tensor::Slice &a, const T &b)
 
template<typename T >
PrimExpr tvm::te::operator< (const T &a, const Tensor::Slice &b)
 
PrimExpr tvm::te::operator< (const Tensor::Slice &a, const Tensor::Slice &b)
 

Detailed Description

Dataflow tensor object.

Macro Definition Documentation

◆ DEFINE_OVERLOAD_SLICE_BINARY_OP

#define DEFINE_OVERLOAD_SLICE_BINARY_OP (   Op)
Value:
template <typename T> \
inline PrimExpr operator Op(const Tensor::Slice& a, const T& b) { \
return a.operator PrimExpr() Op b; \
} \
template <typename T> \
inline PrimExpr operator Op(const T& a, const Tensor::Slice& b) { \
return a Op b.operator PrimExpr(); \
} \
inline PrimExpr operator Op(const Tensor::Slice& a, const Tensor::Slice& b) { \
return a.operator PrimExpr() Op b.operator PrimExpr(); \
}
tvm::Op Op
Definition: op.h:34

◆ DEFINE_OVERLOAD_SLICE_UNARY_OP

#define DEFINE_OVERLOAD_SLICE_UNARY_OP (   Op)     inline PrimExpr operator Op(const Tensor::Slice& a) { return Op a.operator PrimExpr(); }