| 631 | } |
| 632 | |
| 633 | void NELSTMLayerQuantized::run() |
| 634 | { |
| 635 | ARM_COMPUTE_TRACE_EVENT(ARM_COMPUTE_PROF_CAT_CPU, ARM_COMPUTE_PROF_LVL_CPU, "NELSTMLayerQuantized::run"); |
| 636 | prepare(); |
| 637 | |
| 638 | // Acquire all the temporaries |
| 639 | MemoryGroupResourceScope scope_mg(_memory_group); |
| 640 | |
| 641 | // Concat and transpose the input |
| 642 | _concat_inputs.run(); |
| 643 | |
| 644 | // Run gemmlowp |
| 645 | _gemmlowp.run(); |
| 646 | _output_stage.run(); |
| 647 | |
| 648 | // Slice the results |
| 649 | _slice_input_tensor.run(); |
| 650 | _slice_forget_tensor.run(); |
| 651 | _slice_cell_tensor.run(); |
| 652 | _slice_output_tensor.run(); |
| 653 | |
| 654 | // Gates |
| 655 | // Forget gate |
| 656 | _sigmoid_forget_gate.run(); |
| 657 | |
| 658 | // Input gate |
| 659 | _sigmoid_input_gate.run(); |
| 660 | |
| 661 | // Input modulation gate |
| 662 | _tanh_modulation_gate.run(); |
| 663 | |
| 664 | // Output gate |
| 665 | _sigmoid_output_gate.run(); |
| 666 | |
| 667 | // Cell state (long term memory) |
| 668 | _mul1.run(); |
| 669 | _mul2.run(); |
| 670 | _add1.run(); |
| 671 | |
| 672 | // Output state (short term memory) |
| 673 | _tanh_output_state.run(); |
| 674 | _mul3.run(); |
| 675 | |
| 676 | // Requantize output state from QSYMM16 to QASYMM8 |
| 677 | _dequantize.run(); |
| 678 | _quantize.run(); |
| 679 | } |
| 680 | |
| 681 | void NELSTMLayerQuantized::prepare() |
| 682 | { |