| @@ -232,9 +232,6 @@ Status InnerSession::GetVariable(const std::string &name, Tensor &val) { | |||||
| Status InnerSession::AddGraph(uint32_t graph_id, const Graph &graph) { | Status InnerSession::AddGraph(uint32_t graph_id, const Graph &graph) { | ||||
| std::map<std::string, std::string> options; | std::map<std::string, std::string> options; | ||||
| auto device_id = GetContext().DeviceId(); | |||||
| GELOGD("Device id is %u", device_id); | |||||
| ProfilingManager::Instance().SetGraphIdToDeviceMap(graph_id, device_id); | |||||
| return AddGraph(graph_id, graph, options); | return AddGraph(graph_id, graph, options); | ||||
| } | } | ||||
| @@ -248,6 +245,9 @@ Status InnerSession::AddGraph(uint32_t graph_id, const Graph &graph, | |||||
| session_id_, graph_id); | session_id_, graph_id); | ||||
| return GE_SESS_INIT_FAILED; | return GE_SESS_INIT_FAILED; | ||||
| } | } | ||||
| auto device_id = GetContext().DeviceId(); | |||||
| GELOGD("Device id is %u", device_id); | |||||
| ProfilingManager::Instance().SetGraphIdToDeviceMap(graph_id, device_id); | |||||
| UpdateThreadContext(options); | UpdateThreadContext(options); | ||||
| Status ret = graph_manager_.AddGraph(graph_id, graph, options, domi::GetContext()); | Status ret = graph_manager_.AddGraph(graph_id, graph, options, domi::GetContext()); | ||||
| if (ret != SUCCESS) { | if (ret != SUCCESS) { | ||||