-
Notifications
You must be signed in to change notification settings - Fork 607
[ET-Ext] Enable operator<< for Half tensor data #3779
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Useful for debugging `Half` i.e. `fp16` models. Differential Revision: [D57977366](https://our.internmc.facebook.com/intern/diff/D57977366/) [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/3779
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ✅ No FailuresAs of commit 68c822f with merge base e650dd9 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This pull request was exported from Phabricator. Differential Revision: D57977366 |
Useful for debugging `Half` i.e. `fp16` models. Differential Revision: [D57977366](https://our.internmc.facebook.com/intern/diff/D57977366/) ghstack-source-id: 228310784 Pull Request resolved: #3779
Useful for debugging `Half` i.e. `fp16` models, when we have `EValue`s that are `Half` dtype and we do the following: ``` std::cout << "===== INPUT =====" << std::endl; for (EValue& v : inputs) { std::cout << v << std::endl; } std::cout << "===== OUTPUT =====" << std::endl; for (EValue& v : outputs) { std::cout << v << std::endl; } ``` ## Before ``` ===== INPUT ===== tensor(sizes=[1, 3, 96, 72], [<unhandled scalar type 5>]) ===== OUTPUT ===== tensor(sizes=[1, 2, 96, 72], [<unhandled scalar type 5>]) ``` ## After ``` ===== INPUT ===== tensor(sizes=[1, 3, 96, 72], [0.279785, 0.271484, 0.364746, ..., 0.150391, 0.836426, 0.019043]) ===== OUTPUT ===== tensor(sizes=[1, 2, 96, 72], [18.2344, -10.0938, 1.35059, ..., -33.6875, 4.07422, -22.5312]) ``` Differential Revision: [D57977366](https://our.internmc.facebook.com/intern/diff/D57977366/) [ghstack-poisoned]
This pull request was exported from Phabricator. Differential Revision: D57977366 |
Pull Request resolved: #3779 Useful for debugging `Half` i.e. `fp16` models, when we have `EValue`s that are `Half` dtype and we do the following: ``` std::cout << "===== INPUT =====" << std::endl; for (EValue& v : inputs) { std::cout << v << std::endl; } std::cout << "===== OUTPUT =====" << std::endl; for (EValue& v : outputs) { std::cout << v << std::endl; } ``` ## Before ``` ===== INPUT ===== tensor(sizes=[1, 3, 96, 72], [<unhandled scalar type 5>]) ===== OUTPUT ===== tensor(sizes=[1, 2, 96, 72], [<unhandled scalar type 5>]) ``` ## After ``` ===== INPUT ===== tensor(sizes=[1, 3, 96, 72], [0.279785, 0.271484, 0.364746, ..., 0.150391, 0.836426, 0.019043]) ===== OUTPUT ===== tensor(sizes=[1, 2, 96, 72], [18.2344, -10.0938, 1.35059, ..., -33.6875, 4.07422, -22.5312]) ``` Differential Revision: [D57977366](https://our.internmc.facebook.com/intern/diff/D57977366/) ghstack-source-id: 228335774
Useful for debugging `Half` i.e. `fp16` models, when we have `EValue`s that are `Half` dtype and we do the following: ``` std::cout << "===== INPUT =====" << std::endl; for (EValue& v : inputs) { std::cout << v << std::endl; } std::cout << "===== OUTPUT =====" << std::endl; for (EValue& v : outputs) { std::cout << v << std::endl; } ``` ## Before ``` ===== INPUT ===== tensor(sizes=[1, 3, 96, 72], [<unhandled scalar type 5>]) ===== OUTPUT ===== tensor(sizes=[1, 2, 96, 72], [<unhandled scalar type 5>]) ``` ## After ``` ===== INPUT ===== tensor(sizes=[1, 3, 96, 72], [0.279785, 0.271484, 0.364746, ..., 0.150391, 0.836426, 0.019043]) ===== OUTPUT ===== tensor(sizes=[1, 2, 96, 72], [18.2344, -10.0938, 1.35059, ..., -33.6875, 4.07422, -22.5312]) ``` Differential Revision: [D57977366](https://our.internmc.facebook.com/intern/diff/D57977366/) [ghstack-poisoned]
This pull request was exported from Phabricator. Differential Revision: D57977366 |
Pull Request resolved: #3779 Useful for debugging `Half` i.e. `fp16` models, when we have `EValue`s that are `Half` dtype and we do the following: ``` std::cout << "===== INPUT =====" << std::endl; for (EValue& v : inputs) { std::cout << v << std::endl; } std::cout << "===== OUTPUT =====" << std::endl; for (EValue& v : outputs) { std::cout << v << std::endl; } ``` ## Before ``` ===== INPUT ===== tensor(sizes=[1, 3, 96, 72], [<unhandled scalar type 5>]) ===== OUTPUT ===== tensor(sizes=[1, 2, 96, 72], [<unhandled scalar type 5>]) ``` ## After ``` ===== INPUT ===== tensor(sizes=[1, 3, 96, 72], [0.279785, 0.271484, 0.364746, ..., 0.150391, 0.836426, 0.019043]) ===== OUTPUT ===== tensor(sizes=[1, 2, 96, 72], [18.2344, -10.0938, 1.35059, ..., -33.6875, 4.07422, -22.5312]) ``` ghstack-source-id: 228346052 Differential Revision: [D57977366](https://our.internmc.facebook.com/intern/diff/D57977366/)
Useful for debugging `Half` i.e. `fp16` models, when we have `EValue`s that are `Half` dtype and we do the following: ``` std::cout << "===== INPUT =====" << std::endl; for (EValue& v : inputs) { std::cout << v << std::endl; } std::cout << "===== OUTPUT =====" << std::endl; for (EValue& v : outputs) { std::cout << v << std::endl; } ``` ## Before ``` ===== INPUT ===== tensor(sizes=[1, 3, 96, 72], [<unhandled scalar type 5>]) ===== OUTPUT ===== tensor(sizes=[1, 2, 96, 72], [<unhandled scalar type 5>]) ``` ## After ``` ===== INPUT ===== tensor(sizes=[1, 3, 96, 72], [0.279785, 0.271484, 0.364746, ..., 0.150391, 0.836426, 0.019043]) ===== OUTPUT ===== tensor(sizes=[1, 2, 96, 72], [18.2344, -10.0938, 1.35059, ..., -33.6875, 4.07422, -22.5312]) ``` Differential Revision: [D57977366](https://our.internmc.facebook.com/intern/diff/D57977366/) [ghstack-poisoned]
This pull request was exported from Phabricator. Differential Revision: D57977366 |
This pull request has been merged in 8c8d965. |
Pull Request resolved: pytorch/executorch#3779 Useful for debugging `Half` i.e. `fp16` models, when we have `EValue`s that are `Half` dtype and we do the following: ``` std::cout << "===== INPUT =====" << std::endl; for (EValue& v : inputs) { std::cout << v << std::endl; } std::cout << "===== OUTPUT =====" << std::endl; for (EValue& v : outputs) { std::cout << v << std::endl; } ``` ## Before ``` ===== INPUT ===== tensor(sizes=[1, 3, 96, 72], [<unhandled scalar type 5>]) ===== OUTPUT ===== tensor(sizes=[1, 2, 96, 72], [<unhandled scalar type 5>]) ``` ## After ``` ===== INPUT ===== tensor(sizes=[1, 3, 96, 72], [0.279785, 0.271484, 0.364746, ..., 0.150391, 0.836426, 0.019043]) ===== OUTPUT ===== tensor(sizes=[1, 2, 96, 72], [18.2344, -10.0938, 1.35059, ..., -33.6875, 4.07422, -22.5312]) ``` ghstack-source-id: 228461839 Differential Revision: [D57977366](https://our.internmc.facebook.com/intern/diff/D57977366/)
Stack from ghstack (oldest at bottom):
Useful for debugging
Half
i.e.fp16
models, when we haveEValue
s that areHalf
dtype and we do the following:Before
After
Differential Revision: D57977366