Register values listed in __constants__ as attributes of the Module. (#26581)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/26581
We're currently inlining immediate values of the constants directly into
IR when we generate it providing no way to access these values by their
names later. This change registers such values as atrtibutes of the
module so that they are not lost after IR generation.
Differential Revision: D17513451
Test Plan: Imported from OSS
Pulled By: ZolotukhinM
fbshipit-source-id: cf8f9b450e7178692211abd905ffd2d7ce5a6ce1
Author
Mikhail Zolotukhin