Skip to content

Conversation

@Skylion007
Copy link
Collaborator

@Skylion007 Skylion007 commented Nov 14, 2022

Applies some more missing std::move found by static analysis. This should improve performance and reduce unnecessary copies. This PR only targets ATen for now.

And before you ask about the edits, std::move is optimal in a ternary operator as copy ellision cannot happen one. The best thing is probably rewriting it as an if else, but ultimately this should be performant enough.
Followup to #88512 and #88514

cc @jerryzh168 @jianyuh @raghuramank100 @jamesr66a @vkuzo @jgong5 @Xia-Weiwen @leslie-fang-intel @VitalyFedyunin @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10

@pytorch-bot
Copy link

pytorch-bot bot commented Nov 14, 2022

🔗 Helpful Links

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

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

❌ 1 Failures

As of commit 6c4ffc5:

The following jobs have failed:

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

@pytorch-bot pytorch-bot bot added the release notes: linalg_frontend release notes category label Nov 14, 2022
@github-actions github-actions bot added module: cpu CPU specific problem (e.g., perf, algorithm) oncall: quantization Quantization support in PyTorch labels Nov 14, 2022
@Skylion007 Skylion007 changed the title [ATen]: add some more missing moves Fix: [ATen] add some more missing moves Nov 14, 2022
@Skylion007 Skylion007 changed the title Fix: [ATen] add some more missing moves Fix: [ATen] add more missing moves - part 2 Nov 14, 2022
@soumith soumith requested a review from swolchok November 15, 2022 00:02
Copy link
Contributor

@swolchok swolchok left a comment

Choose a reason for hiding this comment

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

mostly good. i like that you caught a bunch of missing moves of SymInt in particular; CC @ezyang on those since they're easy to introduce. changes requested for unnecessary moves pointed out in comments

@ezyang
Copy link
Contributor

ezyang commented Nov 18, 2022

Thanks! Deferring to swolchok here

@github-actions github-actions bot added the release notes: quantization release notes category label Dec 4, 2022
@Skylion007
Copy link
Collaborator Author

Hmm, @ezyang saw a failure in Torch Dynamo (that only occurs an hour after CI starts oof). Any way to just run the tests that failed?

@ezyang
Copy link
Contributor

ezyang commented Dec 9, 2022

you can rerun failed test from GHA UI. Can you link to the failure, I don't see it

@Skylion007
Copy link
Collaborator Author

@ezyang
Copy link
Contributor

ezyang commented Dec 9, 2022

in GHA ui you can ask to rerun failed tests

@Skylion007
Copy link
Collaborator Author

in GHA ui you can ask to rerun failed tests

I meant for new commits that attempt to fix it, or do you believe it's just a flake?

@ezyang
Copy link
Contributor

ezyang commented Dec 9, 2022

oh sorry, we're just gonna run everything, not your problem lol.

I don't know if it's your problem or not, this PR is so big it's hard to tell. Maybe we should split it in two or something.

@Skylion007
Copy link
Collaborator Author

Ah, it wasn't my fault. Let me revert that change quickly.: b2795d3

@Skylion007
Copy link
Collaborator Author

Skylion007 commented Dec 9, 2022

@ezyang Reverted and merged fixes form master, just kick off the merge process again. Should have realized it wasn't my fault due to it being from the trunk jobs. ;)

@ezyang
Copy link
Contributor

ezyang commented Dec 10, 2022

@pytorchbot merge

@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

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: The following mandatory check(s) failed (Rule superuser):

Dig deeper by viewing the failures on hud

Details for Dev Infra team Raised by workflow job

@Skylion007
Copy link
Collaborator Author

Okay, @ezyang merge conflicts dealt with and the only failing test so far is the a flake due to an download error during install.

@Skylion007
Copy link
Collaborator Author

in GHA ui you can ask to rerun failed tests

BTW, it seems I sadly do not have permissions to. :/

@ezyang
Copy link
Contributor

ezyang commented Dec 10, 2022

@pytorchbot merge -f "flaky ci only"

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes).

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 pushed a commit that referenced this pull request Dec 11, 2022
ezyang added a commit that referenced this pull request Dec 11, 2022
ezyang added a commit that referenced this pull request Dec 11, 2022
This reverts commit 583d216.

ghstack-source-id: a64436f
Pull Request resolved: #90642
pytorchmergebot pushed a commit that referenced this pull request Dec 12, 2022
…0629)

Applies various automated fixes that reduces the number of spurious copies in torch, aten, and c10. I also inlined any default dtors that would have made the type trivially destructible.

Follow up to #89000

Pull Request resolved: #90629
Approved by: https://github.com/ezyang
pytorchmergebot pushed a commit that referenced this pull request Dec 19, 2022
Apply clang-tidy check modernize-use-emplace. This is slightly more efficient by using an inplace constructor and is the recommended style in parts of the codebase covered by clang-tidy. This just manually applies the check to rest of the codebase. Pinging @ezyang as this is related to my other PRs he reviewed like #89000

Pull Request resolved: #91077
Approved by: https://github.com/ezyang
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 module: cpu CPU specific problem (e.g., perf, algorithm) oncall: quantization Quantization support in PyTorch open source release notes: linalg_frontend release notes category release notes: quantization release notes category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants