Help Center/ Atlas 300 Application (Model 3000)/ Matrix API Reference/ Process Orchestration APIs/ Process Connection APIs (C++ Language)/ Graph::CreateGraph (Creating a Graph Based on the Configuration File and Writing the Generated Graph Back to the List)
Updated on 2022-03-13 GMT+08:00

Graph::CreateGraph (Creating a Graph Based on the Configuration File and Writing the Generated Graph Back to the List)

Overloads Graph::CreateGraph (Creating a Graph Based on the Configuration File). The Matrix creates a graph based on the configuration file and writes the generated graph back to the list. This API is defined in graph.h.

It can be called only on the host or Ascend 310 RC.

Syntax

static HIAI_StatusT Graph::CreateGraph(const std::string& configFile, std::list<std::shared_ptr<Graph>>& graphList)

Parameter Description

Parameter

Description

Value Range

configFile

Path of the graph configuration file.

Ensure that the transferred file path is correct.

A single configuration file supports a maximum of 2048 graphs. However, restricted by system resources, only several or dozens of graphs are supported based on different hardware configurations and graph sizes.

graphList

User-defined list. The Matrix writes the generated graph back to the list.

-

Return Value

For details about the returned error codes, see "Error Codes."

Error Codes

No.

Error Code

Description

1

HIAI_OK

The running is OK.

2

HIAI_GRAPH_GET_INSTANCE_NULL

A null instance is obtained.