MCPcopy Create free account
hub / github.com/OAID/Tengine / OnGetGraphPerfAttr

Method OnGetGraphPerfAttr

driver/cpu/cpu_driver.cpp:452–470  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

450}
451
452bool CPUDriver::OnGetGraphPerfAttr(DevContext* context, Subgraph* graph, const char* name, void* buf, int size)
453{
454 if(size != sizeof(GraphPerfMsg))
455 {
456 set_tengine_errno(EINVAL);
457 return false;
458 }
459
460 GraphPerfMsg* msg = ( GraphPerfMsg* )(buf);
461
462 CPUDevice* dev = context->dev;
463
464 msg->ret_number = dev->GetGraphPerfStat(graph, msg->buf, msg->buf_size);
465
466 if(msg->ret_number >= 0)
467 return true;
468 else
469 return false;
470}
471
472bool CPUDriver::OnSetNodeDumpAttr(DevContext* context, Subgraph* graph, const char* name, const void* buf, int size)
473{

Callers

nothing calls this directly

Calls 2

set_tengine_errnoFunction · 0.85
GetGraphPerfStatMethod · 0.45

Tested by

no test coverage detected