Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18485
I don't know how (1) we landed the wrong version of the patch and (2) how
this passed the push blocking test
Reviewed By: pjh5
Differential Revision:
D14621961
fbshipit-source-id:
0a3953d7adcdc79727a61c2acff65f436dcafe55
// Clear out the error state, so we don't spuriously trigger someone else.
// (This shouldn't really matter, since we won't be running very much CUDA
// code in this regime.)
- cudaGetLastError();
+ cudaError_t last_err = cudaGetLastError();
+ (void)last_err;
return 0;
}
return static_cast<DeviceIndex>(count);