Make ValType hashable. (#35917)
Summary:
Build fix stemming from https://github.com/pytorch/pytorch/issues/34785
Pull Request resolved: https://github.com/pytorch/pytorch/pull/35917
Differential Revision: D20829353
Pulled By: soumith
fbshipit-source-id: 4ba84ecedd354efbc9ac47c9b0f0e3871b404f13