Skip to content

Conversation

@rkazants
Copy link
Collaborator

@rkazants rkazants commented Jun 22, 2024

Details: Fuse Keras LSTM to LSTMSequence and Optimize TF While with TensorList ops.
Loop operations with TensorListSetItem transformed to ConcatOutput outputs.
Loop operations with TensorListGetItem transformed to SlicedInput inputs.

It helps to fuse six loops with LSTMCell to six LSTM sequence model. It reduces customer model size by twice and increase throughput by 1.97x.

Tickets: TBD

@rkazants rkazants requested a review from a team as a code owner June 22, 2024 11:32
@github-actions github-actions bot added category: TF FE OpenVINO TensorFlow FrontEnd category: TFL FE OpenVINO TensorFlow Lite FrontEnd labels Jun 22, 2024
@rkazants rkazants requested review from itikhono, mvafin and popovaan June 22, 2024 11:32
@rkazants rkazants requested a review from a team as a code owner June 24, 2024 11:24
@github-actions github-actions bot added the category: transformations OpenVINO Runtime library - Transformations label Jun 24, 2024
Signed-off-by: Kazantsev, Roman <[email protected]>
@rkazants rkazants requested a review from evkotov June 24, 2024 11:29
Signed-off-by: Kazantsev, Roman <[email protected]>
Copy link
Contributor

@evkotov evkotov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have performance measurements? Did this transformation improve?

rkazants added 2 commits June 25, 2024 18:57
Signed-off-by: Kazantsev, Roman <[email protected]>
@rkazants
Copy link
Collaborator Author

Do you have performance measurements? Did this transformation improve?

Yes, 2x for customer model

rkazants added 4 commits June 26, 2024 18:31
Signed-off-by: Kazantsev, Roman <[email protected]>
Signed-off-by: Kazantsev, Roman <[email protected]>
@rkazants rkazants requested review from evkotov and itikhono June 26, 2024 16:35
rkazants added 2 commits June 27, 2024 02:42
Signed-off-by: Kazantsev, Roman <[email protected]>
@rkazants
Copy link
Collaborator Author

@popovaan, @itikhono, let me fix your comments in separate PR.

@rkazants rkazants added this to the 2024.3 milestone Jun 27, 2024
@andrei-kochin andrei-kochin added this pull request to the merge queue Jun 27, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 27, 2024
@rkazants rkazants added this pull request to the merge queue Jun 27, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 27, 2024
@rkazants rkazants added this pull request to the merge queue Jun 27, 2024
Merged via the queue into openvinotoolkit:master with commit 07cbea2 Jun 27, 2024
@rkazants rkazants deleted the rkazants/lstm_keras_fusion branch June 27, 2024 19:48
github-merge-queue bot pushed a commit that referenced this pull request Jun 28, 2024
**Details:** Fix leftovers for Keras LSTM fusion transformation
#25170

**Tickets:** TBD

Signed-off-by: Kazantsev, Roman <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Jun 28, 2024
**Details:** Fix leftovers for Keras LSTM fusion transformation
#25170

**Tickets:** TBD

Signed-off-by: Kazantsev, Roman <[email protected]>
AsyaPronina pushed a commit to AsyaPronina/openvino that referenced this pull request Jul 1, 2024
…th TensorList ops (openvinotoolkit#25170)

**Details:** Fuse Keras LSTM to LSTMSequence and Optimize TF While with
TensorList ops.
Loop operations with TensorListSetItem transformed to ConcatOutput
outputs.
Loop operations with TensorListGetItem transformed to SlicedInput
inputs.

It helps to fuse six loops with LSTMCell to six LSTM sequence model. It
reduces customer model size by twice and increase throughput by 1.97x.

**Tickets:** TBD

---------

Signed-off-by: Kazantsev, Roman <[email protected]>
AsyaPronina pushed a commit to AsyaPronina/openvino that referenced this pull request Jul 1, 2024
…vinotoolkit#25268)

**Details:** Fix leftovers for Keras LSTM fusion transformation
openvinotoolkit#25170

**Tickets:** TBD

Signed-off-by: Kazantsev, Roman <[email protected]>
AsyaPronina pushed a commit to AsyaPronina/openvino that referenced this pull request Jul 1, 2024
…th TensorList ops (openvinotoolkit#25170)

**Details:** Fuse Keras LSTM to LSTMSequence and Optimize TF While with
TensorList ops.
Loop operations with TensorListSetItem transformed to ConcatOutput
outputs.
Loop operations with TensorListGetItem transformed to SlicedInput
inputs.

It helps to fuse six loops with LSTMCell to six LSTM sequence model. It
reduces customer model size by twice and increase throughput by 1.97x.

**Tickets:** TBD

---------

Signed-off-by: Kazantsev, Roman <[email protected]>
AsyaPronina pushed a commit to AsyaPronina/openvino that referenced this pull request Jul 1, 2024
…vinotoolkit#25268)

**Details:** Fix leftovers for Keras LSTM fusion transformation
openvinotoolkit#25170

**Tickets:** TBD

Signed-off-by: Kazantsev, Roman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: TF FE OpenVINO TensorFlow FrontEnd category: TFL FE OpenVINO TensorFlow Lite FrontEnd category: transformations OpenVINO Runtime library - Transformations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants