SetCompileConfig

Applicability

Product

Supported

Atlas A3 training product / Atlas A3 inference product

Atlas A2 training product / Atlas A2 inference product

Atlas 200I/500 A2 inference product

x

Atlas inference product

x

Atlas training product

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)

Parameters

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