Skip to content

Conversation

@pytorch-bot
Copy link

pytorch-bot bot commented Nov 10, 2024

🔗 Helpful Links

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

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

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

✅ No Failures

As of commit 10fb73a with merge base f4ce9ac (image):
💚 Looks good so far! There are no failures yet. 💚

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

anijain2305 added a commit that referenced this pull request Nov 10, 2024
ghstack-source-id: 06e3d28
Pull Request resolved: #140223

// For cloning
GuardManager(RootGuardManager* root, std::string source, bool is_dict)
: _root(root), _source(source), _is_dict(is_dict) {}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
: _root(root), _source(source), _is_dict(is_dict) {}
: _root(root), _source(std::move(source)), _is_dict(is_dict) {}


void add_relational_guard_resetter_without_move(
std::shared_ptr<RelationalGuard> relational_guard) {
_relational_guard_resetters.emplace_back(relational_guard);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
_relational_guard_resetters.emplace_back(relational_guard);
_relational_guard_resetters.emplace_back(std::move(relational_guard));

Copy link
Collaborator

Choose a reason for hiding this comment

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

Surprised this isn't covered by clang-tidy. A lot of things should probably moved by value around here.

std::vector<Py_ssize_t> indices)
: DictGuardManager(
cloned_root,
source,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
source,
std::move(source),

size,
_expected_type,
is_exact_dict_type,
indices) {}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
indices) {}
std::move(indices)) {}

_size(size),
_expected_type(_expected_type),
_is_exact_dict_type(is_exact_dict_type),
_indices(indices) {}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
_indices(indices) {}
_indices(std::move(indices)) {}

Copy link
Collaborator

@Skylion007 Skylion007 left a comment

Choose a reason for hiding this comment

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

Way to many things should be moved in the newly added code. I went through a few of them, but you should really use clang-tidy to find all the args that need to moved though the calls.

RootGuardManager* root,
std::shared_ptr<RelationalGuard> guard) {
// Don't std::move. Shared the pointers between root and cloned_root.
root->add_relational_guard_resetter_without_move(guard);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
root->add_relational_guard_resetter_without_move(guard);
root->add_relational_guard_resetter_without_move(std::move(guard));

@anijain2305
Copy link
Contributor Author

Way to many things should be moved in the newly added code. I went through a few of them, but you should really use clang-tidy to find all the args that need to moved though the calls.

Thanks for pointing out. This PR will be WIP for a few weeks (trying to build up to a new functionality in follow up PRs). I will fix the std::move problems before the final review.

@anijain2305 anijain2305 changed the title [dynamo][guards] Support cloning of Guard Manager [wip][dynamo][guards] Support cloning of Guard Manager Nov 10, 2024
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames

[ghstack-poisoned]
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames

[ghstack-poisoned]
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames

[ghstack-poisoned]
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames

[ghstack-poisoned]
@anijain2305 anijain2305 changed the title [wip][dynamo][guards] Support cloning of Guard Manager [dynamo][guards] Support cloning of Guard Manager Nov 11, 2024
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames

[ghstack-poisoned]
@anijain2305 anijain2305 added topic: not user facing topic category ciflow/trunk Trigger trunk jobs on your pull request labels Nov 11, 2024
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames

[ghstack-poisoned]
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames

[ghstack-poisoned]
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames

[ghstack-poisoned]
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames

[ghstack-poisoned]
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames

[ghstack-poisoned]
@anijain2305
Copy link
Contributor Author

@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

@github-actions github-actions bot deleted the gh/anijain2305/585/head branch December 21, 2024 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants