Skip to content

Adding support for delegate map in emitter #334

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

Closed
wants to merge 1 commit into from

Conversation

tarun292
Copy link
Contributor

Summary:
LoweredBackendModules might optionally have a delegate debug handle map embedded in them if preprocess returned a result with a map inside it.

The emitter internally generates a mapping which is:

{'instruction_id' : {'name':delegate_name, 'debug_handle_map': delegate_identifier_map}

and returns this in the EmitterOutput object which is then subsequently copied over into the ExecutorchProgram object returned by to_executorch(). This enables us to serialize this map into etrecord which we can then use later for mapping back delegate internal operations to the original node in the graph.

Differential Revision: D49173918

@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 Sep 13, 2023
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

Summary:

LoweredBackendModules might optionally have a delegate debug handle map embedded in them if `preprocess` returned a result with a map inside it.

The emitter internally generates a mapping which is:
```
{'instruction_id' : {'name':delegate_name, 'debug_handle_map': delegate_identifier_map}
```
and returns this in the `EmitterOutput` object which is then subsequently copied over into the `ExecutorchProgram` object returned by `to_executorch()`. This enables us to serialize this map into etrecord which we can then use later for mapping back delegate internal operations to the original node in the graph.

Reviewed By: Jack-Khuu

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

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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 1200d59.

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

Successfully merging this pull request may close these issues.

2 participants