forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix] repr(torch.device) (pytorch#48655)
Summary: Fixes pytorch#48585 In the following commit pytorch@4c9eb57, type of `DeviceIndex` was changed from `uint16_t` to `uint8_t`. `uint8_t` is treated as ascii chars by std::cout and other stream operators. Hence the broken `repr` Stackoverflow Reference: https://stackoverflow.com/questions/19562103/uint8-t-cant-be-printed-with-cout Pull Request resolved: pytorch#48655 Reviewed By: bdhirsh Differential Revision: D25272289 Pulled By: ezyang fbshipit-source-id: a1549f5f8d417138cf38795e4c373e3a487d3691
- Loading branch information
1 parent
b006c7a
commit 90a3049
Showing
2 changed files
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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