GraphProcessPoint

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

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

Value 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 about the configuration parameters supported by the map, 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.

The DfException exception is reported in abnormal scenarios. You can obtain error_code and message in DfException to view the error code and error information. For details, see DataFlow Error Codes.

Examples

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

Constraints

None