Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support bf16 #25879

Merged
merged 3 commits into from
Nov 2, 2023
Merged

support bf16 #25879

merged 3 commits into from
Nov 2, 2023

Conversation

etemadiamd
Copy link
Contributor

What does this PR do?

Added bf16 support.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • [ x] Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@etemadiamd
Copy link
Contributor Author

@mfuntowicz @amyeroberts Started a new PR for bf16 support here!
CC: @AdrianAbeyta @amathews-amd

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

@LysandreJik
Copy link
Member

WDYT @ydshieh ?

The torch.cuda.is_bf16_supported command was introduced in PyTorch 1.10. As I believe we dropped support for torch 1.9, wdyt of this change?

@ydshieh
Copy link
Collaborator

ydshieh commented Oct 11, 2023

+1 for this change ❤️ .

@ydshieh
Copy link
Collaborator

ydshieh commented Oct 13, 2023

Hi @etemadiamd I think your PR is on top of a commit on main that is old. Could you pull the latest changes to your local main and rebase your PR branch on top of main? This should fix several failing tests.

@ydshieh
Copy link
Collaborator

ydshieh commented Oct 13, 2023

need a make fixup (or simply make style and make quality) to pass CI

@etemadiamd
Copy link
Contributor Author

Hi @ydshieh, Thanks! Applied "make style and make quality". The "ci/circleci: check_code_quality" and "setup_and_quality" tests passed the CI checks. Now "run_tests" and "ci/circleci: examples_torch" tests failed with "Failed: Timeout >120.0s". Any idea to fix the failures?

@ydshieh
Copy link
Collaborator

ydshieh commented Nov 2, 2023

Thanks for the fix! For the timeout one, we can ignore it.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

Copy link
Collaborator

@amyeroberts amyeroberts left a comment

Choose a reason for hiding this comment

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

Thanks for this improvement!

@ydshieh
Copy link
Collaborator

ydshieh commented Nov 2, 2023

Thanks again @etemadiamd !

@ydshieh ydshieh merged commit 7adaefe into huggingface:main Nov 2, 2023
EduardoPach pushed a commit to EduardoPach/transformers that referenced this pull request Nov 19, 2023
* added bf16 support

* added cuda availability check

* applied make style, quality
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants