tvm
Namespaces | Macros | Functions
einsum.h File Reference

Einstein summation op. More...

#include <tvm/te/operation.h>
#include <tvm/tir/data_layout.h>
#include <tvm/topi/detail/constant_utils.h>
#include <tvm/topi/detail/ravel_unravel.h>
#include <tvm/topi/detail/tensor_utils.h>
#include <tvm/topi/tags.h>
#include <algorithm>
#include <bitset>
#include <iterator>
#include <string>
#include <tuple>
#include <unordered_set>
#include <vector>
Include dependency graph for einsum.h:

Go to the source code of this file.

Namespaces

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

Macros

#define LABELRANGE   128
 
#define NPY_MAXDIMS   16
 
#define NPY_MAXARGS   16
 

Functions

Array< PrimExpr > tvm::topi::GetStride (const Array< PrimExpr > shape)
 Compute the stride of the given shape. More...
 
Array< PrimExpr > tvm::topi::Pad (const Array< PrimExpr > shape, int odim)
 Pad the shape with 1. More...
 
int tvm::topi::ParseOperandSubscripts (const char *subscripts, int length, int ndim, int iop, char *op_labels, char *label_counts, int *min_label, int *max_label)
 Parse the subscripts for one operand into an output of 'ndim' labels. More...
 
int tvm::topi::ParseOutputSubscripts (const char *subscripts, int length, int ndim_broadcast, const char *label_counts, char *out_labels)
 Parse the subscripts for the output into an output that includes 'ndim_broadcast' unlabeled dimensions. More...
 
void tvm::topi::GetCombinedDimsView (const Tensor &op, int iop, char *labels, Array< PrimExpr > *newshape, Array< PrimExpr > *newstride)
 If any dimensions are combined, create a view that combines them. Shows in newshape and newstride. More...
 
int tvm::topi::CountSubstring (const std::string &str, const std::string &sub)
 Count SubString. More...
 
std::bitset< 128 > tvm::topi::Str2Set (const std::string &str)
 Transfer string to. More...
 
std::vector< std::string > tvm::topi::Split (const std::string &str, const std::string &sub)
 Split str according to substring. More...
 
std::tuple< std::string, std::string > tvm::topi::ParseEinsumInput (std::string subscripts, const std::vector< Array< PrimExpr >> &operands)
 Parse the input subscripts into a vector of strings. More...
 
Array< PrimExpr > tvm::topi::NumpyEinsumShape (const std::string subscripts, const std::vector< Array< PrimExpr >> &operands)
 Compute the shape of the output. More...
 
Tensor tvm::topi::einsum (const std::string &subscripts_str, const Array< Tensor > inputs, std::string name="T_einsum", std::string tag=kEinsum)
 Evaluates the Einstein summation convention on the operands. More...
 

Detailed Description

Einstein summation op.

Macro Definition Documentation

◆ LABELRANGE

#define LABELRANGE   128

◆ NPY_MAXARGS

#define NPY_MAXARGS   16

◆ NPY_MAXDIMS

#define NPY_MAXDIMS   16