Skip to content

Conversation

@ysiraichi
Copy link
Collaborator

@ysiraichi ysiraichi commented May 8, 2022

Stack from ghstack (oldest at bottom):

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

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]
@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented May 8, 2022

🔗 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.

Click here to manually regenerate this comment.

ysiraichi added 2 commits May 8, 2022 17:34
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]
@ezyang
Copy link
Contributor

ezyang commented May 8, 2022

lint

ysiraichi added 3 commits May 10, 2022 18:56
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]
@ezyang
Copy link
Contributor

ezyang commented May 10, 2022

@pytorchbot merge this

@pytorchmergebot
Copy link
Collaborator

Merge failed due to Matched rule superuser, but it was not reviewed yet by any of:clee2000,zzzwen,guangy10,jg2912,soumith, ...
Raised by https://github.com/pytorch/pytorch/actions/runs/2302934802

Comment on lines +12 to 15
DimVector strides;

if (dims > 0) {
strides.assign(dims, 0);
Copy link
Collaborator

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:

Suggested change
DimVector strides;
if (dims > 0) {
strides.assign(dims, 0);
DimVector strides(dims);
if (dims > 0) {

@ezyang
Copy link
Contributor

ezyang commented May 11, 2022

@pytorchbot merge this

@github-actions
Copy link
Contributor

Hey @ysiraichi.
You've committed this PR, but it does not have both a 'release notes: ...' and 'topics: ...' label. Please add one of each to the PR. The 'release notes: ...' label should represent the part of PyTorch that this PR changes (fx, autograd, distributed, etc) and the 'topics: ...' label should represent the kind of PR it is (not user facing, new feature, bug fix, perf improvement, etc). The list of valid labels can be found here for the 'release notes: ...' and here for the 'topics: ...'.
For changes that are 'topic: not user facing' there is no need for a release notes label.

@ysiraichi ysiraichi added release notes: cpp release notes category topic: not user facing topic category labels May 11, 2022
facebook-github-bot pushed a commit that referenced this pull request May 13, 2022
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
@facebook-github-bot facebook-github-bot deleted the gh/ysiraichi/49/head branch May 14, 2022 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants