pytorch/caffe2/python/test
Ahmed Aly f8778aef78 Implement a Caffe2 standalone LSTM operator (#17726)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/17726

Pull Request resolved: https://github.com/pytorch/pytorch/pull/17725

Pull Request resolved: https://github.com/pytorch/pytorch/pull/17461

Implementing a standalone LSTM Operator in Caffe2 adopted from this Aten implementation: diffusion/FBS/browse/master/fbcode/caffe2/aten/src/ATen/native/RNN.cpp. The most tricky thing in this exercise was that caffe2::Tensor has no copy constructor that made it necessary to implement a custom templated copy constructor for the different Tensor containers used in the code. Also there was no way to use off-the-shelf C2 operators in my code easily so I had to copy some code that is doing basic matmul, cat, split, transpose and linear as utility functions.

Two things missing:

- Profiling this implementation against the current ONNXified LSTM op
- Make this operator available to use in PyTorch

Reviewed By: dzhulgakov

Differential Revision: D14351575

fbshipit-source-id: 3b99b53212cf593c7a49e45580b5a07b90809e64
2019-03-07 01:08:49 -08:00
..
__init__.py Add __init__.py so files get picked up on install (#14898) 2018-12-07 13:40:23 -08:00
blob_deallocation_test.py Fix crash in blob deallocation 2017-10-10 19:03:01 -07:00
do_op_test.py DoOp reuse workspace and test 2017-10-12 13:37:34 -07:00
executor_test_util.py Fix occasional test timeouts 2018-01-19 20:08:58 -08:00
executor_test.py Unify gpu_support variable in python tests (#16748) 2019-02-07 00:29:51 -08:00
inference_lstm_op_test.py Implement a Caffe2 standalone LSTM operator (#17726) 2019-03-07 01:08:49 -08:00