GeApi【免费下载链接】geGEGraph Engine是面向昇腾的图编译器和执行器提供了计算图优化、多流并行、内存复用和模型下沉等技术手段加速模型执行效率减少模型内存占用。 GE 提供对 PyTorch、TensorFlow 前端的友好接入能力并同时支持 onnx、pb 等主流模型格式的解析与编译。项目地址: https://gitcode.com/cann/geProduct Support StatusProductSupport StatusAtlas A3 Training Series Products/Atlas A3 Inference Series Products√Atlas A2 Training Series Products/Atlas A2 Inference Series Products√Module Importfrom ge.ge_global import GeApi from ge.error import GeErrorFunctionality DescriptionGeApi class provides GE global initialization and resource release interfaces. ge_initialize must be called before using other GE interfaces, ge_finalize is called when program exits to release resources. Both methods are class methods, can be called without instantiating GeApi.Class Definitionclass GeApi: classmethod def ge_initialize(cls, config: dict) - None classmethod def ge_finalize(cls) - NoneFunction Descriptionge_initializeclassmethod def ge_initialize(cls, config: dict) - NoneFunctionality Description: Initializes GE, prepares execution environment. This method is a class method, can be called without instantiating GeApi. Must be called before using other GE interfaces.Parameter Description:ParameterTypeRequired/OptionalDescriptionconfigdictRequiredGE initialization configuration dictionary, key-value pairs are string type, used to specify GE runtime parameters.Return Value Description: No return value.Constraint Description:config must be dict type, otherwise throws TypeError.config cannot be empty dictionary, otherwise throws TypeError.When GE initialization fails, will throw GeError, exception information contains GE internal error information and interface context.Must call this method before using other GE interfaces.Do not repeatedly call ge_initialize, repeated calls may cause undefined behavior.ge_finalizeclassmethod def ge_finalize(cls) - NoneFunctionality Description: Releases GE resources, cleans up execution environment. This method is a class method, can be called without instantiating GeApi. Should be called when program exits or no longer needs GE.Parameter Description: No parameters.Return Value Description: No return value.Constraint Description:Before calling ge_finalize, must ensure all Sessions are destroyed, all graph resources are released.When GE resource release fails, will throw GeError, exception information contains GE internal error information and interface context.Do not continue using any GE interfaces after ge_finalize.【免费下载链接】geGEGraph Engine是面向昇腾的图编译器和执行器提供了计算图优化、多流并行、内存复用和模型下沉等技术手段加速模型执行效率减少模型内存占用。 GE 提供对 PyTorch、TensorFlow 前端的友好接入能力并同时支持 onnx、pb 等主流模型格式的解析与编译。项目地址: https://gitcode.com/cann/ge创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考
CANN/ge GE Python API GeApi类文档
GeApi【免费下载链接】geGEGraph Engine是面向昇腾的图编译器和执行器提供了计算图优化、多流并行、内存复用和模型下沉等技术手段加速模型执行效率减少模型内存占用。 GE 提供对 PyTorch、TensorFlow 前端的友好接入能力并同时支持 onnx、pb 等主流模型格式的解析与编译。项目地址: https://gitcode.com/cann/geProduct Support StatusProductSupport StatusAtlas A3 Training Series Products/Atlas A3 Inference Series Products√Atlas A2 Training Series Products/Atlas A2 Inference Series Products√Module Importfrom ge.ge_global import GeApi from ge.error import GeErrorFunctionality DescriptionGeApi class provides GE global initialization and resource release interfaces. ge_initialize must be called before using other GE interfaces, ge_finalize is called when program exits to release resources. Both methods are class methods, can be called without instantiating GeApi.Class Definitionclass GeApi: classmethod def ge_initialize(cls, config: dict) - None classmethod def ge_finalize(cls) - NoneFunction Descriptionge_initializeclassmethod def ge_initialize(cls, config: dict) - NoneFunctionality Description: Initializes GE, prepares execution environment. This method is a class method, can be called without instantiating GeApi. Must be called before using other GE interfaces.Parameter Description:ParameterTypeRequired/OptionalDescriptionconfigdictRequiredGE initialization configuration dictionary, key-value pairs are string type, used to specify GE runtime parameters.Return Value Description: No return value.Constraint Description:config must be dict type, otherwise throws TypeError.config cannot be empty dictionary, otherwise throws TypeError.When GE initialization fails, will throw GeError, exception information contains GE internal error information and interface context.Must call this method before using other GE interfaces.Do not repeatedly call ge_initialize, repeated calls may cause undefined behavior.ge_finalizeclassmethod def ge_finalize(cls) - NoneFunctionality Description: Releases GE resources, cleans up execution environment. This method is a class method, can be called without instantiating GeApi. Should be called when program exits or no longer needs GE.Parameter Description: No parameters.Return Value Description: No return value.Constraint Description:Before calling ge_finalize, must ensure all Sessions are destroyed, all graph resources are released.When GE resource release fails, will throw GeError, exception information contains GE internal error information and interface context.Do not continue using any GE interfaces after ge_finalize.【免费下载链接】geGEGraph Engine是面向昇腾的图编译器和执行器提供了计算图优化、多流并行、内存复用和模型下沉等技术手段加速模型执行效率减少模型内存占用。 GE 提供对 PyTorch、TensorFlow 前端的友好接入能力并同时支持 onnx、pb 等主流模型格式的解析与编译。项目地址: https://gitcode.com/cann/ge创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考