Skip to content

add _to_cpu() operator#55795

Closed
bdhirsh wants to merge 26 commits intogh/bdhirsh/101/basefrom
gh/bdhirsh/101/head
Closed

add _to_cpu() operator#55795
bdhirsh wants to merge 26 commits intogh/bdhirsh/101/basefrom
gh/bdhirsh/101/head

Conversation

@bdhirsh
Copy link
Copy Markdown
Collaborator

@bdhirsh bdhirsh commented Apr 12, 2021

description coming soon

Stack from ghstack:

Differential Revision: D28474365

[ghstack-poisoned]
@facebook-github-bot
Copy link
Copy Markdown
Contributor

facebook-github-bot commented Apr 12, 2021

💊 CI failures summary and remediations

As of commit 71bfeab (more details on the Dr. CI page):


💚 💚 Looks good so far! There are no failures yet. 💚 💚


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

Copy link
Copy Markdown
Contributor

@ezyang ezyang left a comment

Choose a reason for hiding this comment

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

Two main thoughts:

  1. I'm not sure I'd deify this with a non-underscored name. torch.to_XXX doesn't really have any precedent (I see you stuck this next to to_dense but that's a method)
  2. There needs to be an explanation somewhere of WHY you would use this operator (it doesn't matter for eager backends, but it matters for lazy)

@bdhirsh
Copy link
Copy Markdown
Collaborator Author

bdhirsh commented Apr 12, 2021

Two main thoughts:

  1. I'm not sure I'd deify this with a non-underscored name. torch.to_XXX doesn't really have any precedent (I see you stuck this next to to_dense but that's a method)
  2. There needs to be an explanation somewhere of WHY you would use this operator (it doesn't matter for eager backends, but it matters for lazy)

Totally agreed with both of those points. I'll add comments soon- I mostly threw this PR up so I could start trying to get rid of the bridge API and let CI tell me if anything breaks, probably should have thrown a comment in the description.

The torch.to_cpu definitely needs documentation. I'm not sure the two overloads that I added deserve entries in the C++ API- I might just put them directly in the codegen template, since they're really just convenience helpers.

@bdhirsh bdhirsh changed the title add to_cpu() operator add _to_cpu() operator Apr 15, 2021
bdhirsh added 7 commits April 15, 2021 15:36
description coming soon




[ghstack-poisoned]
description coming soon




[ghstack-poisoned]
description coming soon




[ghstack-poisoned]
description coming soon




[ghstack-poisoned]
description coming soon




[ghstack-poisoned]
description coming soon




[ghstack-poisoned]
description coming soon




[ghstack-poisoned]
description coming soon




[ghstack-poisoned]
bdhirsh added 2 commits April 23, 2021 16:24
description coming soon




[ghstack-poisoned]
description coming soon




[ghstack-poisoned]
description coming soon




[ghstack-poisoned]
dgl-intel pushed a commit to dgl-intel/pytorch that referenced this pull request Apr 30, 2021
ghstack-source-id: 218c1b7
Pull Request resolved: pytorch#55795
description coming soon




[ghstack-poisoned]
description coming soon




[ghstack-poisoned]
dgl-intel pushed a commit to dgl-intel/pytorch that referenced this pull request May 3, 2021
ghstack-source-id: a23b00b
Pull Request resolved: pytorch#55795
bdhirsh added 2 commits May 4, 2021 13:19
description coming soon




[ghstack-poisoned]
description coming soon




[ghstack-poisoned]
bdhirsh added 2 commits May 12, 2021 07:05
description coming soon




[ghstack-poisoned]
description coming soon




[ghstack-poisoned]
@bdhirsh
Copy link
Copy Markdown
Collaborator Author

bdhirsh commented May 17, 2021

@bdhirsh has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@bdhirsh merged this pull request in 4dc1b8e.

krshrimali pushed a commit to krshrimali/pytorch that referenced this pull request May 19, 2021
Summary:
Pull Request resolved: pytorch#55795

description coming soon

Test Plan: Imported from OSS

Reviewed By: navahgar

Differential Revision: D28474365

Pulled By: bdhirsh

fbshipit-source-id: 0704d7ce354308601a0af9ab48851459f34ce7a0
bdhirsh added a commit that referenced this pull request May 20, 2021
Summary:
Pull Request resolved: #55795

description coming soon

Test Plan: Imported from OSS

Reviewed By: navahgar

Differential Revision: D28474365

Pulled By: bdhirsh

fbshipit-source-id: 0704d7ce354308601a0af9ab48851459f34ce7a0
This was referenced May 20, 2021
@facebook-github-bot facebook-github-bot deleted the gh/bdhirsh/101/head branch May 21, 2021 14:17
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.

3 participants