ARTICLE DETAIL

资讯详情

深耕网站建设、视觉设计与SEO优化的一线实战洞察。

CANN/ge推理上下文概述

CANN/ge推理上下文概述 简介【免费下载链接】geGEGraph Engine是面向昇腾的图编译器和执行器提供了计算图优化、多流并行、内存复用和模型下沉等技术手段加速模型执行效率减少模型内存占用。 GE 提供对 PyTorch、TensorFlow 前端的友好接入能力并同时支持 onnx、pb 等主流模型格式的解析与编译。项目地址: https://gitcode.com/cann/ge获取推理上下文对象并设置相应对象的形状和数据类型主要用于资源类算子。需要包含的头文件#include graph/inference_context.hPublic成员函数void SetInputHandleShapesAndTypes(std::vectorstd::vectorShapeAndType shapes_and_types) void SetOutputHandleShapesAndTypes(const std::vectorstd::vectorShapeAndType shapes_and_types) void SetOutputHandleShapesAndTypes(std::vectorstd::vectorShapeAndType shapes_and_types) const std::vectorstd::vectorShapeAndType GetInputHandleShapesAndTypes() const const std::vectorstd::vectorShapeAndType GetOutputHandleShapesAndTypes() const void SetMarks(const std::vectorstd::string marks) void SetMarks(const std::vectorAscendString marks) const std::vectorstd::string GetMarks() const void GetMarks(std::vectorAscendString marks) const static std::unique_ptrInferenceContext Create( void *resource_context_mgr nullptr ) ResourceContext *GetResourceContext(const ge::AscendString key) graphStatus SetResourceContext(const ge::AscendString key, ResourceContext *resource_context) graphStatus RegisterReliedOnResourceKey(const ge::AscendString key) graphStatus AddChangedResourceKey(const ge::AscendString key) const std::setge::AscendString GetReliedOnResourceKeys() const const std::setge::AscendString GetChangedResourceKeys() const void ClearChangedResourceKeys()【免费下载链接】geGEGraph Engine是面向昇腾的图编译器和执行器提供了计算图优化、多流并行、内存复用和模型下沉等技术手段加速模型执行效率减少模型内存占用。 GE 提供对 PyTorch、TensorFlow 前端的友好接入能力并同时支持 onnx、pb 等主流模型格式的解析与编译。项目地址: https://gitcode.com/cann/ge创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考
返回列表