Skip to content

Conversation

@Olivia-liu
Copy link
Contributor

Summary:
This diff is to make the model config codegen flow work on Edge MLHub by enabling the et_operator_library API to take a .yaml file.

  • The code changes in fbcode/executorch/codegen/codegen.bzl was copied from a stale diff D61824614 made by Mengwei. That one didn't landed because the owner of SceneX/v5002 model didn't have time to test it.

  • The code changes in fbcode/executorch/build/fb/clients.bzl is to make auto-generated BUCKs under the directory fbsource//xplat/executorch_model/... have visibility to the et_operator_library API.

By design, this is the codegen flow:

  1. Use click the "Generate ET model config" button on Edge ML Hub;
  2. Two files will be generated, one is a .yaml with a list of kernels, the other is a BUCK file under path xplat/executorch_model/build/... that calls et_operator_library and pass in the .yaml as a parameter;
  3. A bot would accept and land the diff if CI passes;
  4. User can run inference.

Next I will modify the codegen script so that it creates the .yaml and BUCK in the correct format for this flow to work E2E.

Differential Revision: D63305843

Summary:
This diff is to make the model config codegen flow work on Edge MLHub by enabling the `et_operator_library` API to take a .yaml file.

- The code changes in `fbcode/executorch/codegen/codegen.bzl` was copied from a stale diff D61824614 made by Mengwei. That one didn't landed because the owner of SceneX/v5002 model didn't have time to test it.

- The code changes in `fbcode/executorch/build/fb/clients.bzl` is to make auto-generated BUCKs under the directory `fbsource//xplat/executorch_model/...` have visibility to the `et_operator_library` API.

By design, this is the codegen flow:
1. Use click the "Generate ET model config" button on Edge ML Hub;
2. Two files will be generated, one is a .yaml with a list of kernels, the other is a BUCK file under path `xplat/executorch_model/build/...` that calls `et_operator_library` and pass in the .yaml as a parameter;
3. A bot would accept and land the diff if CI passes;
4. User can run inference.

Next I will modify the codegen script so that it creates the .yaml and BUCK in the correct format for this flow to work E2E.

Differential Revision: D63305843
@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 Oct 1, 2024
@pytorch-bot
Copy link

pytorch-bot bot commented Oct 1, 2024

🔗 Helpful Links

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

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

✅ No Failures

As of commit 1ba447d with merge base b60fa71 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@facebook-github-bot
Copy link
Contributor

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

@Olivia-liu Olivia-liu closed this Oct 1, 2024
Olivia-liu added a commit to Olivia-liu/executorch-1 that referenced this pull request Oct 1, 2024
…5777)

Summary:
Pull Request resolved: pytorch#5777

## This diff
This diff is to make the model config codegen flow work on Edge MLHub by enabling the `et_operator_library` API to take a .yaml file.

- The code changes in `fbcode/executorch/codegen/codegen.bzl` was copied from a stale diff D61824614 made by Mengwei. That one didn't landed because the owner of SceneX/v5002 model didn't have time to test it.

## Context
By design, this is the codegen flow:
1. Use click the "Generate ET model config" button on Edge ML Hub;
2. Two files will be generated, one is a .yaml with a list of kernels, the other is a BUCK file under path `xplat/executorch_model/build/...` that calls `et_operator_library` and pass in the .yaml as a parameter. See D63667456 for an example;
3. A bot would accept and land the diff if CI passes;
4. User can run inference.

Differential Revision: D63305843
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants