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

Method GetDevice

oneflow/core/hardware/node_device_descriptor.cpp:276–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

274}
275
276std::shared_ptr<const DeviceDescriptor> NodeDeviceDescriptor::GetDevice(
277 const std::string& class_name, size_t ordinal) const {
278 const auto device_list = GetDeviceDescriptorList(class_name);
279 if (device_list) {
280 return device_list->GetDevice(ordinal);
281 } else {
282 return nullptr;
283 }
284}
285
286size_t NodeDeviceDescriptor::HostMemorySizeBytes() const { return impl_->host_memory_size_bytes; }
287

Calls

no outgoing calls

Tested by

no test coverage detected