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

Function GetNodeCPUMemZoneId

oneflow/core/memory/memory_zone.cpp:35–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33const MemZoneId kInvalidMemZoneId = MemZoneId{0, DeviceType::kInvalidDevice, 0};
34
35MemZoneId GetNodeCPUMemZoneId(MemZoneId::rank_t node_index) {
36 return MemZoneId{node_index, DeviceType::kCPU, 0};
37}
38
39int64_t EncodeMemZoneIdToInt64(const MemZoneId& mem_zone_id) {
40 int64_t id = static_cast<int64_t>(mem_zone_id.device_index());

Callers 3

MemZoneId121Method · 0.85
GetProxyNodeMethod · 0.85
FOR_RANGEFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected