Skip to content
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

Support bare-metal Windows #3735

Open
wants to merge 29 commits into
base: main
Choose a base branch
from
Open

Support bare-metal Windows #3735

wants to merge 29 commits into from

Conversation

hans00
Copy link

@hans00 hans00 commented May 24, 2024

As title.

Copy link

pytorch-bot bot commented May 24, 2024

🔗 Helpful Links

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

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

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 24, 2024
@hans00 hans00 marked this pull request as ready for review May 29, 2024 11:18
@hans00 hans00 changed the title Support Windows Support bare-metal Windows May 31, 2024
@digantdesai
Copy link
Contributor

@cccclai - can you take a look please?

@cccclai
Copy link
Contributor

cccclai commented Jun 14, 2024

This is great! Thank you for adding this and sorry I've been missing this pull request. It's definately something we'd like to add. It may take some time to review though as it involves changes in both the the qualcomm backend and core runtime

@@ -185,6 +247,34 @@ Result<FreeableBuffer> FileDataLoader::Load(size_t offset, size_t size) {
// Read the data into the aligned address.
size_t needed = size;
uint8_t* buf = reinterpret_cast<uint8_t*>(aligned_buffer);
#ifdef _WIN32
Copy link
Contributor

Choose a reason for hiding this comment

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

cc @dbort on the data loader changes

#ifdef _WIN32

#define SHARED_MEMORY_NAME "torch_executor_backend_registry"
static std::shared_ptr<torch::executor::BackendRegistry> backend_reg;
Copy link
Contributor

Choose a reason for hiding this comment

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

cc @cccclai on the backend changes. Personally seeing shared_ptr in the core runtime is scary to me even if its gated behind windows which afaik should always have malloc and atomic available

@mergennachin mergennachin requested a review from tarun292 June 14, 2024 18:24
@larryliu0820 larryliu0820 self-requested a review June 14, 2024 18:40
Copy link
Contributor

@dbort dbort left a comment

Choose a reason for hiding this comment

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

Thank you so much for this PR @hans00, and sorry about the delay!

Before we review this, please help us out by splitting this into three independent PRs:

  • Changes to runtime/... files
  • Changes to extension/data_loader/... files
  • Changes to the qualcomm backend and related examples/ changes

If you'd like to stack these PRs on top of each other, we recommend https://github.com/ezyang/ghstack

@hans00
Copy link
Author

hans00 commented Sep 23, 2024

Sorry so late to continue on this PR.
I'm busy on other project previously.

P.S. I saw the others trying support Windows (#4661), did there still need help?

@cccclai
Copy link
Contributor

cccclai commented Sep 29, 2024

There are some PRs merged and some are not yet. Maybe can check out the part that is finished from the description and coordinate together.

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants