pytorch
aa3c28a2 - [static runtime] Shortcut resize_({0})

Commit
4 years ago
[static runtime] Shortcut resize_({0}) Summary: We do a lot of resize_({0}) to force `out` operators to properly resize their results, and `resize_` does a fair bit of extraneous work (e.g. trip through dispatch, checks for memory_format and named tensors, etc.). If we strip it down to the bare minimum it's just setting the sizes to 0, so lets do that directly. Test Plan: Perf results suggest maybe a 1% win: ``` batch 20: P163138256 (large win, 1.7%, mostly in fb_fc_out) batch 1: P163139591 (smaller win, 0.88%, mostly in resize_) ``` Reviewed By: swolchok Differential Revision: D25932595 fbshipit-source-id: d306a0a15c0e1be12fde4a7f149e3ed35665e3c0
Author
Parents
Loading