Skip to content

Extract DeviceType to a standalone header file #11145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 28, 2025

Conversation

desertfire
Copy link
Contributor

Summary:
X-link: pytorch/pytorch#154417

The goal of this PR and future follow-up PRs is to group a set of header files required by AOTInductor Standalone in a separate directory, ensuring they are implemented in a header-only manner. More specifically, here is what this PR does:

  • Extract the DeviceType enum class into a standalone header file in a new torch/standalone/header_only directory
  • Retain the existing c10/core/DeviceType.[h|cpp] files to handle complex logic and static variables
  • Import symbols from the new torch::standalone namespace into c10 for backward compatibility

This is an updated version of pytorch/pytorch#152787, because we need to land in fbcode first. See the original comments and discussions in pytorch/pytorch#152787.

Differential Revision: D75313723

Copy link

pytorch-bot bot commented May 27, 2025

🔗 Helpful Links

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

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

✅ You can merge normally! (3 Unrelated Failures)

As of commit 48989fc with merge base 0cf2d53 (image):

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 27, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75313723

@desertfire
Copy link
Contributor Author

@pytorchbot label "release notes: none"

@pytorch-bot pytorch-bot bot added the release notes: none Do not include this in the release notes label May 27, 2025
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.

ET change is trivial

facebook-github-bot pushed a commit that referenced this pull request May 27, 2025
Summary:

X-link: pytorch/pytorch#154417

The goal of this PR and future follow-up PRs is to group a set of header files required by AOTInductor Standalone in a separate directory, ensuring they are implemented in a header-only manner. More specifically, here is what this PR does:
* Extract the DeviceType enum class into a standalone header file in a new torch/standalone/header_only directory
* Retain the existing c10/core/DeviceType.[h|cpp] files to handle complex logic and static variables
* Import symbols from the new torch::standalone namespace into c10 for backward compatibility

This is an updated version of pytorch/pytorch#152787, because we need to land in fbcode first. See the original comments and discussions in pytorch/pytorch#152787.

Reviewed By: janeyx99

Differential Revision: D75313723
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75313723

Summary:

X-link: pytorch/pytorch#154417

The goal of this PR and future follow-up PRs is to group a set of header files required by AOTInductor Standalone in a separate directory, ensuring they are implemented in a header-only manner. More specifically, here is what this PR does:
* Extract the DeviceType enum class into a standalone header file in a new torch/standalone/header_only directory
* Retain the existing c10/core/DeviceType.[h|cpp] files to handle complex logic and static variables
* Import symbols from the new torch::standalone namespace into c10 for backward compatibility

This is an updated version of pytorch/pytorch#152787, because we need to land in fbcode first. See the original comments and discussions in pytorch/pytorch#152787.

Reviewed By: janeyx99

Differential Revision: D75313723
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75313723

desertfire added a commit to pytorch/pytorch that referenced this pull request May 27, 2025
Summary:
X-link: pytorch/executorch#11145


The goal of this PR and future follow-up PRs is to group a set of header files required by AOTInductor Standalone in a separate directory, ensuring they are implemented in a header-only manner. More specifically, here is what this PR does:
* Extract the DeviceType enum class into a standalone header file in a new torch/standalone/header_only directory
* Retain the existing c10/core/DeviceType.[h|cpp] files to handle complex logic and static variables
* Import symbols from the new torch::standalone namespace into c10 for backward compatibility

This is an updated version of #152787, because we need to land in fbcode first. See the original comments and discussions in #152787.

Test Plan: CI

Reviewed By: janeyx99

Differential Revision: D75313723
desertfire added a commit to pytorch/pytorch that referenced this pull request May 27, 2025
Summary:
X-link: pytorch/executorch#11145

Pull Request resolved: #154417

The goal of this PR and future follow-up PRs is to group a set of header files required by AOTInductor Standalone in a separate directory, ensuring they are implemented in a header-only manner. More specifically, here is what this PR does:
* Extract the DeviceType enum class into a standalone header file in a new torch/standalone/header_only directory
* Retain the existing c10/core/DeviceType.[h|cpp] files to handle complex logic and static variables
* Import symbols from the new torch::standalone namespace into c10 for backward compatibility

This is an updated version of #152787, because we need to land in fbcode first. See the original comments and discussions in #152787.

Test Plan: CI

Reviewed By: janeyx99

Differential Revision: D75313723
@facebook-github-bot facebook-github-bot merged commit 380eb5f into main May 28, 2025
92 of 98 checks passed
@facebook-github-bot facebook-github-bot deleted the export-D75313723 branch May 28, 2025 02:57
@facebook-github-bot
Copy link
Contributor

This pull request has been reverted by 01d6441.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported release notes: none Do not include this in the release notes Reverted
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants