Added deviceCount() virtual method to DeviceGuardImplInterface (#15574)
authorIgor Fedan <ifedan@fb.com>
Thu, 27 Dec 2018 23:24:22 +0000 (15:24 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 27 Dec 2018 23:36:32 +0000 (15:36 -0800)
commit62151aa259154a9206d812b16525fd5b55ce4a89
tree06e20915bef1b664debad8908403df0e72078d81
parent02a249ed922018a22c77ee8b106205027de93cc4
Added deviceCount() virtual method to DeviceGuardImplInterface (#15574)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15574

Added deviceCount() virtual method to DeviceGuardImplInterface, also added correspondent implementation for CPUGuardImpl, CUDAGuardImpl, FakeGuardImpl, VirtualGuardImpl, HIPGuardImplMasqueradingAsCUDA

Reviewed By: soumith

Differential Revision: D13554609

fbshipit-source-id: 913bf2aad44a0a356efe54505ee4abaf6c4622db
aten/src/ATen/detail/CPUGuardImpl.h
aten/src/ATen/hip/impl/HIPGuardImplMasqueradingAsCUDA.h
c10/cuda/impl/CUDAGuardImpl.h
c10/impl/DeviceGuardImplInterface.h
c10/impl/FakeGuardImpl.h
c10/impl/VirtualGuardImpl.h