Browse Source

!1972 mmSetCurrentThreadName

Merge pull request !1972 from 张晓昆/master
tags/v1.5.1
i-robot Gitee 3 years ago
parent
commit
1ab71c9790
2 changed files with 6 additions and 1 deletions
  1. +1
    -1
      ge/graph/execute/model_executor.cc
  2. +5
    -0
      tests/depends/mmpa/src/mmpa_stub.cc

+ 1
- 1
ge/graph/execute/model_executor.cc View File

@@ -193,7 +193,7 @@ Status ModelExecutor::PushGraph(const RunArgs &args) {


void ModelExecutor::RunThread() { void ModelExecutor::RunThread() {
ErrorManager::GetInstance().SetStage(error_message::kModelExecute, error_message::kModelExecute); ErrorManager::GetInstance().SetStage(error_message::kModelExecute, error_message::kModelExecute);
if (prctl(PR_SET_NAME, ("GE_Run")) != 0) {
if (mmSetCurrentThreadName("GE_Run") != EN_OK) {
GELOGW("Set thread name failed."); GELOGW("Set thread name failed.");
} }




+ 5
- 0
tests/depends/mmpa/src/mmpa_stub.cc View File

@@ -381,3 +381,8 @@ INT32 mmGetPid()
{ {
return (INT32)getpid(); return (INT32)getpid();
} }

INT32 mmSetCurrentThreadName(const CHAR *name)
{
return EN_OK;
}

Loading…
Cancel
Save