Assert if padding mask type is unexpected (#86353) (#87106)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/86353
Fix the issue described in
https://github.com/pytorch/pytorch/issues/86120
Test Plan: buck test mode/opt caffe2/test:test_transformers -- test_train_with_long_type_pad
Differential Revision: D40129968
Pull Request resolved: https://github.com/pytorch/pytorch/pull/87106
Approved by: https://github.com/malfet