ONE - On-device Neural Engine
Loading...
Searching...
No Matches
luci::UnrollUnidirectionalSequenceLSTMPass Struct Referencefinal

Class to Unroll UnidirectionalSequenceLSTM. More...

#include <UnrollUnidirectionalSequenceLSTMPass.h>

Collaboration diagram for luci::UnrollUnidirectionalSequenceLSTMPass:

Public Member Functions

const char * name (void) const final
 
bool run (loco::Graph *g) final
 Run the pass.
 
- Public Member Functions inherited from logo::Pass
virtual ~Pass ()=default
 

Detailed Description

Class to Unroll UnidirectionalSequenceLSTM.

Definition at line 28 of file UnrollUnidirectionalSequenceLSTMPass.h.

Member Function Documentation

◆ name()

const char * luci::UnrollUnidirectionalSequenceLSTMPass::name ( void  ) const
inlinefinalvirtual

Reimplemented from logo::Pass.

Definition at line 30 of file UnrollUnidirectionalSequenceLSTMPass.h.

30{ return "luci::UnrollUnidirectionalSequenceLSTMPass"; }

◆ run()

bool luci::UnrollUnidirectionalSequenceLSTMPass::run ( loco::Graph graph)
finalvirtual

Run the pass.

Returns
false if there was nothing changed

Implements logo::Pass.

Definition at line 653 of file UnrollUnidirectionalSequenceLSTMPass.cpp.

654{
655 bool changed = false;
656
657 for (auto node : loco::active_nodes(loco::output_nodes(g)))
658 {
659 if (auto lstm = dynamic_cast<luci::CircleUnidirectionalSequenceLSTM *>(node))
660 {
661 if (unroll_lstm(lstm))
662 changed = true;
663 }
664 }
665
666 return changed;
667}
UNIDIRECTIONAL_SEQUENCE_LSTM in Circle.
std::set< loco::Node * > active_nodes(const std::vector< loco::Node * > &roots)
Enumerate all the nodes required to compute "roots".
std::vector< Node * > output_nodes(Graph *)
Definition Graph.cpp:101

References loco::active_nodes(), and loco::output_nodes().

Referenced by package.infer.session::inference().


The documentation for this struct was generated from the following files: