Skip to content

Renumber typeid.h so that the number lines up with ScalarType#10139

Closed
ezyang wants to merge 1 commit intopytorch:masterfrom
ezyang:export-D9123058
Closed

Renumber typeid.h so that the number lines up with ScalarType#10139
ezyang wants to merge 1 commit intopytorch:masterfrom
ezyang:export-D9123058

Conversation

@ezyang
Copy link
Contributor

@ezyang ezyang commented Aug 1, 2018

Summary:
We want CaffeTypeId to be interconvertible with at::ScalarType, and
this means we should have the numbers line up exactly. Fortunately
this is not too hard to do.

Reviewed By: smessmer

Differential Revision: D9123058

…h#10139)

Summary:
Pull Request resolved: pytorch#10139

We want CaffeTypeId to be interconvertible with at::ScalarType, and
this means we should have the numbers line up exactly.  Fortunately
this is not too hard to do.

Reviewed By: smessmer

Differential Revision: D9123058

fbshipit-source-id: de5903e361896b46b70a48b0e9cb54d7e3344ab4
zdevito pushed a commit to zdevito/ATen that referenced this pull request Aug 2, 2018
Summary:
Pull Request resolved: pytorch/pytorch#10139

We want CaffeTypeId to be interconvertible with at::ScalarType, and
this means we should have the numbers line up exactly.  Fortunately
this is not too hard to do.

Reviewed By: smessmer

Differential Revision: D9123058

fbshipit-source-id: 7e9bd59ca25a552afe9d2d0a16cedc4f6311f911
goodlux pushed a commit to goodlux/pytorch that referenced this pull request Aug 15, 2018
…h#10139)

Summary:
Pull Request resolved: pytorch#10139

We want CaffeTypeId to be interconvertible with at::ScalarType, and
this means we should have the numbers line up exactly.  Fortunately
this is not too hard to do.

Reviewed By: smessmer

Differential Revision: D9123058

fbshipit-source-id: 7e9bd59ca25a552afe9d2d0a16cedc4f6311f911
@ezyang ezyang added the merged label Jun 26, 2019
smessmer added a commit that referenced this pull request Sep 20, 2019
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 #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.

Differential Revision: [D17490109](https://our.internmc.facebook.com/intern/diff/D17490109/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Sep 20, 2019
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 #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.

Differential Revision: [D17490109](https://our.internmc.facebook.com/intern/diff/D17490109/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Sep 20, 2019
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 #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.

Differential Revision: [D17490109](https://our.internmc.facebook.com/intern/diff/D17490109/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Sep 20, 2019
Pull Request resolved: #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 #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: 90483411

Differential Revision: [D17490109](https://our.internmc.facebook.com/intern/diff/D17490109/)
smessmer added a commit that referenced this pull request Sep 21, 2019
Pull Request resolved: #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 #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: 90547627

Differential Revision: [D17490109](https://our.internmc.facebook.com/intern/diff/D17490109/)
smessmer added a commit that referenced this pull request Sep 21, 2019
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 #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.

Differential Revision: [D17490109](https://our.internmc.facebook.com/intern/diff/D17490109/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Sep 21, 2019
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 #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.

Differential Revision: [D17490109](https://our.internmc.facebook.com/intern/diff/D17490109/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Sep 21, 2019
Pull Request resolved: #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 #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: 90552745

Differential Revision: [D17490109](https://our.internmc.facebook.com/intern/diff/D17490109/)
smessmer added a commit that referenced this pull request Sep 22, 2019
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 #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.

Differential Revision: [D17490109](https://our.internmc.facebook.com/intern/diff/D17490109/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Sep 22, 2019
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 #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.

Differential Revision: [D17490109](https://our.internmc.facebook.com/intern/diff/D17490109/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Sep 22, 2019
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 #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.

Differential Revision: [D17490109](https://our.internmc.facebook.com/intern/diff/D17490109/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Sep 22, 2019
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 #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.

Differential Revision: [D17490109](https://our.internmc.facebook.com/intern/diff/D17490109/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Sep 22, 2019
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 #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.

Differential Revision: [D17490109](https://our.internmc.facebook.com/intern/diff/D17490109/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Sep 22, 2019
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 #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.

Differential Revision: [D17490109](https://our.internmc.facebook.com/intern/diff/D17490109/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Sep 23, 2019
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 #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.

Differential Revision: [D17490109](https://our.internmc.facebook.com/intern/diff/D17490109/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Sep 24, 2019
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 #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.

Differential Revision: [D17490109](https://our.internmc.facebook.com/intern/diff/D17490109/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Sep 24, 2019
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 #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.

Differential Revision: [D17490109](https://our.internmc.facebook.com/intern/diff/D17490109/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Sep 24, 2019
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 #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.

Differential Revision: [D17490109](https://our.internmc.facebook.com/intern/diff/D17490109/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Sep 24, 2019
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 #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.

Differential Revision: [D17490109](https://our.internmc.facebook.com/intern/diff/D17490109/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Sep 24, 2019
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 #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.

Differential Revision: [D17490109](https://our.internmc.facebook.com/intern/diff/D17490109/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Sep 25, 2019
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 #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.

Differential Revision: [D17490109](https://our.internmc.facebook.com/intern/diff/D17490109/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Sep 25, 2019
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 #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.

Differential Revision: [D17490109](https://our.internmc.facebook.com/intern/diff/D17490109/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Sep 27, 2019
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 #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.

Differential Revision: [D17490109](https://our.internmc.facebook.com/intern/diff/D17490109/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Oct 14, 2019
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 #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.

Differential Revision: [D17490109](https://our.internmc.facebook.com/intern/diff/D17490109/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Oct 14, 2019
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 #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.

Differential Revision: [D17490109](https://our.internmc.facebook.com/intern/diff/D17490109/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Oct 14, 2019
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 #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.

Differential Revision: [D17490109](https://our.internmc.facebook.com/intern/diff/D17490109/)

[ghstack-poisoned]
smessmer added a commit that referenced this pull request Oct 14, 2019
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 #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.

Differential Revision: [D17490109](https://our.internmc.facebook.com/intern/diff/D17490109/)

[ghstack-poisoned]
facebook-github-bot pushed a commit that referenced this pull request Oct 15, 2019
Summary:
Pull Request resolved: #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 #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
thiagocrepaldi pushed a commit to thiagocrepaldi/pytorch that referenced this pull request Feb 4, 2020
Summary:
Pull Request resolved: pytorch#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 pytorch#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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant