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

Remove contiguity assertion from XLATensorImpl. #7998

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

ysiraichi
Copy link
Collaborator

This PR reflects the changes in the PyTorch PR pytorch/pytorch#135237. Basically, it removes the contiguity assertion due to a possible metadata change in the functionalization kernel.

Specifically, at the end of each functionalization kernel, at::functionalization::impl::set_sizes_strides_offset is called. It modifies the metadata of the output tensors, so that they match the metadata of eager. Such a metadata update might set TensorImpl::is_contiguous_ to false.

cc @miladm @JackCaoG @alanwaketan

@JackCaoG
Copy link
Collaborator

any chance you can add a test?

@ysiraichi
Copy link
Collaborator Author

Problem is, I don't think anything will change (e.g. strides and storage offset) before merging pytorch/pytorch#135498. So, not sure what kind of test would make sense, here.

@JackCaoG JackCaoG merged commit 03374cd into master Sep 16, 2024
23 checks passed
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.

2 participants