!31239 [GraphKernel] fix akg build in lite.

Merge pull request !31239 from chenlei_autodiff/lite_callback
This commit is contained in:
i-robot 2022-03-15 01:54:55 +00:00 committed by Gitee
commit 593553dc9b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 5 additions and 1 deletions

View File

@ -104,12 +104,16 @@ bool CompileJsonsInList(const std::string &dir_path, const std::vector<std::stri
exit(1);
}
} else {
bool all_process_pass{true};
for (size_t j = 0; j < PROCESS_LIMIT; ++j) {
int status = 0;
waitpid(child_process[j], &status, 0);
// kill child process of child process if overtime
kill(-child_process[j], SIGTERM);
return RetStatus(status);
all_process_pass = RetStatus(status) && all_process_pass;
}
if (all_process_pass) {
return true;
}
}
return false;