Commit Graph

8 Commits

Author SHA1 Message Date
Jane Xu
6707dfeefb Remove 9.2 related macros for CONSTEXPR (#65066)
Summary:
Removes C10_HOST_CONSTEXPR_EXCEPT_CUDA92 references in the code

Pull Request resolved: https://github.com/pytorch/pytorch/pull/65066

Reviewed By: driazati

Differential Revision: D31022520

Pulled By: janeyx99

fbshipit-source-id: f02cdc6caba5b48405575242921f5845ff18f729
2021-09-17 17:31:20 -07:00
Sebastian Messmer
c95d46abbd Remove C++11 compatibility from c10::util::crc64_t (#30920)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/30920

deletecode
ghstack-source-id: 95255641

Test Plan: waitforsandcastle

Differential Revision: D18869640

fbshipit-source-id: c3d7f4e1a29caff9fd8a8141c258f6f1c3fd830c
2019-12-15 23:43:02 -08:00
Sebastian Messmer
6e1e09fd10 Compile time type names (#26618)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/26618

Implement a mechanism to get type names at compile time
In a future diff, I'm planning to introduce this to caffe2::TypeMeta and a few other places.
ghstack-source-id: 95337871

Test Plan: unit tests

Differential Revision: D17519253

fbshipit-source-id: e14017f962fd181d147accb3f53fa8d6ee42a3f8
2019-12-14 20:29:11 -08:00
Sebastian Messmer
d9de2e0ba9 Back out "Revert D17936166: [wip] Constexpr type ids" (#28155)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/28155

Original commit changeset: 92c63a96dedd
ghstack-source-id: 92051874

Test Plan: unit tests

Differential Revision: D17964410

fbshipit-source-id: 1d989d28b3e1de6d43c915f122f2b65a77a332eb
2019-10-16 18:24:04 -07:00
Lu Fang
1819fade35 Revert D17936166: [wip] Constexpr type ids
Test Plan: revert-hammer

Differential Revision:
D17936166

Original commit changeset: 68cfa926c721

fbshipit-source-id: 92c63a96dedd8764e342c6437c6ea308d93d29b2
2019-10-16 06:47:10 -07:00
Sebastian Messmer
9cc4405dc9 Constexpr type ids (#28023)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/28023

ghstack-source-id: 91987335

Test Plan: waitforsandcastle

Differential Revision: D17936166

fbshipit-source-id: 68cfa926c721e5fbc96e083eb47e784bf34a9df4
2019-10-15 21:21:20 -07:00
Sebastian Messmer
ef8bcfe2c7 Revert D17488861: constexpr type ids
Test Plan: revert-hammer

Differential Revision:
D17488861

Original commit changeset: ce7b059d7c86

fbshipit-source-id: 426fca9abe7122190fc17ac6976bc6bcbd5718df
2019-10-15 09:59:21 -07:00
Sebastian Messmer
6f865c1e37 constexpr type ids (#26502)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/26502

Create type ids at compile time instead of incrementing a counter at runtime. This is done by computing a compile time crc64 on the type name. We couldn't do this before, because we still used GCC4 and that compiler didn't support the use of `__PRETTY_FUNCTION__` in a constexpr context. However, since GCC5 this is possible and we can use this trick.

This does not change the semantics of preallocated type ids. I actually think we don't need to preallocate anymore, but I split the removal of preallocation into a separate diff to be able to test it separately.

ghstack-source-id: 91896920

Test Plan: unit tests

Differential Revision: D17488861

fbshipit-source-id: ce7b059d7c8686b69cb091a4a8beaf4b96391343
2019-10-15 08:47:09 -07:00