MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TFE_ContextListDevices

Function TFE_ContextListDevices

tensorflow/c/eager/c_api.cc:415–422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

413void TFE_DeleteContext(TFE_Context* ctx) { delete ctx; }
414
415TF_DeviceList* TFE_ContextListDevices(TFE_Context* ctx, TF_Status* status) {
416 TF_DeviceList* list = new TF_DeviceList;
417 ctx->context->local_device_mgr()->ListDeviceAttributes(&list->response);
418 if (ctx->context->remote_device_mgr()) {
419 ctx->context->remote_device_mgr()->ListDeviceAttributes(&list->response);
420 }
421 return list;
422}
423
424void TFE_ContextClearCaches(TFE_Context* ctx) { ctx->context->ClearCaches(); }
425

Callers 4

GetDeviceNameFunction · 0.85
TESTFunction · 0.85

Calls 3

ListDeviceAttributesMethod · 0.80
local_device_mgrMethod · 0.80
remote_device_mgrMethod · 0.45

Tested by 4

GetDeviceNameFunction · 0.68
TESTFunction · 0.68