forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
quant doc: improve rendered documentation for backend_config_dict
Summary: This improves the documentation page for backend_config_dict to render the configurations in a human readable format, such as ``` { 'pattern': torch.nn.modules.pooling.AdaptiveAvgPool1d, 'dtype_configs': [ { 'input_dtype': torch.quint8, 'output_dtype': torch.quint8, }, { 'input_dtype': torch.float16, 'weight_dtype': torch.float16, 'bias_dtype': torch.float16, 'output_dtype': torch.float16, }, ], 'observation_type': ObservationType.OUTPUT_SHARE_OBSERVER_WITH_INPUT, }, ``` The results are also now sorted alphabetically by the normalized name of the root op in the pattern. A couple of utility functions are created to help with this. If in the future we convert backend_config_dict to use typed objects, we can move this logic to the objects at that time. Test plan: ``` cd docs make html cd build python -m server.http // renders correctly, example: https://gist.github.com/vkuzo/76adfc7c89e119c59813a733fa2cd56f ``` Pull Request resolved: pytorch#77535 Approved by: https://github.com/andrewor14
- Loading branch information
1 parent
e7cb44b
commit c15fca1
Showing
2 changed files
with
126 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters