|
tvm
|
Reduction op constructors. More...
#include <tvm/te/operation.h>#include <tvm/topi/broadcast.h>#include <tvm/topi/detail/constant_utils.h>#include <tvm/topi/detail/ravel_unravel.h>#include <tvm/topi/elemwise.h>#include <tvm/topi/tags.h>#include <tvm/topi/transform.h>#include <algorithm>#include <iterator>#include <string>#include <vector>Go to the source code of this file.
Namespaces | |
| tvm | |
| Performance counters for profiling via the PAPI library. | |
| tvm::topi | |
Typedefs | |
| using | tvm::topi::FReduce = std::function< PrimExpr(PrimExpr source, const ffi::Array< IterVar > &axis, ffi::Array< PrimExpr > init, Span span)> |
| The operation to use for CommReduce. More... | |
| using | tvm::topi::FCommReduce = std::function< ffi::Array< PrimExpr >(ffi::Array< PrimExpr > exprs, const ffi::Array< IterVar > &axis, PrimExpr *condition)> |
| The operation to use for CommReduceIdx. More... | |
| using | tvm::topi::FCombine = std::function< ffi::Array< PrimExpr >(ffi::Array< Var > lhs, ffi::Array< Var > rhs)> |
| A combiner function for a reduction. More... | |
| using | tvm::topi::FIdentity = std::function< ffi::Array< PrimExpr >(std::vector< DataType > types)> |
| An initializer function for a reduction. More... | |
Functions | |
| std::vector< int > | tvm::topi::GetRealAxis (int ndim, const ffi::Optional< ffi::Array< Integer >> &axis) |
| Convert a reduction axis which could be empty or have negative elements into a real axis with valid dimension indices. More... | |
| ffi::Array< IterVar > | tvm::topi::MakeReduceAxes (const std::vector< int > &real_axis, const Tensor &data) |
| Enumerate the axes for a reduce op. More... | |
| ffi::Array< PrimExpr > | tvm::topi::MakeReduceTargetShape (const std::vector< int > &real_axis, const Tensor &data, bool keepdims, bool atleast1d) |
| Calculate the target shape for a reduce op. More... | |
| Tensor | tvm::topi::DoCommReduce (const Tensor &data, FReduce func, const ffi::Array< PrimExpr > &target_shape, const std::vector< int > &reduce_axes, const std::vector< int > &squeeze_axes, Span span=Span()) |
| Create a reduction operation. More... | |
| Tensor | tvm::topi::CommReduce (const Tensor &data, const ffi::Optional< ffi::Array< Integer >> &axis, FReduce func, bool keepdims, bool atleast1d) |
| Create a reduction operation. More... | |
| Tensor | tvm::topi::CommReduceIdx (const Tensor &data, const ffi::Optional< ffi::Array< Integer >> &axis, FCommReduce func, bool keepdims, bool atleast1d) |
| Create an index reduction operation. More... | |
| FCommReduce | tvm::topi::MakeCommReducer (FCombine fcombine, FIdentity fidentity, std::string name="reduce") |
| Create a commutative reducer for a reduction. More... | |
| PrimExpr | tvm::topi::MinOp (PrimExpr source, ffi::Array< IterVar > axis, ffi::Array< PrimExpr > init={}, Span span=Span()) |
| Wrap tvm::min to ensure we get the correct overload. More... | |
| PrimExpr | tvm::topi::MaxOp (PrimExpr source, ffi::Array< IterVar > axis, ffi::Array< PrimExpr > init={}, Span span=Span()) |
| Wrap tvm::max to ensure we get the correct overload. More... | |
| PrimExpr | tvm::topi::ProdOp (PrimExpr source, ffi::Array< IterVar > axis, ffi::Array< PrimExpr > init={}, Span span=Span()) |
| Wrap tvm::prod to ensure we get the correct overload. More... | |
| Tensor | tvm::topi::sum (const Tensor &data, const ffi::Optional< ffi::Array< Integer >> &axis, bool keepdims=false, bool atleast1d=false) |
| Creates an operation that sums array elements over a given axis. More... | |
| Tensor | tvm::topi::collapse_sum (const Tensor &data, ffi::Array< PrimExpr > target_shape) |
| Tensor | tvm::topi::all (const Tensor &data, const ffi::Optional< ffi::Array< Integer >> &axis, bool keepdims=false, bool atleast1d=false) |
| Creates an operation that computes the logical AND of elements over a given axis. More... | |
| Tensor | tvm::topi::any (const Tensor &data, const ffi::Optional< ffi::Array< Integer >> &axis, bool keepdims=false, bool atleast1d=false) |
| Creates an operation that computes the logical OR of elements over a given axis. More... | |
| Tensor | tvm::topi::min (const Tensor &data, const ffi::Optional< ffi::Array< Integer >> &axis, bool keepdims=false, bool atleast1d=false) |
| Creates an operation that finds the minimum of elements over a given axis. More... | |
| Tensor | tvm::topi::max (const Tensor &data, const ffi::Optional< ffi::Array< Integer >> &axis, bool keepdims=false, bool atleast1d=false) |
| Creates an operation that finds the maximum of elements over a given axis. More... | |
| FCommReduce | tvm::topi::MakeArgminReducer (bool select_last_index=false) |
| Tensor | tvm::topi::argmin (const Tensor &data, const ffi::Optional< ffi::Array< Integer >> &axis, bool keepdims=false, bool atleast1d=false, bool select_last_index=false) |
| Creates an operation that finds the indices of the minimum values over a given axis. More... | |
| FCommReduce | tvm::topi::MakeArgmaxReducer (bool select_last_index=false) |
| Tensor | tvm::topi::argmax (const Tensor &data, const ffi::Optional< ffi::Array< Integer >> &axis, bool keepdims=false, bool atleast1d=false, bool select_last_index=false) |
| Creates an operation that finds the indices of the maximum values over a given axis. More... | |
| Tensor | tvm::topi::prod (const Tensor &data, const ffi::Optional< ffi::Array< Integer >> &axis, bool keepdims=false, bool atleast1d=false) |
| Creates product operation over given axis. More... | |
| FCommReduce | tvm::topi::MakeTupleSumReducer () |
| Create communitive reducer summing over tuples. More... | |
Reduction op constructors.