MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / GetDeviceCount

Function GetDeviceCount

oneflow/core/job/parallel_desc.cpp:35–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33namespace {
34
35int64_t GetDeviceCount(DeviceType device_type) {
36 return Singleton<ep::DeviceManagerRegistry>::Get()->GetDeviceCount(device_type);
37}
38
39using MachineId2DeviceIdList =
40 std::shared_ptr<HashMap<int64_t, std::shared_ptr<std::vector<int64_t>>>>;

Callers 2

CheckDeviceIdsIsValidMethod · 0.70
GetDeviceCountMethod · 0.50

Calls 2

GetFunction · 0.85
GetDeviceCountMethod · 0.45

Tested by

no test coverage detected