24 #ifndef TVM_TOPI_EINSUM_H_ 25 #define TVM_TOPI_EINSUM_H_ 27 #define LABELRANGE 128 28 #define NPY_MAXDIMS 16 29 #define NPY_MAXARGS 16 43 #include <unordered_set> 50 using namespace topi::detail;
60 const std::vector<Array<PrimExpr>>& operands);
73 Tensor einsum(
const std::string& subscripts_str,
const Array<Tensor> inputs,
74 std::string name =
"T_einsum", std::string tag =
kEinsum);
87 static constexpr
Label kEllipsis =
'\0';
96 #endif // TVM_TOPI_EINSUM_H_ constexpr auto kEinsum
Definition: tags.h:44
std::vector< Label > Subscript
Definition: einsum.h:84
Tensor 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.
runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36
Tensor expression language DSL.
Definition: extracted_task.h:33
Utility functions for handling constants in TVM expressions.
char Label
Definition: einsum.h:83
Utility functions for handling tensor.
Array< PrimExpr > InferEinsumShape(const std::string &subscripts, const std::vector< Array< PrimExpr >> &operands)
Compute the shape of the output.
Tensor structure representing a possible input, or intermediate computation result.
Definition: tensor.h:102
Operation node can generate one or multiple Tensors.
std::vector< Subscript > inputs
Definition: einsum.h:89
Subscript output
Definition: einsum.h:91
Layout expression to describe the data organization of a tensor. And BijectiveLayout to mapping two d...
Index ravel and unraval operations.