|
ONE - On-device Neural Engine
|
Pass to sparsify tensor. More...
#include <SparsifyTensorPass.h>

Public Member Functions | |
| SparsifyTensorPass (const std::string &tensor_name, const std::vector< int32_t > &traversal_order, const std::vector< DimensionType > &format, const std::vector< int32_t > &block_size, const std::vector< int32_t > &block_map) | |
| const char * | name (void) const final |
| bool | run (loco::Graph *g) final |
| Run the pass. | |
| template<loco::DataType DT> | |
| void | sparsify_tensor (luci::CircleConst *cop) |
Public Member Functions inherited from logo::Pass | |
| virtual | ~Pass ()=default |
Pass to sparsify tensor.
Definition at line 32 of file SparsifyTensorPass.h.
|
inline |
Definition at line 35 of file SparsifyTensorPass.h.
Reimplemented from logo::Pass.
Definition at line 45 of file SparsifyTensorPass.h.
|
finalvirtual |
Run the pass.
Implements logo::Pass.
Definition at line 87 of file SparsifyTensorPass.cpp.
References loco::active_nodes(), luci::must_cast(), loco::output_nodes(), luci::SparsifyTensorPass::sparsify_tensor< loco::DataType::FLOAT32 >(), luci::SparsifyTensorPass::sparsify_tensor< loco::DataType::S32 >(), and luci::SparsifyTensorPass::sparsify_tensor< loco::DataType::S8 >().
Referenced by luci::CircleOptimizer::sparsify().
| template void luci::SparsifyTensorPass::sparsify_tensor< loco::DataType::FLOAT32 > | ( | luci::CircleConst * | cop | ) |
Definition at line 26 of file SparsifyTensorPass.cpp.
References luci::DENSE, luci::must_cast(), luci::SPARSE_CSR, and luci::U16.