Replace float16 with at::Half in caffe2#11676
Conversation
facebook-github-bot
left a comment
There was a problem hiding this comment.
li-roy has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
aten/src/ATen/core/typeid.h
Outdated
| // Make __f16 a fundamental type. | ||
| namespace std { | ||
| template<> | ||
| struct is_fundamental<at::Half> : std::integral_constant<bool, true> { |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
|
Please get a caffe2 person to review. |
aten/src/ATen/core/typeid.h
Outdated
| // Make __f16 a fundamental type. | ||
| namespace std { | ||
| template<> | ||
| struct is_fundamental<at::Half> : std::integral_constant<bool, true> { |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
caffe2/core/types.h
Outdated
| "Short on this platform is not 16 bit."); | ||
| namespace caffe2 { | ||
| typedef struct CAFFE2_API CAFFE2_ALIGNED(2) __f16 { uint16_t x; } float16; | ||
| typedef at::Half float16; |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
facebook-github-bot
left a comment
There was a problem hiding this comment.
li-roy has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
facebook-github-bot
left a comment
There was a problem hiding this comment.
li-roy has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
facebook-github-bot
left a comment
There was a problem hiding this comment.
li-roy has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Yangqing
left a comment
There was a problem hiding this comment.
Thanks for the PR! This looks great, own general comment about unification.
| "Short on this platform is not 16 bit."); | ||
| namespace caffe2 { | ||
| typedef struct CAFFE2_API CAFFE2_ALIGNED(2) __f16 { uint16_t x; } float16; | ||
| using float16 = at::Half; |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
facebook-github-bot
left a comment
There was a problem hiding this comment.
li-roy has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
facebook-github-bot
left a comment
There was a problem hiding this comment.
li-roy has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
facebook-github-bot
left a comment
There was a problem hiding this comment.
li-roy has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
facebook-github-bot
left a comment
There was a problem hiding this comment.
li-roy has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
Closing in favor of #11785. |
Summary: - Finishes unifying Half type in pytorch and caffe2 - As a side effect, aten_op works for fp16 now Pull Request resolved: pytorch#11676 Differential Revision: D9829019 fbshipit-source-id: e5f800024478c2e68ef29f4c06b4f0002f81a3f7
Summary: - Finishes unifying Half type in pytorch and caffe2 - As a side effect, aten_op works for fp16 now Pull Request resolved: #11676 Reviewed By: weiyangfb Differential Revision: D9829019 Pulled By: li-roy fbshipit-source-id: b8c9663873c10fe64c90ef180dc81af2e866674e
Summary: - Finishes unifying Half type in pytorch and caffe2 - As a side effect, aten_op works for fp16 now Pull Request resolved: pytorch/pytorch#11676 Reviewed By: weiyangfb Differential Revision: D9829019 Pulled By: li-roy fbshipit-source-id: b8c9663873c10fe64c90ef180dc81af2e866674e
Summary: - Finishes unifying Half type in pytorch and caffe2 - As a side effect, aten_op works for fp16 now Pull Request resolved: pytorch#11676 Reviewed By: weiyangfb Differential Revision: D9829019 Pulled By: li-roy fbshipit-source-id: b8c9663873c10fe64c90ef180dc81af2e866674e
Uh oh!
There was an error while loading. Please reload this page.