pytorch
0e371e41 - [fx-acc] add automated graph opt testing using AccOpProperty (#67228)

Commit
3 years ago
[fx-acc] add automated graph opt testing using AccOpProperty (#67228) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/67228 We added `AccOpProperty` for easy enablement of graph opts for new acc ops based on general properties. This diff adds 1. `AccOpProperty.unary` 2. Automated testing for acc ops with both `AccOpProperty.unary` and `AccOpProperty.pointwise` with `sink_reshape_ops` graph opt. [Adds coverage for 30 more acc_ops] 3. Refactors `graph_opts/TARGETS` to collect all graph optimizations into a common library 4. replaces `def foo(*, input, acc_out_ty=None): assert acc_out_ty is not None` with just `def foo(*, input, acc_out_ty)`. Let me know if there is some hidden purpose to the other implementation. 5. adds `AccOpProperty.*` flags to appropriate ops. Test Plan: `buck test mode/dev glow/fb/fx/graph_opts:test_fx_sink` ``` ... Summary Pass: 31 ListingSuccess: 1 If you need help understanding your runs, please follow the wiki: https://fburl.com/posting_in_tpx_users Finished test run: https://www.internalfb.com/intern/testinfra/testrun/4222124724581304 ``` Also ran ``` `buck test mode/dev glow/fb/fx/acc_tracer:` ``` ``` ... Summary Pass: 136 ListingSuccess: 4 If you need help understanding your runs, please follow the wiki: https://fburl.com/posting_in_tpx_users Finished test run: https://www.internalfb.com/intern/testinfra/testrun/5910974582823618 ``` Reviewed By: jfix71 Differential Revision: D31671833 fbshipit-source-id: aa16d1008f18f7c8626058361efff33843de3505
Author
Parents
Loading