Introduce at::DeviceType, which subsumes at::Device::Type and (partially) caffe2::DeviceType#10175
Closed
ezyang wants to merge 5 commits intopytorch:masterfrom
Closed
Introduce at::DeviceType, which subsumes at::Device::Type and (partially) caffe2::DeviceType#10175ezyang wants to merge 5 commits intopytorch:masterfrom
ezyang wants to merge 5 commits intopytorch:masterfrom
Conversation
Contributor
Author
|
This PR is blocked on unifying |
Summary: It doesn't work with Caffe2; use AT_CORE_API from ATen/core/CoreAPI.h instead. Differential Revision: D9162467 fbshipit-source-id: ec072b8335c02ee6a18a399f74895bf940089a4d
Summary: nvcc only respects definitions, not options. Differential Revision: D9154388 fbshipit-source-id: 9e752ecfcdc672cb1a641b708c1027e205697e59
Summary: - New concept of a message stack; you can add messages using AppendMessage - New concept of a caller; it's just a way to pass along some arbitrary extra information in the exception Coming soon is changing Caffe2 to use at::Error instead of EnforceNotMet Differential Revision: D9139996 fbshipit-source-id: 78da78e6470fe7e6ae461d30b639820af1bd331d
Differential Revision: D9140095 fbshipit-source-id: a61820a4ffd21094aa6bf06527ef0a432de41937
…lly) caffe2::DeviceType (pytorch#10175) Summary: Pull Request resolved: pytorch#10175 Previously, we had at::Device::Type and caffe2::DeviceType (from protobuf), intended to help us distinguish between CPU, CUDA, etc. devices. This replaces at::Device::Type entirely with at::DeviceType, which in turn is a direct, 'enum class' version of the protobuf generated caffe2::DeviceType 'enum'. We can't eliminate the 'enum' because this would a pretty drastic API change (enum is interconvertible with integers, enum class is not) but we can make the two line up exactly and share code for, e.g., printing. Reviewed By: Yangqing Differential Revision: D9137156 fbshipit-source-id: 0ff672f28794d021e5c344635f272a62b61bd20e
zdevito
pushed a commit
to zdevito/ATen
that referenced
this pull request
Aug 4, 2018
…lly) caffe2::DeviceType (#10175) Summary: Pull Request resolved: pytorch/pytorch#10175 Previously, we had at::Device::Type and caffe2::DeviceType (from protobuf), intended to help us distinguish between CPU, CUDA, etc. devices. This replaces at::Device::Type entirely with at::DeviceType, which in turn is a direct, 'enum class' version of the protobuf generated caffe2::DeviceType 'enum'. We can't eliminate the 'enum' because this would a pretty drastic API change (enum is interconvertible with integers, enum class is not) but we can make the two line up exactly and share code for, e.g., printing. Reviewed By: Yangqing Differential Revision: D9137156 fbshipit-source-id: 566385cd6efb1ed722b25e6f7849a910b50342ab
goodlux
pushed a commit
to goodlux/pytorch
that referenced
this pull request
Aug 15, 2018
…lly) caffe2::DeviceType (pytorch#10175) Summary: Pull Request resolved: pytorch#10175 Previously, we had at::Device::Type and caffe2::DeviceType (from protobuf), intended to help us distinguish between CPU, CUDA, etc. devices. This replaces at::Device::Type entirely with at::DeviceType, which in turn is a direct, 'enum class' version of the protobuf generated caffe2::DeviceType 'enum'. We can't eliminate the 'enum' because this would a pretty drastic API change (enum is interconvertible with integers, enum class is not) but we can make the two line up exactly and share code for, e.g., printing. Reviewed By: Yangqing Differential Revision: D9137156 fbshipit-source-id: 566385cd6efb1ed722b25e6f7849a910b50342ab
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Previously, we had at::Device::Type and caffe2::DeviceType (from protobuf),
intended to help us distinguish between CPU, CUDA, etc. devices.
This replaces at::Device::Type entirely with at::DeviceType, which in turn
is a direct, 'enum class' version of the protobuf generated caffe2::DeviceType
'enum'. We can't eliminate the 'enum' because this would a pretty drastic
API change (enum is interconvertible with integers, enum class is not) but
we can make the two line up exactly and share code for, e.g., printing.
Differential Revision: D9137156