Skip to content

Conversation

@albanD
Copy link
Collaborator

@albanD albanD commented Oct 16, 2022

Stack from ghstack (oldest at bottom):

Following comments below, we need to add support for std::negate/std::min/std::max/operator- for SymInt

[ghstack-poisoned]
@albanD albanD requested a review from soulitzer as a code owner October 16, 2022 21:32
@pytorch-bot
Copy link

pytorch-bot bot commented Oct 16, 2022

🔗 Helpful Links

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

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

❌ 1 Failures, 1 Pending

As of commit e07d99c:

The following jobs have failed:

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

[ghstack-poisoned]
negated_pad.cbegin(),
negated_pad.cend(),
negated_pad.begin(),
std::negate<int64_t>());
Copy link
Contributor

Choose a reason for hiding this comment

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

We should add a std::negate specialization for SymInt. We should also make operator- work. With the branch, there isn't any particular reason to rush this

out_slice = out.slice(dim, out_shape[dim] - pad_r, out_shape[dim]);
in_slice = out.slice(dim, std::max(pad_l, zero), std::max(pad_l, zero) + pad_r);
out_slice = out.slice_symint(dim, out_shape[dim] - pad_r, out_shape[dim]);
in_slice = out.slice_symint(dim, pad_l.max(zero), pad_l.max(zero) + pad_r);
Copy link
Contributor

Choose a reason for hiding this comment

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

We should have a SymInt specialization for std::max

Copy link
Contributor

@bdhirsh bdhirsh Oct 17, 2022

Choose a reason for hiding this comment

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

I added one last week but ended up removing it (oh actually I didn't add a specialization - I just implemented SymInt::min/max)

From the docs, it looks like std::max/min() already have a template that just calls into operator< and operator>. So adding a special handling for min/max on symints in C++ seemed redundant to me, but lmk if you think that's wrong. We still have min/max support in python.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, I am fine with this resolution

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 16, 2022
@albanD albanD changed the title symintify pad ops [WIP] symintify pad ops Oct 16, 2022
Following comments below, we need to add support for `std::negate`/`std::min`/`std::max`/`operator-` for SymInt

[ghstack-poisoned]
Following comments below, we need to add support for `std::negate`/`std::min`/`std::max`/`operator-` for SymInt

[ghstack-poisoned]
albanD added a commit that referenced this pull request Oct 17, 2022
ghstack-source-id: b6b1a9f
Pull Request resolved: #87046
Following comments below, we need to add support for `std::negate`/`std::min`/`std::max`/`operator-` for SymInt

[ghstack-poisoned]
@albanD albanD changed the title [WIP] symintify pad ops Symintify pad ops Oct 18, 2022
@pytorch-bot pytorch-bot bot added the release notes: jit release notes category label Oct 18, 2022
Following comments below, we need to add support for `std::negate`/`std::min`/`std::max`/`operator-` for SymInt

[ghstack-poisoned]
Following comments below, we need to add support for `std::negate`/`std::min`/`std::max`/`operator-` for SymInt

[ghstack-poisoned]
Following comments below, we need to add support for `std::negate`/`std::min`/`std::max`/`operator-` for SymInt

[ghstack-poisoned]
albanD added a commit that referenced this pull request Oct 18, 2022
ghstack-source-id: 2c2ec67
Pull Request resolved: #87046
@albanD
Copy link
Collaborator Author

albanD commented Oct 18, 2022

@ezyang this is ready for a final review

Following comments below, we need to add support for `std::negate`/`std::min`/`std::max`/`operator-` for SymInt

[ghstack-poisoned]
@albanD
Copy link
Collaborator Author

albanD commented Oct 19, 2022

@pytorchbot merge -g

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks on your PR pass since you used the green (-g) flag (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

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 2 additional jobs have failed, first few of them are: trunk ,trunk / linux-bionic-cuda11.7-py3.10-gcc7 / test (default, 3, 4, linux.4xlarge.nvidia.gpu)

Details for Dev Infra team Raised by workflow job

@albanD
Copy link
Collaborator Author

albanD commented Oct 19, 2022

@pytorchbot merge -g

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks on your PR pass since you used the green (-g) flag (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

@github-actions
Copy link
Contributor

Hey @albanD.
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.

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 release notes: jit release notes category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants