Skip to content

Enable hpu_graph support for wav2vec2-asr + custom ctc_loss only for Gaudi2#779

Merged
regisss merged 10 commits into
huggingface:synapse_1.15from
HabanaAI:wav2vec2_asr_graphs_oh
Mar 27, 2024
Merged

Enable hpu_graph support for wav2vec2-asr + custom ctc_loss only for Gaudi2#779
regisss merged 10 commits into
huggingface:synapse_1.15from
HabanaAI:wav2vec2_asr_graphs_oh

Conversation

@vivekgoe
Copy link
Copy Markdown
Collaborator

@vivekgoe vivekgoe commented Mar 9, 2024

What does this PR do?

Fixes # (issue)
Enable hpu_graph support for wav2vec2-asr (add custom ctc_loss usage only for Gaudi2). Motivation to add hpu graphs is two-fold, (1) to improve performance, (2) to reduce run to run performance variations.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

@vivekgoe vivekgoe requested review from hlahkar and regisss as code owners March 9, 2024 08:01
@vivekgoe vivekgoe added synapse 1.15 run-test Run CI for PRs from external contributors labels Mar 9, 2024
@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@yeonsily
Copy link
Copy Markdown
Collaborator

The change caused regression on 1.14 docker run. Can you please check it?

Comment thread optimum/habana/transformers/models/wav2vec2/modeling_wav2vec2.py Outdated
Comment thread optimum/habana/transformers/models/wav2vec2/modeling_wav2vec2.py Outdated
Comment thread optimum/habana/transformers/models/wav2vec2/modeling_wav2vec2.py Outdated
Comment thread optimum/habana/transformers/models/wav2vec2/modeling_wav2vec2.py Outdated
@regisss
Copy link
Copy Markdown
Collaborator

regisss commented Mar 25, 2024

The change caused regression on 1.14 docker run. Can you please check it?

I think this happens because the CTC loss kernel is introduced in Synapse 1.15 right?
If it cannot work with 1.14, we can merge this PR into the synapse_1.15 branch.

@vivekgoe
Copy link
Copy Markdown
Collaborator Author

@regisss updated all review comments. @yeonsily @libinta updated code to ensure backward compatibility with Synapse 1.14.0.

@vivekgoe vivekgoe added run-test Run CI for PRs from external contributors and removed run-test Run CI for PRs from external contributors labels Mar 26, 2024
Copy link
Copy Markdown
Collaborator

@regisss regisss left a comment

Choose a reason for hiding this comment

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

I'm suggesting two small changes in the README because HPU graphs don't work on my Gaudi2 instance with 1.14.

Comment thread examples/speech-recognition/README.md Outdated
Comment thread examples/speech-recognition/README.md Outdated
Vivek Goel and others added 2 commits March 26, 2024 19:18
Co-authored-by: regisss <15324346+regisss@users.noreply.github.com>
Co-authored-by: regisss <15324346+regisss@users.noreply.github.com>
@regisss regisss added run-test Run CI for PRs from external contributors and removed run-test Run CI for PRs from external contributors labels Mar 26, 2024
@regisss regisss changed the base branch from main to synapse_1.15 March 27, 2024 14:32
@regisss regisss merged commit 0342ac1 into huggingface:synapse_1.15 Mar 27, 2024
gplutop7 pushed a commit to HabanaAI/optimum-habana-fork that referenced this pull request Nov 6, 2025
…ce#779)

Co-authored-by: Piotr Bielak <pbielak@users.noreply.github.com>
Co-authored-by: Piotr Bielak <pbielak@habana.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-test Run CI for PRs from external contributors synapse 1.15

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants