-
Notifications
You must be signed in to change notification settings - Fork 486
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
Use regular torch.Tensor
for CPU tensors
#8416
Conversation
context_length = 2048 | ||
input_shape_prefill = (1, context_length) | ||
input_shape_decode = (1, 1) | ||
model_args = model_exportable.ModelArgs( |
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.
why we have indent here for this function? for with torch_xla2.default_env():
?
@@ -133,6 +133,7 @@ def _aten_copy(x, y, memory_format=None): | |||
|
|||
|
|||
@op(torch.ops.aten.clone) | |||
@op(torch.ops.aten.clone.default) |
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.
what is the .default
change?
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.
actually not needed, removed.
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.
Thanks, LGTM
This is to test the water with encouraging
enable_globally()
usage pattern. So ideally torch_xla2 should not conflict with regular (non-compute) torch usage (such as dataloading). So we will make the type conversion explicit.