ARTICLE DETAIL

资讯详情

深耕郑州网站建设与运营推广的一线实战洞察。

CANN/ge设计文档模板

CANN/ge设计文档模板 Introduction【免费下载链接】geGEGraph Engine是面向昇腾的图编译器和执行器提供了计算图优化、多流并行、内存复用和模型下沉等技术手段加速模型执行效率减少模型内存占用。 GE 提供对 PyTorch、TensorFlow 前端的友好接入能力并同时支持 onnx、pb 等主流模型格式的解析与编译。项目地址: https://gitcode.com/cann/gePurposeThis section should describe the purpose of the document. It should identify the readers. It should explain which products software requirements and design this requirements document describes.ScopeThis section should describe what the document includes and excludes.Overall OverviewThis section describes general factors that affect the product and product requirements. It consists of the following 4 parts. One point to note is that this section does not describe specific requirements, but rather makes the specific requirements to be described easier to understand.Software OverviewProject IntroductionDescribe the background of the project described by this software requirement. For example: Is this project one in a series of versions, or does it replace an existing system, or is it a new independent project.Product Environment IntroductionDescribe the overall environment composed of this product and other products or projects.If this product is independent and completely self-contained, state this here.If the product defined by SRS is a component of a larger system or project (this situation often occurs), then:A. Describe the function of each component of this larger system or project, and identify the interfaces.B. Identify the main external interfaces of this software product. (Note: Detailed descriptions of these interfaces are not provided in this section; they are provided in other parts of the SRS.)C. Describe the relevant product hardware and external devices used. (Note: This is only an overview description.)It is very helpful to describe the main components of the larger system or project, their interconnectivity, and external interfaces using block diagrams. This section should not propose a specific design solution or specific design constraints on the solution (specific design constraints will be described in the specific requirements section). The content of this section is the basis for generating design constraints.Software FunctionsOverview of the main functions that the software must implement and those implemented through user operations. Only a brief description is needed here (e.g., a table of contents), with detailed descriptions in the detailed requirements section. Organize requirement functions so that readers can understand them and this can guide subsequent design and testing. Charts can be used to represent the relationships between major requirement groups, such as high-level data flow diagrams, object-oriented analysis, etc.Sometimes the functional overview required in this section can be directly quoted from higher-level specifications (if they exist) that assign specific functions to this software product.This section should not describe specific requirements. However, the content of this section is the basis for the specific requirements section.Design ConstraintsDescribe matters that may limit developers choices, and what capabilities the features do not support need to be describedAssumptions and DependenciesDescribe clearly the dependencies of this iterationFeature 1 Requirements Analysis DesignOverall IntroductionFunctional RequirementsFunctional Requirement 1Use short words as the functional requirement name, do not use Functional Requirement (1) as the functional nameIntroductionList the functional requirements related to this feature item by item. Include how the project responds to expected error inputs, illegal conditions, and invalid inputs. Requirements should be concise, complete, unambiguous, verifiable, and necessary. Use TBD when needed information is uncertain.InputThis subsection should contain the following:A. Detailed description of all input data for this function, including:Input sourceQuantityUnit of measurementTime requirementsValid input range including precision and toleranceB. References to interface specifications or interface control documents where appropriate.ProcessingThis subsection should describe all operations performed on input data and how output is obtained. This includes the following specifications:A. Validity detection of input data.B. Exact sequence of operations, including timing of events.C. Responses to exceptional conditions, such as:OverflowCommunication failure Communication failureError handlingD. Any method used to convert system inputs to corresponding outputs (such as equations, mathematical algorithms, logical operations). For example, this may describe the following aspects:Calculation formula for withholding income tax in payroll.Meteorological model used for weather forecasting.E. Validity detection for output data.OutputThis subparagraph should contain:A. Detailed description of all output data for this function, this description includes:Output destination (e.g. printer, file)QuantityMeasurement unitTimingValid output range including precision and toleranceHandling of illegal valuesError messagesB. Where appropriate, provide references to interface specifications or interface control documents.Additionally, for systems where requirements concentrate on input/output behavior, SRS should describe all important input/output behaviors and sequence of input/output pairs. For systems that need to remember their behavior to react based on inputs and past behaviors, sequence of input/output pairs is required; this functional behavior is similar to finite state machine.Functional Requirement 2Non-functional RequirementsMaintainabilityTestabilityPortabilityReliabilityPlatformization RequirementsGE is a onetrack component, nowhere allows distinguishing chips, but some features involve E2E delivery, such as underlying interface calls like RTS, need to confirm clearly RTS interface support capabilities under each platformFeature Cross AnalysisSee cross_feature_check.mdPerformanceModel Compilation DurationAll code involved in compilation needs to evaluate performance impact of new code (currently many customers no longer agree to count duration from second iteration start, so every stage of end-to-end is important), identified key stages: optimizeStage1, optimizeStage2, build, loadmodelonline four stages. Code involving above four stages, 3.4.1 must fill impact assessment.OM Size and Load Memory UsageLoad memory usage needs to consider memory-sensitive scenarios, new features原则上 should not cause memory increase (actually also belongs to compatibility issue), if new features need extra memory,原则上 default offExecution PerformanceAll execution-involved code needs to evaluate performance impact of new code, impact needs to be evaluated to ns level (small to string operations, profiling etc.), graph mode dynamic shape GE directly participates in each operator scheduling dispatch, single operator both fixed and dynamic shape involved, will affect final execution durationFixed shape scenarios mainly involve stream allocation scenarios etc., need to evaluate whether affects concurrencyInterface DesignNew/Modified Interface DescriptionInvolving new/modified interfaces needs to be maintained in 0-layer design document, here can directly reference.Interface ChecklistCheck ItemSub-check ItemInvolvedInterface DescriptionWhether interface needs review, review needs to focus on interface compatibility and interface constraints (optional between modules, mandatory between components)Interface DescriptionWhether needs supplementary documentation explanationInterface DescriptionWhether interface document clearly explains interface prototype, functionality, return value etc.Interface CompatibilityInterface behavior compatibility, whether behavior changes before and after modification, whether needs to notify related componentsInterface CompatibilityWhether interface has compatibility, whether new interface can work normally on old version, involves this component and external component new interfacesInterface CompatibilityWhether interface involves usage scenarios, calling sequence etc. constraintsInterface ConstraintsWhether can clearly report error when interface call doesnt meet constraint conditionsInterface ConstraintsWhether needs to design separate test casesSoftware DesignKey Data StructuresKey Technologies/AlgorithmsProcess DesignModifications to Sub-modulesIf involves sub-module main process modification, needs to notify MDE to update module-level design documentError HandlingSystem ErrorsDescribe how errors like memory allocation failure, task creation failure etc. are handled.Interface ErrorsDescribe error codes to be generated and used by external entitiesSecurity CheckCoding Military RulesRefer to coding_military_rules.mdCoding ChecklistCheck ItemCheck Item DescriptionInvolvedWhether involves resource lifecycle management (e.g. thread pool, memory pool etc.)Resource lifecycle too long may lead to resource shortage, slow response, system crash etc. serious system stability and reliability issues. Clearly defining resource lifecycle (process-level/Session-level/Graph-level etc.) can help us better control resource usage, ensure effective utilization and timely release of resources. For using long-lifecycle resources, need code design meeting review or consider other technical means.Whether creating new thread1) Newly created threads need to copy ThreadLocalContext, ErrorContext etc. context information. Performance scenarios as special case separate analysis, if not needed can not copy. 2) Newly created threads need to set thread name.Compatibility CheckKey focus whether old om can execute under new version, new om executing under old version currently not mandatory requirement, but best ensureDT DesignTest BoundaryTest entry (based on what interface to test), test exit (what data validation to do), stub modulesTest DesignWhich categories of cases, export to case list, table only provides a few categories, can addCase types: UT, ST, BBITTest CategoryKey Test ItemsTest MethodCase TypeFunctionalityPerformancePrecisionCompatibilityFeature CrossTest Framework DesignWhether current test framework meets test requirements, if not, add corresponding class designAcceptance Criteria【免费下载链接】geGEGraph Engine是面向昇腾的图编译器和执行器提供了计算图优化、多流并行、内存复用和模型下沉等技术手段加速模型执行效率减少模型内存占用。 GE 提供对 PyTorch、TensorFlow 前端的友好接入能力并同时支持 onnx、pb 等主流模型格式的解析与编译。项目地址: https://gitcode.com/cann/ge创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考
返回列表