Skip to content

Remove unnecessary check on device option pointer#11845

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

Remove unnecessary check on device option pointer#11845
yinghai wants to merge 1 commit intopytorch:masterfrom
yinghai:export-D9929828

Conversation

@yinghai
Copy link
Contributor

@yinghai yinghai commented Sep 19, 2018

Summary:
The device pointer will be used by cudaPointerGetAttributes, which handles nullptr already. So this check is not necessary.

https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__UNIFIED.html#group__CUDART__UNIFIED_1gd89830e17d399c064a2f3c3fa8bb4390

Differential Revision: D9929828

Summary:
The device pointer will be used by cudaPointerGetAttributes, which handles nullptr already. So this check is not necessary.

https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__UNIFIED.html#group__CUDART__UNIFIED_1gd89830e17d399c064a2f3c3fa8bb4390

Differential Revision: D9929828

fbshipit-source-id: 743d2af6087a9a0c73717170eb982bc521759535
@yinghai yinghai deleted the export-D9929828 branch September 20, 2018 00:21
@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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants