[PyTorch Edge] Provide a method ObservedOperators::getUnobservedOperatorList() so that model tracer can empty it out during tracing #55017
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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!