mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Fix deviceCount on FakeGuardImpl. (#18745)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/18745 ghimport-source-id: 3ed111efe83b3061652869e33d9b5910b7daa732 Differential Revision: D14759198 Pulled By: ezyang fbshipit-source-id: 70a8db767f310fe0e0079c7b0693e9330d7cd472
This commit is contained in:
committed by
Facebook Github Bot
parent
486fae563d
commit
52a3a51490
@ -55,7 +55,7 @@ struct FakeGuardImpl final : public DeviceGuardImplInterface {
|
||||
return Stream(Stream::UNSAFE, s.device(), old_id);
|
||||
}
|
||||
DeviceIndex deviceCount() const noexcept override {
|
||||
return 1;
|
||||
return kFakeGuardImplMaxDevices;
|
||||
}
|
||||
// Convenience methods for testing
|
||||
static DeviceIndex getDeviceIndex() {
|
||||
|
Reference in New Issue
Block a user