SNIFAE Template Constructors of IValue (#34647) (#34843)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/34843
Currently, we use not_ok_to_boxing to filter Dimname that can not be
converted/constructed to IValue. The correct way should be SNIFAE the
constructor of IValue.
(Note: this ignores all push blocking failures!)
Test Plan:
PyTorch compiled after the code change.
All unit test passed
Imported from OSS
Differential Revision: D20494886
fbshipit-source-id: 91dfba6a41a3ae2d6ceba9d4124cbf612ea3f080