summaryrefslogtreecommitdiff
path: root/third_party
diff options
context:
space:
mode:
authorGregory Chanan <gchanan@fb.com>2019-03-15 14:16:22 -0700
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>2019-03-15 14:21:46 -0700
commitd1843d41736370bbfce55ce207e6dca6bf1e6a7d (patch)
tree5ab24a252a9825f2d1c7e2b73fd59a2686867c06 /third_party
parentf3806094d5fd632aa8ab23eb37c320cd731e44e4 (diff)
downloadpytorch-d1843d41736370bbfce55ce207e6dca6bf1e6a7d.tar.gz
pytorch-d1843d41736370bbfce55ce207e6dca6bf1e6a7d.tar.bz2
pytorch-d1843d41736370bbfce55ce207e6dca6bf1e6a7d.zip
Add backwards compatibility and other fixes to Dispatch macros. (#17996)
Summary: Changes: 1) https://github.com/pytorch/pytorch/pull/17527 changed dispatch macros to be ScalarType based instead of at::Type based. This broke cpp extensions that relied on dispatch macros. Since IMO these should be ScalarType based (and some extensions have already updated), we allow either at::Type or at::ScalarType to be passed, but passing at::Type will result in a deprecated warning. 2) Reintroduce macros that were deleted (AT_DISPATCH_ALL_TYPES_AND_HALF, AT_DISPATCH_COMPLEX_TYPES, AT_DISPATCH_ALL_TYPES_AND_HALF_AND_COMPLEX, AT_DISPATCH_ALL_TYPES_AND_COMPLEX); the AND_HALF ones now give a deprecated warning because there are more extensible macros that were introduced in their place. 3) Makes AT_DISPATCH_ALL_TYPES_AND_COMPLEX_AND into a ScalarType based macro (and updates usages). This was the result of a logical merge conflicts. 4) Adds a new macro, C10_DEPRECATED_MESSAGE for passing a deprecated message to the compiler. I didn't spend much time seeing if this can be enabled for versions before C++14. Pull Request resolved: https://github.com/pytorch/pytorch/pull/17996 Reviewed By: ezyang Differential Revision: D14446203 Pulled By: gchanan fbshipit-source-id: 1da56e2e9c15aa8f913ebbf6bf1110c5b6dc375e
Diffstat (limited to 'third_party')
0 files changed, 0 insertions, 0 deletions