Skip to content

Conversation

dhruvbird
Copy link
Contributor

@dhruvbird dhruvbird commented Mar 31, 2021

Stack from ghstack:

@jakeszwe in D26678637 found the mis-alignment between the operator list that the YAML file claimed and the dispatcher claimed. After some digging thorough investigation by @jakeszwe, we have come to the conclusion that the non-traced operators are more trouble than they are worth since it will result in phantom operators which every user of the capabilities API needs to be aware of (or every language implementation needs to be aware of). Instead, with this change, we can reliably trace all operators called via the dispatcher by clearing the list of un-observed operators during model tracing.

Also another thing to note is that the ignore-list in the observer is a list of base operator names, and not full operator names (with overload), which is whaat tracing based selective build needs. If we use the ignore-list, then we would need to include every overload on un-traced operators.

Latency isn't an issue during model tracing, so this should be generally okay.

Ran the following command to re-generate all the YAML files: buck run caffe2/torch/fb/mobile/cli:cli -- --gen_all_model_configs

Differential Revision: D27452855

NOTE FOR REVIEWERS: This PR has internal Facebook specific changes or comments, please review them on Phabricator!

…torList() so that model tracer can empty it out during tracing

@jakeszwe in D26678637 found the mis-alignment between the operator list that the YAML file claimed and the dispatcher claimed. After some digging thorough investigation by @jakeszwe, we have come to the conclusion that the non-traced operators are more trouble than they are worth since it will result in phantom operators which every user of the capabilities API needs to be aware of (or every language implementation needs to be aware of). Instead, with this change, we can reliably trace all operators called via the dispatcher by clearing the list of un-observed operators during model tracing.

Also another thing to note is that the ignore-list in the observer is a list of base operator names, and not full operator names (with overload), which is whaat tracing based selective build needs. If we use the ignore-list, then we would need to include every overload on un-traced operators.

Latency isn't an issue during model tracing, so this should be generally okay.

Ran the following command to re-generate all the YAML files: `buck run caffe2/torch/fb/mobile/cli:cli -- --gen_all_model_configs`

Differential Revision: [D27452855](https://our.internmc.facebook.com/intern/diff/D27452855/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D27452855/)!

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Mar 31, 2021

💊 CI failures summary and remediations

As of commit dbd439b (more details on the Dr. CI page):


  • 2/2 failures possibly* introduced in this PR
    • 1/2 non-scanned failure(s)

1 failure not recognized by patterns:

Job Step Action
GitHub Actions quick-checks Ensure correct trailing newlines 🔁 rerun

This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions to the (internal) Dr. CI Users group.

dhruvbird added a commit that referenced this pull request Mar 31, 2021
…torList() so that model tracer can empty it out during tracing

@jakeszwe in D26678637 found the mis-alignment between the operator list that the YAML file claimed and the dispatcher claimed. After some digging thorough investigation by @jakeszwe, we have come to the conclusion that the non-traced operators are more trouble than they are worth since it will result in phantom operators which every user of the capabilities API needs to be aware of (or every language implementation needs to be aware of). Instead, with this change, we can reliably trace all operators called via the dispatcher by clearing the list of un-observed operators during model tracing.

Also another thing to note is that the ignore-list in the observer is a list of base operator names, and not full operator names (with overload), which is whaat tracing based selective build needs. If we use the ignore-list, then we would need to include every overload on un-traced operators.

Latency isn't an issue during model tracing, so this should be generally okay.

Ran the following command to re-generate all the YAML files: `buck run caffe2/torch/fb/mobile/cli:cli -- --gen_all_model_configs`

Differential Revision: [D27452855](https://our.internmc.facebook.com/intern/diff/D27452855/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D27452855/)!

ghstack-source-id: 125337353
Pull Request resolved: #55017
@codecov
Copy link

codecov bot commented Mar 31, 2021

Codecov Report

Merging #55017 (dbd439b) into gh/dhruvbird/42/base (f956b75) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@                   Coverage Diff                    @@
##           gh/dhruvbird/42/base   #55017      +/-   ##
========================================================
- Coverage                 77.42%   77.42%   -0.01%     
========================================================
  Files                      1893     1893              
  Lines                    186440   186442       +2     
========================================================
+ Hits                     144357   144358       +1     
- Misses                    42083    42084       +1     

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 271879f.

@facebook-github-bot facebook-github-bot deleted the gh/dhruvbird/42/head branch April 5, 2021 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants