Skip to content

Fix tensor check logic in logging#10138

Closed
yinghai wants to merge 1 commit intopytorch:masterfrom
yinghai:export-D9115273
Closed

Fix tensor check logic in logging#10138
yinghai wants to merge 1 commit intopytorch:masterfrom
yinghai:export-D9115273

Conversation

@yinghai
Copy link
Contributor

@yinghai yinghai commented Aug 1, 2018

Summary:
Note that TensorCPU and TensorGPU are all refined to be Tensor now. Basically they are the same thing. So check like blob.IsType<TensorCPU>() is no longer safe as TensorGPU can pass the check too.

We need to systematically weed out the such usage in our codebase...
Differential Revision: D9115273

@yinghai yinghai requested a review from jerryzh168 August 1, 2018 19:18
Summary:
Pull Request resolved: pytorch#10138

Note that `TensorCPU` and `TensorGPU` are all refined to be `Tensor` now. Basically they are the same thing. So check like `blob.IsType<TensorCPU>()` is no longer safe as `TensorGPU` can pass the check too.

We need to systematically weed out the such usage in our codebase... @[100008320710723:jerryzh]

Differential Revision: D9115273

fbshipit-source-id: ea5ee8f5655fc9e600750d0f029857858b2cda9c
@yinghai yinghai deleted the export-D9115273 branch August 10, 2018 23:37
goodlux pushed a commit to goodlux/pytorch that referenced this pull request Aug 15, 2018
Summary:
Pull Request resolved: pytorch#10138

Note that `TensorCPU` and `TensorGPU` are all refined to be `Tensor` now. Basically they are the same thing. So check like `blob.IsType<TensorCPU>()` is no longer safe as `TensorGPU` can pass the check too.

We need to systematically weed out the such usage in our codebase... @[100008320710723:jerryzh]

Reviewed By: houseroad

Differential Revision: D9115273

fbshipit-source-id: 13b293c73691002eac34e095cdcd96c27183e875
@ezyang ezyang added the merged label Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants