Updated on 2022-03-13 GMT+08:00

HIAI_CreateGraph

Creates and starts the entire graph. This API supports the connection between graphs in a single configuration file rather than in different configuration files. It can be called only on the host or Ascend 310 RC. This API is defined in c_graph.h.

Syntax

HIAI_StatusT HIAI_CreateGraph(const char* configFile, size_t len)

Parameter Description

Parameter

Description

Value Range

configFile

Configuration file path.

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.

len

Name length of the configuration file

1–255

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_PROTO_FILE_PARSE_FAILED

ParseFromString return failed.