ge_initialize
Function Usage
Initializes GE for execution.
Prototype
1 | ge_initialize(config: dict) -> int |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
config |
Input |
Configuration dictionary. key indicates the parameter type, and value indicates the parameter value. Both of them are character strings. For details about the supported configurations, see the global-level parameters in Options. |
Returns
(int) Initialization result. The value 0 indicates success.
Restrictions
- If config is not of the dictionary type, TypeError is thrown.
- If config is empty, TypeError is thrown.
- If the initialization fails, RuntimeError is thrown.
- GE does not support multi-instance running. Only one instance can be initialized at a time.
- If this API is called multiple times but ge_finalize is not called, the execution result is unpredictable.
Parent topic: Session APIs