aclopSetModelDir

Description

Sets the directory of the model file, which is an .om file compiled from a single-operator. This API is synchronous.

Restrictions

For the Ascend 310 AI Processor, when your app runs on the host, a single process can execute up to 40,000,000 operators at a time.when your app runs on the device, a single process can execute up to 2,000,000 operators at a time.

For the Ascend 910 AI Processor, when your app runs on the host, a single process can execute up to 40,000,000 operators at a time.

For the Ascend 310P AI Processor, when your app runs on the host, a single process can execute up to 40,000,000 operators at a time.when your app runs on the device, a single process can execute up to 2,000,000 operators at a time.

Prototype

aclError aclopSetModelDir(const char *modelDir)

Parameters

Parameter

Input/Output

Description

modelDir

Input

Pointer to the model file directory.

A multi-level directory is supported. However, the system reads the model up to three levels down from the last level.

For example, if modelDir is set to dir0/dir1 and dir1 contains dir2/dir3/dir4, the system looks up for the model file in dir1, dir1/dir2 and dir1/dir2/dir3 only.

Returns

0 on success; else, failure.

See Also

For details about the API call sequence and example, see Single-Operator Execution.