- 
                Notifications
    You must be signed in to change notification settings 
- Fork 25.7k
          Move ATen/core/DimVector.h to c10/util/DimVector.h.
          #77045
        
          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
Conversation
This PR moves `ATen/core/DimVector.h`, as suggested in: #76812 (comment) The changes can be summarized as: - Changing includes from `ATen/core/DimVector.h` to `c10/util/DimVector.h` - Re-declaring both the type and constant size in `at` namespace - Making `c10::contiguous_strides` return a `DimVector` [ghstack-poisoned]
| 🔗 Helpful links
 ✅ No Failures (0 Pending)As of commit 63ae3ec (more details on the Dr. CI page): Expand to see more💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Please report bugs/suggestions to the (internal) Dr. CI Users group. | 
This PR moves `ATen/core/DimVector.h`, as suggested in: #76812 (comment) The changes can be summarized as: - Changing includes from `ATen/core/DimVector.h` to `c10/util/DimVector.h` - Re-declaring both the type and constant size in `at` namespace - Making `c10::contiguous_strides` return a `DimVector` [ghstack-poisoned]
This PR moves `ATen/core/DimVector.h`, as suggested in: #76812 (comment) The changes can be summarized as: - Changing includes from `ATen/core/DimVector.h` to `c10/util/DimVector.h` - Re-declaring both the type and constant size in `at` namespace - Making `c10::contiguous_strides` return a `DimVector` [ghstack-poisoned]
| lint | 
This PR moves `ATen/core/DimVector.h`, as suggested in: #76812 (comment) The changes can be summarized as: - Changing includes from `ATen/core/DimVector.h` to `c10/util/DimVector.h` - Re-declaring both the type and constant size in `at` namespace - Making `c10::contiguous_strides` return a `DimVector` [ghstack-poisoned]
…10/util/DimVector.h`." This PR moves `ATen/core/DimVector.h`, as suggested in: #76812 (comment) The changes can be summarized as: - Changing includes from `ATen/core/DimVector.h` to `c10/util/DimVector.h` - Re-declaring both the type and constant size in `at` namespace - Making `c10::contiguous_strides` return a `DimVector` [ghstack-poisoned]
This PR moves `ATen/core/DimVector.h`, as suggested in: #76812 (comment) The changes can be summarized as: - Changing includes from `ATen/core/DimVector.h` to `c10/util/DimVector.h` - Re-declaring both the type and constant size in `at` namespace - Making `c10::contiguous_strides` return a `DimVector` [ghstack-poisoned]
| @pytorchbot merge this | 
| Merge failed due to Matched rule superuser, but it was not reviewed yet by any of:clee2000,zzzwen,guangy10,jg2912,soumith, ... | 
| DimVector strides; | ||
|  | ||
| if (dims > 0) { | ||
| strides.assign(dims, 0); | 
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.
I'd like to take this failed landing to small improvement to this code:
| DimVector strides; | |
| if (dims > 0) { | |
| strides.assign(dims, 0); | |
| DimVector strides(dims); | |
| if (dims > 0) { | 
| @pytorchbot merge this | 
| Hey @ysiraichi. | 
Summary: This PR moves `ATen/core/DimVector.h`, as suggested in: #76812 (comment) The changes can be summarized as: - Changing includes from `ATen/core/DimVector.h` to `c10/util/DimVector.h` - Re-declaring both the type and constant size in `at` namespace - Making `c10::contiguous_strides` return a `DimVector` Pull Request resolved: #77045 Approved by: https://github.com/peterbell10, https://github.com/ezyang Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/ecde870d4e44ddb7fe2fb426666a1967826142c2 Reviewed By: atalman Differential Revision: D36322347 Pulled By: atalman fbshipit-source-id: 2fd969cdc975d6907272b677b168e2910044af9d
Stack from ghstack (oldest at bottom):
set_outputfunction fromMetaBaseAPI. #76098set_outputbyset_output_raw_stridedin the codebase. #76097set_outputboilerplate with new overloads. #76096ATen/core/DimVector.htoc10/util/DimVector.h. #77045contiguous_stridestoc10/util/strides.h. #76812This PR moves
ATen/core/DimVector.h, as suggested in:#76812 (comment)
The changes can be summarized as:
ATen/core/DimVector.htoc10/util/DimVector.hatnamespacec10::contiguous_stridesreturn aDimVector