cast return of cudaGetLastError() to void when discarding (#62518)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/62511.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/62518
Reviewed By: walterddr, janeyx99
Differential Revision: D30029858
Pulled By: malfet
fbshipit-source-id: d47ce4e507ac800b4e5a5e0a8d9a6fabdfd28e6d