specialized CUDA impl for dropout in AD (#17756)
authorAiling Zhang <ailzhang@fb.com>
Tue, 19 Mar 2019 17:20:06 +0000 (10:20 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 19 Mar 2019 17:34:15 +0000 (10:34 -0700)
commita50ba7e2384b96e4b52fbec39f644e29a76a0a4f
tree50f4405a5792e936889b7b5ce9986d0c30f8c386
parent9a153412fd4f78b9a9b59bbf85a358339fb69613
specialized CUDA impl for dropout in AD (#17756)

Summary:
In aten we have a _fused_dropout implementation for CUDA case. As ngimel suggested if we discard it in JIT AD, it hurts performance.

It doesn't seem ideal to include backend specific implementation in AD, but this is helpful to prevent performance regression atm.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/17756

Differential Revision: D14368999

Pulled By: ailzhang

fbshipit-source-id: 9a371c5020f630e8f6e496849ec9772b6f196169
test/test_jit.py
torch/csrc/jit/passes/shape_analysis.cpp
torch/csrc/jit/symbolic_script.cpp