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

[inductor] Small fixes for huggingface models #728

Merged
merged 3 commits into from Aug 8, 2022

Conversation

jansel
Copy link
Contributor

@jansel jansel commented Aug 7, 2022

No description provided.

@@ -11,6 +12,8 @@

from .virtualized import V

log = logging.getLogger(__name__)
Copy link
Contributor

Choose a reason for hiding this comment

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

Used logging and removed for this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I think it is fine to leave this line for the future though.

@jansel jansel merged commit 3b4f9bc into pytorch:main Aug 8, 2022
@jansel jansel mentioned this pull request Aug 8, 2022
@jansel jansel deleted the hfbf202208 branch August 8, 2022 18:19
if isinstance(device_or_dtype, torch.dtype):
return to_dtype(x, device_or_dtype)
if isinstance(device_or_dtype, torch.device):
return to_device(x, device_or_dtype)
if device is not None:
return to_device(x, device)
Copy link
Contributor

Choose a reason for hiding this comment

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

this will be wrong if both device and dtype is specified?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, will update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants