aclopSetMaxOpQueueNum

Applicability

Product

Supported

Atlas A3 training products / Atlas A3 inference products

Atlas A2 training products / Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Description

Configures the operator cache aging information to save memory and balance calling performance when a single operator is executed using a single-operator model.

For details about the single-operator model, see Single-Operator Call Sequence.

Prototype

aclError aclopSetMaxOpQueueNum(uint64_t maxOpNum)

Parameters

Parameter

Input/Output

Description

maxOpNum

Input

Maximum length of the "operator type-single-operator model" mapping queue.

If the length reaches the maximum, the mapping information that is not used for a long time and the single-operator model in the cache are deleted. Then, the latest mapping information and the corresponding single-operator model are loaded.

When a single-operator is executed in single-operator model mode (except when executed by calling aclopUpdateParams), if this API is not called to configure the maximum length of the mapping queue, the default maximum length is 20000.

When aclopUpdateParams is called to execute a single operator, if this API is not called to configure the maximum length of the mapping queue, the operator cache information does not need to be aged.

Returns

0 on success; else, failure. For details, see aclError.