pytorch
fd8e2064 - quant: switch observers to use min_max (#42957)

Commit
4 years ago
quant: switch observers to use min_max (#42957) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/42957 Switches observers to use the new min_max function to calculate min and max at the same time. We see around 45-50% speedup on representative input shapes on the microbenchmarks for all observers except `HistogramObserver`. Test Plan: CI for correctness performance: ``` cd benchmarks/operator_benchmark // repeat (before diff, after diff) x (cpu, cuda) python -m pt.qobserver_test --tag_filter all --device cpu /* * before, cpu: https://our.intern.facebook.com/intern/paste/P138633280/ * before, cuda: https://our.intern.facebook.com/intern/paste/P138639473/ * after, cpu: https://our.intern.facebook.com/intern/paste/P138635458/ * after, cuda: https://our.intern.facebook.com/intern/paste/P138636344/ */ ``` Imported from OSS Reviewed By: supriyar Differential Revision: D23093995 fbshipit-source-id: 9f416d144109b5b80baf089eb4bcfabe8fe358d5
Author
Parents
Loading