SetCompileConfig

Applicable Products

Product

Supported

Atlas A3 training products / Atlas A3 inference products

√

Atlas A2 training products / Atlas A2 inference products

√

Atlas 200I/500 A2 inference products

x

Atlas inference products

x

Atlas training products

x

Function Description

Sets the path and name of the JSON configuration file of GraphPp. The configuration file is used to describe and compile AscendGraph.

Returns GraphPp with the configuration file path and name configured.

Prototype

1
GraphPp &SetCompileConfig(const char_t *json_file_path)

Command-Line Options

Parameter

Input/Output

Description

json_file_path

Input

Path and name of the JSON configuration file of GraphPp.

The JSON configuration file of GraphPp is used to describe and compile AscendGraph.

An example is as follows. For details about the parameters, see Table 1.

{"build_option":{},"inputs_tensor_desc":[{"data_type":"DT_UINT32","shape":[3]},{"data_type":"DT_UINT32","shape":[3]}]}
Table 1 Parameters in the JSON configuration file of GraphPp

Configuration Item

Optional/Mandatory

Description

build_option

Optional

The value is map<string, string>. For details about how to set this parameter, see build_option in the Ascend graph.

For details about options, see Options.

inputs_tensor_desc

Optional

List of input tensor descriptions of the Ascend graph.

inputs_tensor_desc.data_type

Optional

String

The value is the character string of data_type in Ascend Graph.

inputs_tensor_desc.shape

Optional

A list of integers.

The value is the shape in Ascend Graph.

Returns

GraphPp with the configuration file path and name configured.

Exception Handling

None

Constraints

None