-
Notifications
You must be signed in to change notification settings - Fork 536
Add a default delegate time scale converter #5076
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/5076
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit d7c3001 with merge base 85410e4 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This pull request was exported from Phabricator. Differential Revision: D62160650 |
This pull request was exported from Phabricator. Differential Revision: D62160650 |
Summary: Pull Request resolved: pytorch#5076 By default, the non-delegated events have a time scale converter, but delegated events do not, and this has caused confusion for users: [post](https://fb.workplace.com/groups/pytorch.edge.users/permalink/1562687731268181/), [Issue pytorch#4504](pytorch#4504). This diff gives a quick solution for the problem to unblock ET Beta. The rationale is that since for non-delegated ops, we have the default time scale: ``` source_time_scale: TimeScale = TimeScale.NS, target_time_scale: TimeScale = TimeScale.MS, ``` And the conversion rate is 10^6 (because 1 MS = 10^6 NS), so it makes sense to set a default converter function for delegated ops to be `input_time/(1000 * 1000)` as well. Similar converter functions have been used by [coreml](https://www.internalfb.com/code/fbsource/[76be64aab17c]/fbcode/executorch/examples/apple/coreml/scripts/inspector_utils.py?lines=259-262) and [vulkan](https://fburl.com/code/5cu6fx2b) already. The proper solution to write the convertion in etdump is tracked by T198369344 and T198369419 Differential Revision: D62160650
2be7433
to
412c435
Compare
This pull request was exported from Phabricator. Differential Revision: D62160650 |
412c435
to
68997d8
Compare
Summary: Pull Request resolved: pytorch#5076 By default, the non-delegated events have a time scale converter, but delegated events do not, and this has caused confusion for users: [post](https://fb.workplace.com/groups/pytorch.edge.users/permalink/1562687731268181/), [Issue pytorch#4504](pytorch#4504). This diff gives a quick solution for the problem to unblock ET Beta. When no `delegate_time_scale_converter` is provided by the user, just use the same converting ratio as the non-delegated events. The proper solution to write the convertion in etdump is tracked by T198369344 and T198369419 Differential Revision: D62160650
This pull request was exported from Phabricator. Differential Revision: D62160650 |
Summary: Pull Request resolved: pytorch#5076 By default, the non-delegated events have a time scale converter, but delegated events do not, and this has caused confusion for users: [post](https://fb.workplace.com/groups/pytorch.edge.users/permalink/1562687731268181/), [Issue pytorch#4504](pytorch#4504). This diff gives a quick solution for the problem to unblock ET Beta. When no `delegate_time_scale_converter` is provided by the user, just use the same converting ratio as the non-delegated events. The proper solution to write the convertion in etdump is tracked by T198369344 and T198369419 Reviewed By: dbort Differential Revision: D62160650
68997d8
to
bf55707
Compare
This pull request was exported from Phabricator. Differential Revision: D62160650 |
Summary: Pull Request resolved: pytorch#5076 By default, the non-delegated events have a time scale converter, but delegated events do not, and this has caused confusion for users: [post](https://fb.workplace.com/groups/pytorch.edge.users/permalink/1562687731268181/), [Issue pytorch#4504](pytorch#4504). This diff gives a quick solution for the problem to unblock ET Beta. When no `delegate_time_scale_converter` is provided by the user, just use the same converting ratio as the non-delegated events. The proper solution to write the convertion in etdump is tracked by T198369344 and T198369419 Reviewed By: dbort Differential Revision: D62160650
bf55707
to
1bde121
Compare
Summary: Pull Request resolved: pytorch#5076 By default, the non-delegated events have a time scale converter, but delegated events do not, and this has caused confusion for users: [post](https://fb.workplace.com/groups/pytorch.edge.users/permalink/1562687731268181/), [Issue pytorch#4504](pytorch#4504). This diff gives a quick solution for the problem to unblock ET Beta. When no `delegate_time_scale_converter` is provided by the user, just use the same converting ratio as the non-delegated events. The proper solution to write the convertion in etdump is tracked by T198369344 and T198369419 Reviewed By: dbort Differential Revision: D62160650
1bde121
to
d7c3001
Compare
This pull request was exported from Phabricator. Differential Revision: D62160650 |
Summary:
Because the unit of delegate ops are different from non-delegates, this has caused confusion for users: post, Issue #4504.
This diff gives a quick solution for the problem to unblock Beta. The rationale is that since for non-delegated ops, we have the default time scale:
And the conversion rate is 10^6 (because 1 MS = 10^6 NS), so it makes sense to set a default converter function for delegated ops to be
input_time/(1000 * 1000)
as well. Similar converter functions have been used by coreml and vulkan already.The proper solution to write the convertion in etdump is tracked by T198369344 and T198369419
Differential Revision: D62160650