GraphProcessPoint

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

Defines the GraphProcessPoint constructor, which returns a GraphProcessPoint object.

Prototype

1
GraphProcessPoint(framework, graph_file, load_params={}, compile_config_path="", name=None)

Parameters

Parameter

Data Type

Description

framework

Framework

Framework type of the IR file. For details, see dataflow.Framework.

graph_file

str

IR file path.

load_params

Dict[str, str]

A key-value mapping table of the string type, for describing the parsing parameters of the source model.

For details, see Configuration Parameters of Model Parsing APIs.

compile_config_path

str

Path of the configuration file during graph compilation.

The following is an example of the configuration file:

{"build_option":{},"inputs_tensor_desc":[{"data_type":"DT_UINT32","shape":[3]},{"data_type":"DT_UINT32","shape":[3]}]}

name

str

Name of the ProcessPoint. The framework automatically ensures that the name is unique. If this parameter is not set, names such as GraphProcessPoint, GraphProcessPoint_1, GraphProcessPoint_2, and the like will be automatically generated.

Table 1 Parameters in the JSON configuration file of GraphProcessPoint

Configuration Item

Optional/Mandatory

Description

build_options

Optional

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

For details about options, see Options.

inputs_tensor_desc

Optional

List of input tensor descriptions of the graph.

inputs_tensor_desc.data_type

Optional

Character string.

The value is a character string corresponding to data_type in the graph.

inputs_tensor_desc.shape

Optional

A list of integers.

The value is the shapes in the graph.

Returns

None is returned in normal scenarios.

A DfException is thrown upon exceptions. You can catch DfException and retrieve its error_code and message attributes to check the specific error code and error details. For details, see DataFlow Error Codes.

Examples

1
2
import dataflow as df
pp1 = df.GraphProcessPoint(...)

Constraints

None