forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix FakeTensor printing (pytorch#99205)
I got too confused by the FakeTensor printing, so this PR fixes it to print normally. Before: ``` with FakeTensorMode(): x = torch.empty(2, 2, device="cpu") print(x) # FakeTensor(FakeTensor(..., device='meta', shape=(2, 2)), cpu) ``` After (Tensor printing doesn't print the default device): ``` FakeTensor(..., shape=(2, 2)) ``` Test Plan: - new test Pull Request resolved: pytorch#99205 Approved by: https://github.com/eellison
- Loading branch information
1 parent
20a90a1
commit 57e1a50
Showing
3 changed files
with
12 additions
and
8 deletions.
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
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