forked from mindspore-Ecosystem/mindspore
!23528 Set default work stream id of ErrorManager
Merge pull request !23528 from tanghuikang/error_manager_workstreamid
This commit is contained in:
commit
e00b51ce35
|
@ -1905,6 +1905,8 @@ void AscendSession::ReportErrorMessage() {
|
|||
}
|
||||
}
|
||||
|
||||
void AscendSession::SetThreadContext() { ErrorManager::GetInstance().GenWorkStreamIdDefault(); }
|
||||
|
||||
void AscendSession::ExecuteAllTaskInQueue() {
|
||||
// Execute All Task
|
||||
auto &task_manager = PynativeTaskManager::GetInstance();
|
||||
|
|
|
@ -78,6 +78,7 @@ class AscendSession : public SessionBasic {
|
|||
std::string GetCommWorldGroup() override { return kHcclWorldGroup; }
|
||||
void ReportWarningMessage() override;
|
||||
void ReportErrorMessage() override;
|
||||
void SetThreadContext() override;
|
||||
void ExecuteAllTaskInQueue() override;
|
||||
void UpdateOutputTensors(const VectorRef *outputs,
|
||||
const std::map<tensor::TensorPtr, session::KernelWithIndex> &tensor_to_node,
|
||||
|
|
|
@ -214,6 +214,9 @@ void Executor::WorkerLoop() {
|
|||
return;
|
||||
}
|
||||
try {
|
||||
if (task->session_ != nullptr) {
|
||||
task->session_->SetThreadContext();
|
||||
}
|
||||
task->Run();
|
||||
if (task->session_ != nullptr) {
|
||||
task->session_->ReportWarningMessage();
|
||||
|
|
|
@ -155,6 +155,7 @@ class SessionBasic : public std::enable_shared_from_this<SessionBasic> {
|
|||
static void RunOpHideNopNode(const KernelGraphPtr &kernel_graph);
|
||||
virtual void ReportWarningMessage() {}
|
||||
virtual void ReportErrorMessage() {}
|
||||
virtual void SetThreadContext() {}
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
// set debugger
|
||||
void SetDebugger() {
|
||||
|
|
Loading…
Reference in New Issue