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

Hard code known true contiguity settings for unbacked SymInts #95003

Closed
wants to merge 2 commits into from

Conversation

ezyang
Copy link
Contributor

@ezyang ezyang commented Feb 16, 2023

Stack from ghstack (oldest at bottom):

Extracted from #94523 which has E2E test

Signed-off-by: Edward Z. Yang ezyang@meta.com

Extracted from #94523 which has E2E test

Signed-off-by: Edward Z. Yang <ezyang@meta.com>

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Feb 16, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/95003

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 99e25b2:
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

ezyang added a commit that referenced this pull request Feb 16, 2023
Extracted from #94523 which has E2E test

Signed-off-by: Edward Z. Yang <ezyangmeta.com>

ghstack-source-id: 162222314a318e09768d8c346647eac518c0128b
Pull Request resolved: #95003
@@ -1212,6 +1212,27 @@ void TensorImpl::empty_tensor_restride_symint(MemoryFormat memory_format) {
// recompute contiguous flag, as currently NHWC/NCHW flags are not mutually
// exclusive see #24090
refresh_contiguous();
// hard code some known true settings, for unbacked case
// TODO: avoid chundering into the guards for computing these
switch (memory_format) {
Copy link
Contributor

Choose a reason for hiding this comment

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

if you don't set true, do they default false?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, they would be set to some complicated expression from the guard-less bool implementation that would evaluate to true (often, sympy cannot figure it out though)

…nts"

Extracted from #94523 which has E2E test

Signed-off-by: Edward Z. Yang <ezyangmeta.com>

[ghstack-poisoned]
@ezyang ezyang added the topic: not user facing topic category label Feb 16, 2023
@ezyang
Copy link
Contributor Author

ezyang commented Feb 16, 2023

@pytorchbot merge

ezyang added a commit that referenced this pull request Feb 16, 2023
Extracted from #94523 which has E2E test

Signed-off-by: Edward Z. Yang <ezyangmeta.com>

ghstack-source-id: ed0f8a0032d93324ee8923f35cc3c8e6032f5a78
Pull Request resolved: #95003
@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Feb 16, 2023
@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@albanD albanD removed their request for review February 16, 2023 22:47
pruthvistony added a commit to ROCm/pytorch that referenced this pull request May 2, 2023
@facebook-github-bot facebook-github-bot deleted the gh/ezyang/1824/head branch June 8, 2023 16:50
jhavukainen pushed a commit to kulinseth/pytorch that referenced this pull request Mar 15, 2024
…h#95003)

Extracted from pytorch#94523 which has E2E test

Signed-off-by: Edward Z. Yang <ezyang@meta.com>
Pull Request resolved: pytorch#95003
Approved by: https://github.com/voznesenskym, https://github.com/ngimel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk Trigger trunk jobs on your pull request Merged topic: not user facing topic category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants