pytorch/caffe2/python/models
Aapo Kyrola 86e3e008e0 optimize RNN executor subnet construction for forward-only models
Summary:
RNN executor had a disadvantage to plain nets when running in forward-only mode: for plain nets, we only create two workspaces and two nets and alternate between them. With RNN executor, we had only four workspaces (4 > 2 because it was faster in some cases), but the nets (or rather the ops) were created for each of the timesteps. This has significant overhead. This diff changes this sos that if executor is is forward-only mode (i.e has limited parallelism setting), then it will use the same operators as the t - 4'th net -- excluding the ops that require the timestep blob. The latter exception is required because RNN executor needs different timestep blob for each timestep because it cannot modify the value of the timestep blob like when running nets in a loop.

Also removed redundancy in the dependency computation and added a debug flag to the executor that outputs the description of the rnn contents.

Reviewed By: salexspb

Differential Revision: D6155510

fbshipit-source-id: c47f727d2128649b081270d15020a08d41e5748d
2017-10-30 12:24:12 -07:00
..
seq2seq optimize RNN executor subnet construction for forward-only models 2017-10-30 12:24:12 -07:00
__sym_init__.py Re-license to Apache 2017-09-28 16:22:00 -07:00
download.py Re-license to Apache 2017-09-28 16:22:00 -07:00
resnet.py Updated resnet50_trainer and resnet for more FP16 support 2017-10-24 09:19:06 -07:00
resnet_test.py Re-license to Apache 2017-09-28 16:22:00 -07:00