allow bools to be used as attributes (#19440)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/19440
ghimport-source-id: 9c962054d760526bf7da324b114455fcb1038521
Differential Revision: D15005723
Pulled By: suo
fbshipit-source-id: 75fc87ae33894fc34d3b913881defb7e6b8d7af0