change dropout lowering in symbolic_script (#18375)
authorNatalia Gimelshein <ngimelshein@nvidia.com>
Tue, 26 Mar 2019 02:57:06 +0000 (19:57 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 26 Mar 2019 03:05:11 +0000 (20:05 -0700)
commitba4de667fa578c84a255da3ef57948e14af7f01a
tree6eea215188d14bdcaabc77f25df92635a0ac65bb
parenta40e0a7f2d235586237122e92561eef13169bb8f
change dropout lowering in symbolic_script (#18375)

Summary:
Dropout is now eligible for fusion, and generated fused kernels are just as fast as dropout in ATen. Change its lowering in symbolic script so that it can actually be fused. Still special-cased for cuda, because without fusion this lowering is less efficient than current (bernoulli_ * input). Testing is covered by the test case that ailzhang added (test_dropout_cuda).
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18375

Differential Revision: D14611938

Pulled By: soumith

fbshipit-source-id: 11b18f4784e6c9265e382a8f8deca7add8df3b37
test/test_jit.py
torch/csrc/jit/symbolic_script.cpp