-
Notifications
You must be signed in to change notification settings - Fork 123
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
Conversation
@@ -11,6 +12,8 @@ | |||
|
|||
from .virtualized import V | |||
|
|||
log = logging.getLogger(__name__) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, will update.
No description provided.