pytorch
cf01f53b - Remove preallocation of type ids (#26509)

Commit
5 years ago
Remove preallocation of type ids (#26509) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/26509 We preallocated type ids to align them with ScalarType. At that point, the maximum type id was 10 and we used 11 to specify undefined type id, see https://github.com/pytorch/pytorch/pull/10139. However, since then, ScalarType got more additions, 11 isn't undefined anymore, and numbers 11-15 have meaning. caffe2::TypeIdentifier also got its separate additions, 12 and upwards have meaning that differs from ScalarType. I'm going with the (CI-tested) assumption that caffe2::TypeIdentifier and ScalarType actually don't need to be aligned and remove the functionality for preallocated type ids. This simplifies our type ids. ghstack-source-id: 91896918 Test Plan: unit tests Differential Revision: D17490109 fbshipit-source-id: 800c340d9d3556a99f6e3ffc33af14ad68d7cc59
Author
Parents
Loading