amctGraphCalibration

Applicable Products

  • Ascend 950PR&950DT products: supported
  • Atlas A3 products: supported
  • Atlas A2 products: supported
  • Atlas 200I/500 A2 inference products: supported
  • Atlas inference products: supported
  • Atlas training products: supported

Header File/Library File

  • Header file: #include <amct/amct_graph_calibration.h>
  • Library file: libamctacl.so

Description

Automatically transforms a non-quantized graph into a quantized graph.

This API is exported via extern "C" for C-language or cross-language calls. The function and parameters are the same as those of graphCalibration.

Prototype

1
extern "C" amctStatus amctGraphCalibration(ge::Graph &graph, const std::map<std::string, std::string> &options)

Parameters

Parameter

Input/Output

Description

graph

Input

Graph to be quantized.

options

Input

Quantization options, which are passed in key-value pair format. The key-value mapping table is for the configuration options required for API execution. Both key (indicating the parameter type) and value (indicating the parameter value) are in string format. The configuration options are as follows:

Keys:

compression_optimize_conf: compression configuration (preferred)
ge.compressionOptimizeConf: compression configuration (deferred)

out_nodes: name of the output node of the user graph (preferred)
ge.outputNodeName: name of the output node of the user graph (deferred)

input_fp16_nodes: name of the input node whose input data type is FP16 (preferred)
ge.INPUT_NODES_SET_FP16: name of the input node whose input data type is FP16 (deferred)

input_format: input format. The value can be "NCHW", "NHWC", or "ND".
ge.insertOpFile: AIPP
build_graph_already_initialized: flag indicating that the graph has been initialized
acl_already_initialized: flag indicating that ACL has been initialized
device: device ID
ip: IP address
port: port number

Returns

Parameter

Type

Description

-

amctStatus

  • SUCCESS: The graph is successfully modified.
  • FAILED: The graph fails to be modified.
  • NOT_CHANGED: The graph is not modified.

Constraints

None