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

Fix dtype casting on CPU #339

Merged
merged 2 commits into from
Oct 26, 2023
Merged

Fix dtype casting on CPU #339

merged 2 commits into from
Oct 26, 2023

Conversation

epwalsh
Copy link
Member

@epwalsh epwalsh commented Oct 25, 2023

Followup to #323 and pytorch/pytorch#110966.

This fixes our _cast_if_autocasst_enabled() on CPU, since torch.is_autocast_enabled() only checks for CUDA autocast.

Copy link
Member

@dirkgr dirkgr left a comment

Choose a reason for hiding this comment

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

I still think we should have just done the casting manually everywhere.

Copy link
Collaborator

@2015aroras 2015aroras left a comment

Choose a reason for hiding this comment

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

LGTM (and I agree with Dirk).

@epwalsh epwalsh merged commit c1a4519 into main Oct 26, 2023
10 checks passed
@epwalsh epwalsh deleted the epwalsh/cpu-autocast branch October 26, 2023 19:12
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.

3 participants