24#ifndef TVM_TOPI_EINSUM_H_
25#define TVM_TOPI_EINSUM_H_
42#include <unordered_set>
49using namespace topi::detail;
59 const std::vector<ffi::Array<PrimExpr>>& operands);
73 std::string name =
"T_einsum", std::string tag =
kEinsum);
RAII wrapper function to enter and exit a context object similar to python's with syntax.
Definition with_context.h:59
Managed Tensor. The array is backed by reference counted blocks.
Definition tensor.h:49
Utility functions for handling constants in TVM expressions.
Tensor expression language DSL.
Definition extracted_task.h:33
Tensor einsum(const std::string &subscripts_str, const ffi::Array< Tensor > inputs, std::string name="T_einsum", std::string tag=kEinsum)
Evaluates the Einstein summation convention on the operands.
constexpr auto kEinsum
Definition tags.h:44
ffi::Array< PrimExpr > InferEinsumShape(const std::string &subscripts, const std::vector< ffi::Array< PrimExpr > > &operands)
Compute the shape of the output.
An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
Definition analyzer.h:40
Operation node can generate one or multiple Tensors.
Index ravel and unraval operations.
static EinsumEquation FromString(const std::string &equation)
Create EinsumEquation from a string. The result will be converted to the explicit mode of Einsum if i...
char Label
Definition einsum.h:82
std::vector< Label > Subscript
Definition einsum.h:83
static constexpr Label kEllipsis
Definition einsum.h:86
std::vector< Subscript > inputs
Definition einsum.h:88
Subscript output
Definition einsum.h:90
Utility functions for handling tensor.