Allow types as node attributes (#26268)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/26268
This is necessary to represent operators like isinstance where
the type needs to be recorded in the node.
This diff does not actually use the attributes for anything yet.
One plausible thing to do in the future would be use attributes to
fill in the values of type variables for nodes whose schema include
type variables rather than rematching them from the arguments. However,
this change is not required for isinstance so I have left it for later.
Test Plan: Imported from OSS
Differential Revision: D17412855
Pulled By: zdevito
fbshipit-source-id: 7a2618c8a9f9dfc94858af79afbf433518eda4b3