Fix cuda softmax backward with empty input (#17259)
Summary:
Fixes #17256
Pull Request resolved: https://github.com/pytorch/pytorch/pull/17259
Differential Revision: D14142196
Pulled By: soumith
fbshipit-source-id: 1f2dc202951b59b43da27684f9f924314bcd3040