Device and method for adaptively adapting domestic AI accelerator card to cloud platform
By designing devices adapted to domestic AI accelerator cards on the cloud platform, including script tool sets, resource management modules, etc., it solves the problem that cloud platforms are difficult to quickly integrate and deploy domestic AI accelerator cards, and achieves the effect of improving flexibility and scalability and meeting diversified AI computing needs.
Patent Information
- Application Number
- CN202411536138.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
It is difficult for existing cloud platforms to quickly integrate and deploy domestic AI accelerator cards, resulting in insufficient flexibility and scalability, and cannot effectively meet the diverse AI computing needs.
Design a cloud platform adaptively adapted to domestic AI accelerator cards, including script tool set, resource management module, adaptation task management module, data storage module and adaptation analysis module. Through the collaborative work of these modules, the rapid discovery, access, adaptation and management of domestic AI accelerator cards can be achieved.
It realizes the rapid integration and deployment of domestic AI acceleration cards on the cloud platform, improves the flexibility and scalability of the cloud platform, meets diversified AI computing needs, and reduces the deployment time and cost caused by compatibility issues.
Smart Images

Figure CN119512835A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cloud computing and artificial intelligence technology, and specifically to a device and method for adaptively adapting a cloud platform to a domestic AI accelerator card. Background Art
[0002] With the rapid development of artificial intelligence technology, AI accelerator cards have become key devices for improving AI computing performance. However, AI accelerator cards produced by different manufacturers have differences in hardware architecture, interface protocols, and performance parameters, which poses challenges to the adaptation and management of cloud platforms.
[0003] With the rapid development of AI technology, the demand for AI computing resources in different application scenarios is becoming increasingly diversified. Therefore, how to quickly integrate and deploy domestic AI accelerator cards on cloud platforms, improve the flexibility and scalability of cloud platforms, and better meet the diverse AI computing needs is a technical problem that needs to be solved urgently. Summary of the invention
[0004] The technical task of the present invention is to provide a device and method for adaptively adapting domestic AI accelerator cards on a cloud platform to solve the problem of how to quickly integrate and deploy domestic AI accelerator cards on the cloud platform, improve the flexibility and scalability of the cloud platform, and better meet the diversified AI computing needs.
[0005] The technical task of the present invention is achieved in the following manner: a device for adaptively adapting a domestic AI accelerator card to a cloud platform, the device comprising a script tool set, a resource management module, an adaptation task management module, a data storage module, and an adaptation analysis module;
[0006] Among them, the script tool set integrates the recognition, perception, driving and monitoring script tools of the physical machine accessories of the CPU and domestic AI accelerator card, which are used to automatically realize the hardware recognition, driver installation and hardware status monitoring functions according to the characteristics of the hardware;
[0007] The resource management module is used to achieve platform access to AI servers and management of domestic AI accelerator cards, and to monitor the status and load of nodes and AI accelerator cards in real time;
[0008] The adaptation task management module is used to provide an adaptation management page, allowing adapters to formulate adaptation tasks based on the characteristics of different AI accelerator cards and schedule and execute tasks based on the node load, etc.
[0009] The data storage module is used to save the adaptation results and logs of the adaptation process to facilitate the tracing of the adaptation process;
[0010] The adaptation analysis module is used to analyze the adaptation results and logs, and form the final adaptation conclusion based on the performance indicator characteristics of the domestic AI accelerator card itself.
[0011] As a preferred option, the script tool set develops plug-in script set management technology, adopts modularization and version control strategies, builds a unified script warehouse, and combines metadata tag technology to achieve accurate classification and rapid retrieval of script functions, thereby achieving intelligent management of script sets and ensuring that each script unit is independently maintainable and easy to reuse;
[0012] The script tool set is an adapter with a visual script management interface to implement script management for driver installation and monitoring collection under different CPU architectures of domestic AI accelerator cards; script management includes installation package management and tool set management;
[0013] Among them, installation package management refers to the management of the installation packages of mainstream domestic AI accelerator cards such as Cambricon, Ascend, and Tianshu Zhixin, as well as the addition, deletion, modification, and query management of the installation packages, and supports the management of the accelerator card's own software stack for the mainstream domestic AI accelerator card driver installation packages, monitoring tool packages, and underlying dependency packages for training and inference; the management of installation packages includes the fields of the operating system, version, CPU architecture, installation package, installation package verification code, and size supported by the installation package; such as the Cambricon AI accelerator card, it supports the driver of mainstream AI accelerator cards such as Cambricon 370-X8 and 370-S4, Cambricon NeuWareSDK, Cambricon PyTorch deep learning framework, Cambricon's commonly used Deepspeed, Flash Attention, Transformers, PEFT and other library tools and libraries;
[0014] Toolset management provides a management interface for commonly used script toolsets for domestic AI accelerator cards, realizing the functions of adding, deleting, modifying and querying toolsets; the toolset integrates common tool scripts for installation, monitoring and collection, adaptation testing and fault detection of software packages of commonly used AI accelerator cards such as Ascend, Cambrian and Tianshu Zhixin; because AI accelerator cards can be used on different CPU architectures and different operating systems, toolset management includes adapted operating systems, CPU architectures, installation package scripts and verification methods; adaptation scripts include supported AI accelerator card manufacturers, AI accelerator card types, AI accelerator card adaptation items and performance benchmark values, physical machine CPU architectures, operating system types, adaptation scripts and script protocols and return values.
[0015] As a preferred option, the resource management module provides the adapter with a resource interface of the domestic AI accelerator card, realizes automatic discovery, rapid identification and topology perception of the AI accelerator card, and implements the node AI accelerator card driver installation and node expansion initialization based on the script tool set, so that the domestic AI accelerator card resources can be quickly connected to the cloud platform;
[0016] The resource management module has computing power registration and node pooling functions;
[0017] Among them, when registering computing power, the registration of computing power resources in the cloud platform is realized based on the plug-in extension mechanism. For various CPUs and domestic AI acceleration card resources on the computing power cluster nodes, a standardized interface is provided to enable the computing power cluster to identify the computing power resources on the nodes, thereby realizing the management and scheduling of computing power resources; and based on the system PXE automatic installation technology, a system automatic installation framework for heterogeneous resources is developed to solve the ability of adaptive installation of multi-architecture operating systems, realize automatic matching of corresponding system images according to different CPU architectures, and complete the installation of node operating systems; the cloud platform scans the device information on the node PCIE, combines the manufacturer and device feature code of the device, and quickly identifies the manufacturer and model information of the domestic AI acceleration card and network card. Based on the capabilities of the script tool set, the installation of the software stack of the domestic AI acceleration card accessory driver and toolkit is realized, and the automatic configuration and initialization of the domestic AI acceleration card of GPU and NPU is realized;
[0018] Node pooling means that after the CPU and domestic AI accelerator card on the node are initialized, the corresponding identifier is added to the node according to the node's CPU architecture and AI accelerator card type, and similar resources are divided into a unified resource pool. For example, if the node server is a Hygon CPU and a Cambrian 370-X8 AI accelerator card, the node can be added to the resource pool with the Hygon_Cambican370X8 label, so that unified management and scheduling of similar nodes can be achieved.
[0019] As a preferred option, the adaptation task management module provides an adaptation management page, so that the adaptation personnel can formulate adaptation tasks according to the characteristics of different AI accelerator cards, schedule the corresponding nodes to perform adaptation tasks according to the node load, and monitor the execution status of the task based on the monitoring indicators of the node's CPU, memory and domestic accelerator card utilization to ensure the smooth execution of the task; the details are as follows:
[0020] Generate adaptation tasks: The adaptation task generation module provides a visual management interface for managing the adaptation test task items of domestic AI accelerator cards; among them, the test task items include key task items and indicator task items; key task items are crucial to the overall adaptation. If the indicator value of the overall adaptation is lower than the standard value, the entire adaptation process will be judged as failed; indicator task items are given different weights according to their importance, with weight levels ranging from 1 to 5; the adaptation results will be calculated based on the indicator values and weights of all task items; the adapter adds adaptation tasks according to the characteristics and uses of the domestic AI accelerator card, and sets the list of adapted task items and their weights, and Adjust the task items as needed; for conventional domestic AI accelerator card adaptation, including driver installation and testing, operating system compatibility testing, toolkit verification, software stack verification, monitoring service verification, training and reasoning framework verification, benchmark performance testing, common model performance testing and service product function testing, and take driver test results and software stack verification as key indicators, and set the weights of INT8, FP16 and FP32 benchmark performance indicators to 1, 3, and 2, reflecting the emphasis on AI performance; after the adaptation task is maintained, the adaptation personnel start the corresponding adaptation task, and the task scheduling center schedules and executes the adaptation task;
[0021] Task scheduling: Design a task scheduler to complete the scheduling of each adaptation task and its task items, schedule each task item to the optimal node for execution, and dynamically adjust the task scheduling according to the node load and task monitoring data to ensure the smooth execution of the task; the core of task scheduling is the task scheduling algorithm; from the resource level, when selecting the execution node for the adaptation task, a balanced scheduling strategy is implemented according to the computing power of the node (such as CPU, AI accelerator card, memory, etc.) and its current load to maximize resource utilization; at the same time, a task scheduling algorithm of "resource pool filtering + multi-dimensional feature weight" is designed. The core goal is to select nodes with relatively low current load and computing power that meet the task requirements from qualified nodes to execute tasks;
[0022] Task execution: After the task is scheduled, the task manager will send it to the corresponding node for execution according to the protocol of the task item. After the task is scheduled, the task manager obtains the access method of the scheduling node through the node registration information, and sends the adaptation task item to the corresponding node, such as sending the task execution script to the node through SSH remote call. The execution node starts the adaptation task by executing the task script. If an installation package is required, it will automatically download and execute it according to the script content, and return the process ID of the task. After the task is executed, the corresponding adaptation performance and verification result data are returned according to the return value of the script. The relevant log information generated during the task execution process is automatically synchronized to the data storage module for storage.
[0023] Task monitoring: To ensure the normal execution of adaptation tasks, a comprehensive task status monitoring system is built based on the monitoring data of CPU utilization, domestic AI acceleration card utilization and memory utilization on the nodes provided by the cloud platform. If the resource utilization of a node exceeds the limit, an alarm will be issued through email, SMS, etc., and the task scheduling of the node will be stopped. The node will be rescheduled after the node utilization returns to normal levels. Each adaptation task will be assigned a unique ID (including adaptation item ID and adaptation task ID) to achieve accurate identity identification and tracking, and real-time tracking of task execution progress and status. Once the task execution time exceeds the threshold, it will automatically intervene to ensure the effective use of system resources and the controllability of tasks.
[0024] More optimally, the task scheduling algorithm of "resource pool filtering + multi-dimensional feature weighting" is as follows:
[0025] First, filter the resource pool according to the task item requirements to determine the scope of the task execution nodes. And filter the resource pool according to the node CPU architecture and domestic AI accelerator card type requirements of any task item, and filter the resource pool with reference to the resource pool tag information to select the resource pool that meets the requirements. For example, if a task execution requires the Hygon CPU architecture and the Cambrian 370-X8 AI accelerator card, the task scheduler will traverse the resource pool and select the resource pool Hygon_Cambican370X8 that contains both of these identifiers to determine the scope of the task execution nodes.
[0026] Then, based on the multi-dimensional feature weight evaluation, the comprehensive available computing power of each node is calculated, and the optimal node is selected for execution; the details are as follows:
[0027] ① Define the feature set: determine the dimensions or features used for evaluation. The features to be evaluated are closely related to the requirements for task execution. Specifically, for domestic AI accelerator card adaptation, the AI accelerator card utilization, CPU utilization, memory utilization, and network bandwidth occupancy are used;
[0028] ②Weight allocation: According to the demand for computing resources for task execution, a weight value is assigned to each feature to distinguish the importance of each type of resource (for example, if AI computing power is intensive, the weight of the AI accelerator card is increased). The weight value is adjusted according to the needs of specific tasks. For AI performance adaptation, the weights of AI accelerator card utilization, CPU utilization, memory utilization, and network bandwidth utilization are set to 4, 3, 2, and 1 respectively;
[0029] ③ Comprehensive quantitative evaluation: The comprehensive score of each candidate node is calculated based on the weight and quantization value. The node with the highest comprehensive score is scheduled to perform the adaptation task;
[0030] Among them, the resource availability rate ResourceIdleRate of the CPU, AI accelerator card, and memory on the nodeji The calculation formula is as follows:
[0031]
[0032] Wherein, j represents the node identifier; i represents the resource type identifier;
[0033] Resource weight * current node availability can be used to get the resource scheduling score ResourceSchedScore ji , the formula is as follows:
[0034] ResourceSchedScore ji = ResourceIdleRate ji *ResourceWeighter i ;
[0035] By setting ResourceSchedScore ji = ResourceIdleRate ji *ResourceWeighter i Calculated resource scheduling scores for each type ResourceSchedScore ji By summing up, we can calculate the ComprehensiveScore of the overall computing power of each node at present. j , the formula is as follows:
[0036]
[0037] By comparing the overall computing power scores of each node, the optimal computing power node can be selected, thereby achieving balanced scheduling based on computing power quantification.
[0038] As a preferred option, the data storage module designs a consent management framework for the adaptation result set to fully tap the reuse value of adaptation records for various models;
[0039] The adaptation results are divided into three forms: structured data, log information, and business file data;
[0040] Among them, for the performance of the adaptation task and the indicative structured data of the adaptation conclusion, the data is directly saved to the public MySQL database for centralized management and quick access;
[0041] Adapt the generated log information and implement unified management through the log management component Kibana;
[0042] The business file data generated during the adaptation process is directly stored in MinIO so that the business team can easily query and analyze the data;
[0043] The data storage module also introduces a global environment variable table (ENV table) to comprehensively record the environment configuration information of the adaptation task, thereby enhancing configurability and flexibility.
[0044] Preferably, the adaptation analysis module analyzes the adaptation results based on the archived data of the adaptation task, and the adaptation analysis module has the function of automatically forming an adaptation report and comparing the adaptation conclusions;
[0045] Among them, the automatic formation of the adaptation report is to automatically calculate the adaptation indicators and form an adaptation conclusion report; AI accelerator cards have many indicators, and each indicator is compared with the benchmark indicator, which requires a large amount of calculation and is prone to errors. A calculation rule of "key item rejection + weight evaluation" is designed to realize the automatic calculation of adaptation indicators according to the rules;
[0046] According to the calculation rules of "key item rejection + weight evaluation", the overall adaptation evaluation score is automatically calculated to form an adaptation analysis report;
[0047] By comparing the adaptation data of domestic AI accelerator cards in different complete machines, operating systems and large-model training tasks and analyzing the reports, we comprehensively evaluate the stability of domestic AI accelerator cards, complete machine compatibility and applicable scenarios, which will facilitate the subsequent formulation of delivery plans based on business needs.
[0048] Preferably, the calculation rules of “key item rejection + weight evaluation” are as follows:
[0049] Traverse each key task item in the adaptation task, compare the actual index of the corresponding task item with the benchmark value. If the actual index is lower than the benchmark value requirement, the overall adaptation fails and the subsequent weight evaluation can be skipped. If the actual index meets or exceeds the benchmark value requirement, compare other key items, and if they all pass the weight evaluation;
[0050] Comprehensive quantitative evaluation is performed based on the weight of the task items. Specifically, i is used to represent any task item. First, according to the formula Calculate the actual value of task item i indicator actualValue i and benchmarkValue i Deviation of TaskEviation i If the actual value is greater than the reference value, the positive deviation result is greater than 0, otherwise the negative deviation result is less than 0; then according to the formula The formula The calculated deviation of each indicator is combined with the task weight TaskWeighter i By summing them up, we can calculate the overall score OverallAdaptScore of each task item in the current adaptation task.
[0051] A method for adaptively adapting a domestic AI accelerator card to a cloud platform, the method is as follows:
[0052] Based on the characteristics and software stack of domestic AI accelerator cards, driver installation, software stack initialization and monitoring services are managed through scripts and integrated into the script tool set to achieve unified management of tools.
[0053] Based on the cloud platform capabilities of the script tool set, the automatic discovery, rapid identification and topology perception of domestic AI accelerator cards are realized. The installation of domestic AI accelerator card drivers and the initialization of node expansion are realized through the initialization tool, so that domestic AI accelerator card resources can be quickly connected to the cloud platform;
[0054] Generate adaptation tasks: According to the characteristics and adaptation requirements of domestic AI accelerator cards, analyze the adaptation verification content to be performed, and formulate an adaptation task list based on the script tool set capabilities to form specific adaptation tasks;
[0055] Adaptation task scheduling: Design a task scheduler to complete the scheduling of each adaptation task and its task items, schedule each task item to the optimal node for execution, and dynamically adjust the task scheduling according to the node load and task monitoring data to ensure the smooth execution of the task; among them, task items are clearly divided into two categories according to the importance of adaptation: key task items and indicator task items; key task items are crucial to the overall adaptation. Once their indicator values are lower than the standard values, the entire adaptation process will be judged as failed; indicator task items are assigned different weights according to their importance, with weight levels ranging from 1 to 5; the adaptation results will be calculated based on the indicator values and weights of all task items;
[0056] Adaptation task execution: The task manager obtains the access method of the scheduling node through the node registration information, sends the adaptation task item to the corresponding scheduling node, completes the execution of the adaptation task, and records the adaptation log and returns the adaptation result. The data storage module saves the adaptation result and log;
[0057] Adaptive task monitoring: Based on the CPU utilization, AI accelerator card utilization, and memory utilization monitoring data on the nodes provided by the cloud platform, monitor the task nodes and task status, and track the task execution progress and status in real time. Once the task execution time exceeds the threshold, it will automatically intervene to ensure the effective use of system resources and the controllability of tasks.
[0058] Adaptation result analysis: Automatically obtain adaptation indicators, automatically calculate the overall adaptation comprehensive evaluation score based on the indicator weights, and form an adaptation conclusion report; and based on the comparison with historical adaptation reports, analyze the compatibility, stability and applicable scenarios of domestic AI accelerator cards.
[0059] As a preferred option, the script tool set adopts modularization and version control strategies, and realizes accurate classification and rapid retrieval of script functions by building a unified script repository and combining metadata tag technology; wherein, the script tool set includes the script's CPU architecture, operating system version, script protocol, and the installation package also includes the operating system and version supported by the installation package, CPU architecture, installation package content, installation package verification code and size fields;
[0060] During the execution of the adaptation task, the task scheduling algorithm of "resource pool filtering + multi-dimensional feature weight" is adopted, as follows:
[0061] First, filter the resource pool according to the task item requirements to determine the scope of the task execution nodes. And filter the resource pool according to the node CPU architecture and domestic AI accelerator card type requirements of any task item, and filter the resource pool with reference to the resource pool tag information to select the resource pool that meets the requirements. For example, if a task execution requires the Hygon CPU architecture and the Cambrian 370-X8 AI accelerator card, the task scheduler will traverse the resource pool and select the resource pool Hygon_Cambican370X8 that contains both of these identifiers to determine the scope of the task execution nodes.
[0062] Then, based on the multi-dimensional feature weight evaluation, the comprehensive available computing power of each node is calculated, and the optimal node is selected for execution; the details are as follows:
[0063] ① Define the feature set: determine the dimensions or features used for evaluation. The features to be evaluated are closely related to the requirements for task execution. Specifically, for domestic AI accelerator card adaptation, the AI accelerator card utilization, CPU utilization, memory utilization, and network bandwidth occupancy are used;
[0064] ②Weight allocation: According to the demand for computing resources for task execution, a weight value is assigned to each feature to distinguish the importance of each type of resource (for example, if AI computing power is intensive, the weight of the AI accelerator card is increased). The weight value is adjusted according to the needs of specific tasks. For AI performance adaptation, the weights of AI accelerator card utilization, CPU utilization, memory utilization, and network bandwidth utilization are set to 4, 3, 2, and 1 respectively;
[0065] ③ Comprehensive quantitative evaluation: The comprehensive score of each candidate node is calculated based on the weight and quantization value. The node with the highest comprehensive score is scheduled to perform the adaptation task;
[0066] Among them, the resource availability rate ResourceIdleRate of the CPU, AI accelerator card, and memory on the node ji The calculation formula is as follows:
[0067]
[0068] Wherein, j represents the node identifier; i represents the resource type identifier;
[0069] Resource weight * current node availability can be used to get the resource scheduling score ResourceSchedScore ji , the formula is as follows:
[0070] ResourceSchedScore ji = ResourceIdleRate ji *ResourceWeighter i ;
[0071] By setting ResourceSchedScore ji = ResourceIdleRate ji *ResourceWeighter i Calculated resource scheduling scores for each type ResourceSchedScore ji By summing up, we can calculate the ComprehensiveScore of the overall computing power of each node at present. j , the formula is as follows:
[0072]
[0073] By comparing the overall computing power scores of each node, the optimal computing power node can be selected, thereby achieving balanced scheduling based on computing power quantification.
[0074] The device and method for adaptively adapting a domestic AI accelerator card to a cloud platform of the present invention have the following advantages:
[0075] (1) The present invention adopts Openstack for cloud platform resource management and Cyborg for AI accelerator card management in the cloud computing platform, aiming to realize the rapid integration and deployment of domestic AI accelerator cards on the cloud platform, reduce the deployment time and cost caused by compatibility issues, and at the same time improve the flexibility and efficiency of the cloud platform, and optimize the operating performance of domestic AI accelerator cards on the cloud platform;
[0076] (ii) The present invention includes a script tool set, a resource management module, an adaptation task management module, a data storage module, and an adaptation analysis module. Through the cooperation between the modules, the rapid discovery, access, and adaptation of domestic AI accelerator cards are realized, which greatly shortens the adaptation cycle of AI accelerator cards, realizes the rapid access of heterogeneous computing power, promotes the development and application of domestic AI technology, better meets the diverse AI computing needs, and effectively enhances the competitiveness and market adaptability of the cloud platform;
[0077] (III) Through the adaptive adaptation mechanism, the cloud platform can quickly integrate and deploy domestic AI accelerator cards, reduce deployment time and cost due to compatibility issues, and quickly adjust and optimize its own service capabilities and resource allocation, thereby improving the flexibility and scalability of the cloud platform, optimizing the operating performance of domestic AI accelerator cards, promoting the development and application of domestic AI technology, improving resource utilization and reducing operating costs, and enhancing the competitiveness and market adaptability of the cloud platform, so as to better meet the diverse AI computing needs;
[0078] (iv) The script tool set of the present invention integrates the recognition, perception, drive, and monitoring script tools of physical machine accessories such as CPUs and domestic AI accelerator cards, and can automatically implement functions such as hardware recognition, driver installation, and hardware status monitoring based on the characteristics of the hardware;
[0079] (V) The resource management module of the present invention implements platform access to the AI server and management of the domestic AI accelerator card, and monitors the status and load of the node and AI accelerator card in real time;
[0080] (VI) The adaptation task management module of the present invention can provide an adaptation management page, so that the adaptation personnel can formulate adaptation tasks according to the characteristics of different AI accelerator cards, and implement the scheduling and execution of tasks according to the load of the node, etc.;
[0081] (VII) The data storage module of the present invention saves the adaptation results and the log of the adaptation process to facilitate the tracing of the adaptation process;
[0082] (VIII) The adaptation analysis module of the present invention analyzes the adaptation results and logs, and forms a final adaptation conclusion based on the performance indicators and other characteristics of the AI accelerator card itself;
[0083] (IX) The present invention can be used for the system development of heterogeneous computing power adaptive adaptation engines, complete the rapid adaptation of heterogeneous computing power accessories such as GPUs and NPUs, and continuously and rapidly update drivers to be compatible with more servers, so that cloud platforms can quickly integrate and deploy domestic AI accelerator cards, reduce deployment time and costs caused by compatibility issues, and improve the flexibility and scalability of cloud platforms;
[0084] (10) The present invention solves the limitation that only a few technical experts can execute the adaptation process through a modular adaptation script toolset and knowledge base, reduces the difficulty of compatible adaptation testing, effectively shortens the communication cost and equipment occupancy cost of multiple people participating in the test, and reduces the deployment time and cost caused by compatibility issues. It can effectively speed up the adaptation and introduction of domestic AI acceleration cards, improve the compatibility and stability of domestic AI acceleration cards, promote the development and application of domestic AI technology, enhance the competitiveness and market adaptability of cloud platforms, and better meet diverse AI computing needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0085] The present invention is further described below in conjunction with the accompanying drawings.
[0086] Attached Figure 1 A schematic diagram of the structure of a device for adaptively adapting a domestic AI accelerator card to a cloud platform;
[0087] Attached Figure 2 A flowchart for the adaptation task execution. DETAILED DESCRIPTION
[0088] The following detailed description is made of the device and method for adaptively adapting the cloud platform to the domestic AI acceleration card with reference to the drawings and specific embodiments of the specification.
[0089] Embodiment 1:
[0090] As attached Figure 1 As shown, this embodiment provides a device for adaptively adapting a domestic AI accelerator card on a cloud platform, the device comprising a script tool set, a resource management module, an adaptation task management module, a data storage module, and an adaptation analysis module;
[0091] Among them, the script tool set integrates the recognition, perception, driving and monitoring script tools of the physical machine accessories of the CPU and domestic AI accelerator card, which are used to automatically realize the hardware recognition, driver installation and hardware status monitoring functions according to the characteristics of the hardware;
[0092] The resource management module is used to achieve platform access to AI servers and management of domestic AI accelerator cards, and to monitor the status and load of nodes and AI accelerator cards in real time;
[0093] The adaptation task management module is used to provide an adaptation management page, allowing adapters to formulate adaptation tasks based on the characteristics of different AI accelerator cards and schedule and execute tasks based on the node load, etc.
[0094] The data storage module is used to save the adaptation results and logs of the adaptation process to facilitate the tracing of the adaptation process;
[0095] The adaptation analysis module is used to analyze the adaptation results and logs, and form the final adaptation conclusion based on the performance indicator characteristics of the domestic AI accelerator card itself.
[0096] As a preferred option, the script tool set develops plug-in script set management technology, adopts modularization and version control strategies, builds a unified script warehouse, and combines metadata tag technology to achieve accurate classification and rapid retrieval of script functions, thereby achieving intelligent management of script sets and ensuring that each script unit is independently maintainable and easy to reuse;
[0097] The script tool set is an adapter with a visual script management interface to implement script management for driver installation and monitoring collection under different CPU architectures of domestic AI accelerator cards; script management includes installation package management and tool set management;
[0098] Among them, installation package management refers to the management of the installation packages of mainstream domestic AI accelerator cards such as Cambricon, Ascend, and Tianshu Zhixin, as well as the addition, deletion, modification, and query management of the installation packages, and supports the management of the accelerator card's own software stack for the mainstream domestic AI accelerator card driver installation packages, monitoring tool packages, and underlying dependency packages for training and inference; the management of installation packages includes the fields of the operating system, version, CPU architecture, installation package, installation package verification code, and size supported by the installation package; such as the Cambricon AI accelerator card, it supports the driver of mainstream AI accelerator cards such as Cambricon 370-X8 and 370-S4, Cambricon NeuWareSDK, Cambricon PyTorch deep learning framework, Cambricon's commonly used Deepspeed, Flash Attention, Transformers, PEFT and other library tools and libraries;
[0099] Toolset management provides a management interface for commonly used script toolsets for domestic AI accelerator cards, realizing the functions of adding, deleting, modifying and querying toolsets; the toolset integrates common tool scripts for installation, monitoring and collection, adaptation testing and fault detection of software packages of commonly used AI accelerator cards such as Ascend, Cambrian and Tianshu Zhixin; because AI accelerator cards can be used on different CPU architectures and different operating systems, toolset management includes adapted operating systems, CPU architectures, installation package scripts and verification methods; adaptation scripts include supported AI accelerator card manufacturers, AI accelerator card types, AI accelerator card adaptation items and performance benchmark values, physical machine CPU architectures, operating system types, adaptation scripts and script protocols and return values.
[0100] The resource management module in this embodiment provides the adapter with a resource interface of the domestic AI accelerator card, realizes automatic discovery, rapid identification and topology perception of the AI accelerator card, and implements the node AI accelerator card driver installation and node expansion initialization based on the script tool set, so that the domestic AI accelerator card resources can be quickly connected to the cloud platform;
[0101] The resource management module has computing power registration and node pooling functions;
[0102] Among them, when registering computing power, the registration of computing power resources in the cloud platform is realized based on the plug-in extension mechanism. For various CPUs and domestic AI acceleration card resources on the computing power cluster nodes, a standardized interface is provided to enable the computing power cluster to identify the computing power resources on the nodes, thereby realizing the management and scheduling of computing power resources; and based on the system PXE automatic installation technology, a system automatic installation framework for heterogeneous resources is developed to solve the ability of adaptive installation of multi-architecture operating systems, realize automatic matching of corresponding system images according to different CPU architectures, and complete the installation of node operating systems; the cloud platform scans the device information on the node PCIE, combines the manufacturer and device feature code of the device, and quickly identifies the manufacturer and model information of the domestic AI acceleration card and network card. Based on the capabilities of the script tool set, the installation of the software stack of the domestic AI acceleration card accessory driver and toolkit is realized, and the automatic configuration and initialization of the domestic AI acceleration card of GPU and NPU is realized;
[0103] Node pooling means that after the CPU and domestic AI accelerator card on the node are initialized, the corresponding identifier is added to the node according to the node's CPU architecture and AI accelerator card type, and similar resources are divided into a unified resource pool. For example, if the node server is a Hygon CPU and a Cambrian 370-X8 AI accelerator card, the node can be added to the resource pool with the Hygon_Cambican370X8 label, so that unified management and scheduling of similar nodes can be achieved.
[0104] As attached Figure 2 As shown, the adaptation task management module in this embodiment provides an adaptation management page, so that the adaptation personnel can formulate adaptation tasks according to the characteristics of different AI accelerator cards, schedule the corresponding nodes to perform adaptation tasks according to the load of the nodes, and monitor the execution status of the tasks based on the monitoring indicators of the CPU, memory and domestic accelerator card utilization of the nodes to ensure the smooth execution of the tasks; the details are as follows:
[0105] (1) Generate adaptation tasks: The adaptation task generation module provides a visual management interface for managing the adaptation test task items of domestic AI accelerator cards. Among them, the test task items include key task items and indicator task items. Key task items are crucial to the overall adaptation. If the indicator value of the overall adaptation is lower than the standard value, the entire adaptation process will be judged as failed. Indicator task items are assigned different weights according to their importance, with weight levels ranging from 1 to 5. The adaptation results will be calculated based on the indicator values and weights of all task items. The adapter adds adaptation tasks according to the characteristics and uses of the domestic AI accelerator card, and sets the list of adaptation task items and their weights. , and adjust the task items as needed; for conventional domestic AI accelerator card adaptation, including driver installation and testing, operating system compatibility testing, toolkit verification, software stack verification, monitoring service verification, training and reasoning framework verification, benchmark performance testing, common model performance testing and service product function testing, and take driver test results and software stack verification as key indicators, and set the weights of INT8, FP16 and FP32 benchmark performance indicators to 1, 3, and 2, reflecting the emphasis on AI performance; after the adaptation task is maintained, the adaptation personnel start the corresponding adaptation task, and the task scheduling center schedules and executes the adaptation task;
[0106] (2) Task scheduling: Design a task scheduler to complete the scheduling of each adaptation task and its task items, and schedule each task item to the optimal node for execution. Dynamically adjust the task scheduling based on the node load and task monitoring data to ensure the smooth execution of the task. The core of task scheduling is the task scheduling algorithm. From the resource level, when selecting execution nodes for adaptation tasks, a balanced scheduling strategy is implemented based on the computing power of the node (such as CPU, AI accelerator card, memory, etc.) and its current load to maximize resource utilization. At the same time, a task scheduling algorithm of "resource pool filtering + multi-dimensional feature weight" is designed. The core goal is to select nodes with relatively low current load and computing power that meet the task requirements from qualified nodes to execute tasks.
[0107] (3) Task execution: After the task is scheduled, the task manager sends it to the corresponding node for execution according to the protocol of the task item. After the task is scheduled, the task manager obtains the access method of the scheduling node through the node registration information and sends the adaptation task item to the corresponding node, such as sending the task execution script to the node through SSH remote call. The execution node starts the adaptation task by executing the task script. If an installation package is required, it will automatically download and execute it according to the script content and return the process identifier of the task. After the task is executed, the corresponding adaptation performance and verification result data are returned according to the return value of the script. The relevant log information generated during the task execution process is automatically synchronized to the data storage module for storage.
[0108] (4) Task monitoring: To ensure the normal execution of adaptation tasks, a comprehensive task status monitoring system is built based on the monitoring data of CPU utilization, domestic AI acceleration card utilization and memory utilization on the nodes provided by the cloud platform. If the resource utilization of a node exceeds the limit, an alarm will be issued through email, SMS, etc., and the task scheduling of the node will be stopped. The node will be rescheduled after the node utilization returns to normal levels. Each adaptation task will be assigned a unique ID (including the adaptation item ID and the adaptation task ID) to achieve accurate identification and tracking, and real-time tracking of task execution progress and status. Once the task execution time exceeds the threshold, it will automatically intervene to ensure the effective utilization of system resources and the controllability of the task.
[0109] The task scheduling algorithm of "resource pool filtering + multi-dimensional feature weight" in this embodiment is as follows:
[0110] First, filter the resource pool according to the task item requirements to determine the scope of the task execution nodes. And filter the resource pool according to the node CPU architecture and domestic AI accelerator card type requirements of any task item, and filter the resource pool with reference to the resource pool tag information to select the resource pool that meets the requirements. For example, if a task execution requires the Hygon CPU architecture and the Cambrian 370-X8 AI accelerator card, the task scheduler will traverse the resource pool and select the resource pool Hygon_Cambican370X8 that contains both of these identifiers to determine the scope of the task execution nodes.
[0111] Then, based on the multi-dimensional feature weight evaluation, the comprehensive available computing power of each node is calculated, and the optimal node is selected for execution; the details are as follows:
[0112] ① Define the feature set: determine the dimensions or features used for evaluation. The features to be evaluated are closely related to the requirements for task execution. Specifically, for domestic AI accelerator card adaptation, the AI accelerator card utilization, CPU utilization, memory utilization, and network bandwidth occupancy are used;
[0113] ②Weight allocation: According to the demand for computing resources for task execution, a weight value is assigned to each feature to distinguish the importance of each type of resource (for example, if AI computing power is intensive, the weight of the AI accelerator card is increased). The weight value is adjusted according to the needs of specific tasks. For AI performance adaptation, the weights of AI accelerator card utilization, CPU utilization, memory utilization, and network bandwidth utilization are set to 4, 3, 2, and 1 respectively;
[0114] ③ Comprehensive quantitative evaluation: The comprehensive score of each candidate node is calculated based on the weight and quantization value. The node with the highest comprehensive score is scheduled to perform the adaptation task;
[0115] Among them, the resource availability rate ResourceIdleRate of the CPU, AI accelerator card, and memory on the nodeji The calculation formula is as follows:
[0116]
[0117] Wherein, j represents the node identifier; i represents the resource type identifier;
[0118] Resource weight * current node availability can be used to get the resource scheduling score ResourceSchedScore ji , the formula is as follows:
[0119] ResourceSchedScore ji = ResourceIdleRate ji *ResourceWeighter i ;
[0120] By setting ResourceSchedScore ji = ResourceIdleRate ji *ResourceWeighter i Calculated resource scheduling scores for each type ResourceSchedScore ji By summing up, we can calculate the ComprehensiveScore of the overall computing power of each node at present. j , the formula is as follows:
[0121]
[0122] By comparing the overall computing power scores of each node, the optimal computing power node can be selected, thereby achieving balanced scheduling based on computing power quantification.
[0123] The data storage module in this embodiment designs a consent management framework for the adaptation result set, fully exploring the reuse value of adaptation records of various models;
[0124] The adaptation results are divided into three forms: structured data, log information, and business file data;
[0125] Among them, for the performance of the adaptation task and the indicative structured data of the adaptation conclusion, the data is directly saved to the public MySQL database for centralized management and quick access;
[0126] Adapt the generated log information and implement unified management through the log management component Kibana;
[0127] The business file data generated during the adaptation process is directly stored in MinIO so that the business team can easily query and analyze the data;
[0128] The data storage module also introduces a global environment variable table (ENV table) to comprehensively record the environment configuration information of the adaptation task, thereby enhancing configurability and flexibility.
[0129] The adaptation analysis module in this embodiment analyzes the adaptation results based on the archived data of the adaptation task. The adaptation analysis module has the function of automatically forming an adaptation report and comparing the adaptation conclusions;
[0130] Among them, the automatic formation of the adaptation report is to automatically calculate the adaptation indicators and form an adaptation conclusion report; AI accelerator cards have many indicators, and each indicator is compared with the benchmark indicator, which requires a large amount of calculation and is prone to errors. A calculation rule of "key item rejection + weight evaluation" is designed to realize the automatic calculation of adaptation indicators according to the rules;
[0131] According to the calculation rules of "key item rejection + weight evaluation", the overall adaptation evaluation score is automatically calculated to form an adaptation analysis report;
[0132] By comparing the adaptation data of domestic AI accelerator cards in different complete machines, operating systems and large-model training tasks and analyzing the reports, we comprehensively evaluate the stability of domestic AI accelerator cards, complete machine compatibility and applicable scenarios, which will facilitate the subsequent formulation of delivery plans based on business needs.
[0133] The calculation rules of "key item rejection + weight evaluation" in this embodiment are as follows:
[0134] ① Traverse each key task item in the adaptation task, compare the actual indicators of the corresponding task items with the benchmark values. If the actual indicators are lower than the benchmark value requirements, the overall adaptation fails and the subsequent weight evaluation can be skipped; if the actual indicators meet or exceed the benchmark value requirements, compare other key items, and if they all pass the weight evaluation;
[0135] ② Carry out comprehensive quantitative evaluation based on the weight of the task items. Specifically, use i to represent any task item. First, according to the formula Calculate the actual value of task item i indicator actualValue i and benchmarkValue i Deviation of TaskEviation i If the actual value is greater than the reference value, the positive deviation result is greater than 0, otherwise the negative deviation result is less than 0; then according to the formula The formula The calculated deviation of each indicator is combined with the task weight TaskWeighter i By summing them up, we can calculate the overall score OverallAdaptScore of each task item in the current adaptation task.
[0136] Embodiment 2:
[0137] This embodiment provides a method for a cloud platform to adaptively adapt to a domestic AI accelerator card. The method is as follows:
[0138] S1. Based on the characteristics and software stack of domestic AI accelerator cards, driver installation, software stack initialization and monitoring services are managed through scripts and integrated into the script tool set to achieve unified management of tools;
[0139] S2. Cloud platform capabilities based on script tool sets can realize automatic discovery, rapid identification and topology perception of domestic AI accelerator cards. The initialization tool can be used to install the domestic AI accelerator card driver on the node and initialize the node expansion, so that domestic AI accelerator card resources can be quickly connected to the cloud platform.
[0140] S3. Generate adaptation tasks: According to the characteristics and adaptation requirements of domestic AI accelerator cards, analyze the adaptation verification content to be performed, and formulate an adaptation task list based on the script tool set capabilities to form specific adaptation tasks;
[0141] S4. Adaptation task scheduling: Design a task scheduler to complete the scheduling of each adaptation task and its task items, schedule each task item to the optimal node for execution, and dynamically adjust the task scheduling according to the node load and task monitoring data to ensure the smooth execution of the task; among them, task items are clearly divided into two categories according to the importance of adaptation: key task items and indicator task items; key task items are crucial to the overall adaptation, and once their indicator values are lower than the standard values, the entire adaptation process will be judged as failed; indicator task items are assigned different weights according to their importance, with weight levels ranging from 1 to 5; the adaptation results will be calculated based on the indicator values and weights of all task items;
[0142] S5, adaptation task execution: The task manager obtains the access mode of the scheduling node through the node registration information, sends the adaptation task item to the corresponding scheduling node, completes the execution of the adaptation task, and records the adaptation log and returns the adaptation result. The data storage module saves the adaptation result and log;
[0143] S6. Adaptive task monitoring: Based on the CPU utilization, AI accelerator card utilization, and memory utilization monitoring data on the nodes provided by the cloud platform, monitor the task nodes and task status, and track the task execution progress and status in real time. Once the task execution time exceeds the threshold, it will automatically intervene to ensure the effective use of system resources and the controllability of tasks.
[0144] S7. Adaptation result analysis: Automatically obtain adaptation indicators, automatically calculate the overall adaptation comprehensive evaluation score based on the indicator weights, and form an adaptation conclusion report; and based on the comparison with historical adaptation reports, analyze the compatibility, stability and applicable scenarios of domestic AI acceleration cards.
[0145] The script toolset in this embodiment adopts a modular and version control strategy, and realizes accurate classification and rapid retrieval of script functions by building a unified script repository and combining metadata tag technology; wherein, the script toolset includes the script's CPU architecture, operating system version, script protocol, and installation packages also include the operating system and version supported by the installation package, CPU architecture, installation package content, installation package verification code and size fields.
[0146] In the adaptation task execution process in step S5 of this embodiment, the task scheduling algorithm of "resource pool filtering + multi-dimensional feature weight" is adopted, which is specifically as follows:
[0147] First, filter the resource pool according to the task item requirements to determine the scope of the task execution nodes. And filter the resource pool according to the node CPU architecture and domestic AI accelerator card type requirements of any task item, and filter the resource pool with reference to the resource pool tag information to select the resource pool that meets the requirements. For example, if a task execution requires the Hygon CPU architecture and the Cambrian 370-X8 AI accelerator card, the task scheduler will traverse the resource pool and select the resource pool Hygon_Cambican370X8 that contains both of these identifiers to determine the scope of the task execution nodes.
[0148] Then, based on the multi-dimensional feature weight evaluation, the comprehensive available computing power of each node is calculated, and the optimal node is selected for execution; the details are as follows:
[0149] ① Define the feature set: determine the dimensions or features used for evaluation. The features to be evaluated are closely related to the requirements for task execution. Specifically, for domestic AI accelerator card adaptation, the AI accelerator card utilization, CPU utilization, memory utilization, and network bandwidth occupancy are used;
[0150] ②Weight allocation: According to the demand for computing resources for task execution, a weight value is assigned to each feature to distinguish the importance of each type of resource (for example, if AI computing power is intensive, the weight of the AI accelerator card is increased). The weight value is adjusted according to the needs of specific tasks. For AI performance adaptation, the weights of AI accelerator card utilization, CPU utilization, memory utilization, and network bandwidth utilization are set to 4, 3, 2, and 1 respectively;
[0151] ③ Comprehensive quantitative evaluation: The comprehensive score of each candidate node is calculated based on the weight and quantization value. The node with the highest comprehensive score is scheduled to perform the adaptation task;
[0152] Among them, the resource availability rate ResourceIdleRate of the CPU, AI accelerator card, and memory on the node ji The calculation formula is as follows:
[0153]
[0154] Wherein, j represents the node identifier; i represents the resource type identifier;
[0155] Resource weight * current node availability can be used to get the resource scheduling score ResourceSchedScore ji , the formula is as follows:
[0156] ResourceSchedScore ji = ResourceIdleRate ji *ResourceWeighter i ;
[0157] By setting ResourceSchedScore ji = ResourceIdleRate ji *ResourceWeighter i Calculated resource scheduling scores for each type ResourceSchedScore ji By summing up, we can calculate the ComprehensiveScore of the overall computing power of each node at present. j , the formula is as follows:
[0158]
[0159] By comparing the overall computing power scores of each node, the optimal computing power node can be selected, thereby achieving balanced scheduling based on computing power quantification.
[0160] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A device for adaptively adapting a cloud platform to a domestic AI accelerator card, characterized in that: The device includes a script tool set, a resource management module, an adaptation task management module, a data storage module and an adaptation analysis module; Among them, the script tool set integrates the recognition, perception, driving and monitoring script tools of the physical machine accessories of the CPU and domestic AI accelerator card, which are used to automatically realize the hardware recognition, driver installation and hardware status monitoring functions according to the characteristics of the hardware; The resource management module is used to achieve platform access to AI servers and management of domestic AI accelerator cards, and to monitor the status and load of nodes and AI accelerator cards in real time; The adaptation task management module is used to provide an adaptation management page, allowing adapters to formulate adaptation tasks based on the characteristics of different AI accelerator cards and schedule and execute tasks based on the node load, etc. The data storage module is used to save the adaptation results and logs of the adaptation process to facilitate the tracing of the adaptation process; The adaptation analysis module is used to analyze the adaptation results and logs, and form the final adaptation conclusion based on the performance indicator characteristics of the domestic AI accelerator card itself.
2. The device for adaptively adapting a domestic AI accelerator card to a cloud platform according to claim 1, characterized in that: The script tool set develops plug-in script set management technology, adopts modularization and version control strategies, builds a unified script repository, and combines metadata tag technology to achieve accurate classification and rapid retrieval of script functions; The script tool set is an adapter with a visual script management interface to implement script management for driver installation and monitoring collection under different CPU architectures of domestic AI accelerator cards; script management includes installation package management and tool set management; Among them, installation package management refers to the management of domestic AI accelerator card installation packages, as well as the addition, deletion, modification and query management of installation packages, and supports the management of the accelerator card's own software stack for domestic AI accelerator card driver installation packages, monitoring tool packages, and underlying dependency packages for training and reasoning; installation package management includes the operating system, version, CPU architecture, installation package, installation package verification code and size fields supported by the installation package; Toolset management provides a management interface for the commonly used script toolset for domestic AI accelerator cards, realizing the functions of adding, deleting, modifying and querying the toolset; the toolset integrates commonly used tool scripts for AI accelerator card software package installation, monitoring collection, adaptation testing and fault detection; toolset management includes adapted operating systems, CPU architectures, installation package scripts and verification methods; adaptation scripts include supported AI accelerator card manufacturers, AI accelerator card types, AI accelerator card adaptation items and performance benchmark values, physical machine CPU architectures, operating system types, adaptation scripts and script protocols and return values.
3. The device for adaptively adapting a domestic AI accelerator card to a cloud platform according to claim 1, characterized in that: The resource management module provides adapters with a resource interface for domestic AI accelerator cards, enabling automatic discovery, rapid identification, and topology awareness of AI accelerator cards. It also implements node AI accelerator card driver installation and node expansion initialization based on a script tool set, enabling domestic AI accelerator card resources to quickly access the cloud platform. The resource management module has computing power registration and node pooling functions; Among them, when registering computing power, the registration of computing power resources in the cloud platform is realized based on the plug-in extension mechanism. For various CPUs and domestic AI acceleration card resources on the computing power cluster nodes, a standardized interface is provided to enable the computing power cluster to identify the computing power resources on the nodes, thereby realizing the management and scheduling of computing power resources; and based on the system PXE automatic installation technology, a system automatic installation framework for heterogeneous resources is developed to solve the ability of adaptive installation of multi-architecture operating systems, realize automatic matching of corresponding system images according to different CPU architectures, and complete the installation of node operating systems; the cloud platform scans the device information on the node PCIE, combines the manufacturer and device feature code of the device, and quickly identifies the manufacturer and model information of the domestic AI acceleration card and network card. Based on the capabilities of the script tool set, the installation of the software stack of the domestic AI acceleration card accessory driver and toolkit is realized, and the automatic configuration and initialization of the domestic AI acceleration card of GPU and NPU is realized; Node pooling means that after the CPU and domestic AI accelerator card on the node are initialized, corresponding identifiers are added to the node according to the node's CPU architecture and AI accelerator card type, and similar resources are divided into a unified resource pool.
4. The device for adaptively adapting a domestic AI accelerator card to a cloud platform according to claim 1, characterized in that: The adaptation task management module provides an adaptation management page, which enables the adaptation personnel to formulate adaptation tasks according to the characteristics of different AI accelerator cards, schedule the corresponding nodes to perform adaptation tasks according to the node load, and monitor the execution status of tasks based on the monitoring indicators of the node's CPU, memory and domestic accelerator card utilization to ensure the smooth execution of tasks; the details are as follows: Generate adaptation tasks: The adaptation task generation module provides a visual management interface for managing the adaptation test task items of domestic AI accelerator cards; among them, the test task items include key task items and indicator task items; key task items are crucial to the overall adaptation. If the indicator value of the overall adaptation is lower than the standard value, the entire adaptation process will be judged as failed; indicator task items are given different weights according to their importance, with weight levels ranging from 1 to 5; the adaptation results will be calculated based on the indicator values and weights of all task items; the adapter adds adaptation tasks according to the characteristics and uses of the domestic AI accelerator card, and sets the list of adapted task items and their weights, and Adjust the task items as needed; for conventional domestic AI accelerator card adaptation, including driver installation and testing, operating system compatibility testing, toolkit verification, software stack verification, monitoring service verification, training and reasoning framework verification, benchmark performance testing, common model performance testing and service product function testing, and take driver test results and software stack verification as key indicators, and set the weights of INT8, FP16 and FP32 benchmark performance indicators to 1, 3, and 2, reflecting the emphasis on AI performance; after the adaptation task is maintained, the adaptation personnel start the corresponding adaptation task, and the task scheduling center schedules and executes the adaptation task; Task scheduling: Design a task scheduler to complete the scheduling of each adaptation task and its task items, schedule each task item to the optimal node for execution, and dynamically adjust the task scheduling according to the node load and task monitoring data to ensure the smooth execution of the task; the core of task scheduling is the task scheduling algorithm; from the resource level, when selecting the execution node for the adaptation task, a balanced scheduling strategy is implemented according to the computing power of the node and its current load to maximize resource utilization; at the same time, a task scheduling algorithm of "resource pool filtering + multi-dimensional feature weight" is designed. The core goal is to select nodes with relatively low current load and computing power that meet the task requirements from qualified nodes to execute tasks; Task execution: After the task is scheduled, the task manager sends it to the corresponding node for execution according to the protocol of the task item; after the task is scheduled, the task manager obtains the access method of the scheduling node through the node registration information and sends the adaptation task item to the corresponding node; the execution node starts the adaptation task by executing the task script; after the task is executed, the corresponding adaptation performance and verification result data are returned according to the return value requirements of the script; the relevant log information generated during the task execution process is automatically synchronized to the data storage module for storage; Task monitoring: Based on the monitoring data of CPU utilization, domestic AI acceleration card utilization and memory utilization on the node provided by the cloud platform; each adaptation task will be assigned a unique ID to achieve accurate identification and tracking, and real-time tracking of task execution progress and status. Once the task execution time exceeds the threshold, it will automatically intervene to ensure the effective use of system resources and the controllability of tasks.
5. The device for adaptively adapting a domestic AI accelerator card to a cloud platform according to claim 4 is characterized in that: The task scheduling algorithm of "resource pool filtering + multi-dimensional feature weight" is as follows: First, filter the resource pool according to the task item requirements to determine the scope of the task execution node; and filter the resource pool according to the node CPU architecture and domestic AI accelerator card type requirements of any task item, and filter the resource pool with reference to the resource pool tag information to select the resource pool that meets the requirements; Then, based on the multi-dimensional feature weight evaluation, the comprehensive available computing power of each node is calculated, and the optimal node is selected for execution; the details are as follows: ① Define the feature set: determine the dimensions or features used for evaluation. The features to be evaluated are closely related to the requirements for task execution. Specifically, for domestic AI accelerator card adaptation, the AI accelerator card utilization, CPU utilization, memory utilization, and network bandwidth occupancy are used; ②Weight allocation: According to the demand for computing resources in task execution, a weight value is assigned to each feature to distinguish the importance of each resource type. The weight value is adjusted according to the needs of specific tasks. For AI performance adaptation, the weights of AI accelerator card utilization, CPU utilization, memory utilization, and network bandwidth utilization are set to 4, 3, 2, and 1 respectively; ③ Comprehensive quantitative evaluation: The comprehensive score of each candidate node is calculated based on the weight and quantization value. The node with the highest comprehensive score is scheduled to perform the adaptation task; Among them, the resource availability rate ResourceIdleRate of the CPU, AI accelerator card, and memory on the node ji The calculation formula is as follows: Wherein, j represents the node identifier; i represents the resource type identifier; Resource weight * current node availability can be used to get the resource scheduling score ResourceSchedScore ji , the formula is as follows: ResourceSchedScore ji =ResourceIdleRate ji *ResourceWeighter i ; By setting ResourceSchedScore ji = ResourceIdleRate ji *ResourceWeighter i Calculated resource scheduling scores for each type ResourceSchedScore ji By summing up, we can calculate the ComprehensiveScore of the overall computing power of each node at present. j , the formula is as follows: By comparing the overall computing power scores of each node, the optimal computing power node can be selected, thereby achieving balanced scheduling based on computing power quantification.
6. The device for adaptively adapting a domestic AI accelerator card to a cloud platform according to claim 1, characterized in that: The data storage module designs a consent management framework for the adaptation result set, fully exploring the reuse value of adaptation records of various models; The adaptation results are divided into three forms: structured data, log information, and business file data; Among them, for the performance of the adaptation task and the indicative structured data of the adaptation conclusion, the data is directly saved to the public MySQL database for centralized management and quick access; Adapt the generated log information and implement unified management through the log management component Kibana; The business file data generated during the adaptation process is directly stored in MinIO so that the business team can easily query and analyze the data; The data storage module also comprehensively records the environment configuration information of the adaptation task by introducing a global environment variable table.
7. The device for adaptively adapting a domestic AI accelerator card to a cloud platform according to claim 1, characterized in that: The adaptation analysis module analyzes the adaptation results based on the archived data of the adaptation task. The adaptation analysis module has the function of automatically forming an adaptation report and comparing the adaptation conclusions; Among them, the automatic formation of the adaptation report is to automatically calculate the adaptation indicators and form an adaptation conclusion report; and a calculation rule of "key item rejection + weight evaluation" is designed to realize the automatic calculation of the adaptation indicators according to the rule; According to the calculation rules of "key item rejection + weight evaluation", the overall adaptation evaluation score is automatically calculated to form an adaptation analysis report; By comparing the adaptation data of domestic AI accelerator cards in different complete machines, operating systems and large-model training tasks and analyzing the reports, we comprehensively evaluate the stability of domestic AI accelerator cards, complete machine compatibility and applicable scenarios, which will facilitate the subsequent formulation of delivery plans based on business needs.
8. The device for adaptively adapting a domestic AI accelerator card to a cloud platform according to claim 7, characterized in that: The calculation rules for "key item rejection + weight evaluation" are as follows: Traverse each key task item in the adaptation task, compare the actual index of the corresponding task item with the benchmark value. If the actual index is lower than the benchmark value requirement, the overall adaptation fails and the subsequent weight evaluation can be skipped; If the actual index meets or exceeds the benchmark value requirement, other key items will be compared and all can pass the weight assessment; Perform a comprehensive quantitative evaluation based on the weight of the task items. Specifically, use i to represent any task item. First, according to the formula Calculate the actual value of task item i indicator actualValue i and benchmarkValue i Deviation of TaskEviation i If the actual value is greater than the reference value, the positive deviation result is greater than 0, otherwise the negative deviation result is less than 0; then according to the formula The formula The calculated deviation of each indicator is combined with the task weight TaskWeighter i By summing them up, we can calculate the overall score OverallAdaptScore of each task item in the current adaptation task.
9. A method for adaptively adapting a domestic AI accelerator card to a cloud platform, characterized in that: The method is as follows: Based on the characteristics and software stack of domestic AI accelerator cards, driver installation, software stack initialization and monitoring services are managed through scripts and integrated into the script tool set to achieve unified management of tools. Based on the cloud platform capabilities of the script tool set, the automatic discovery, rapid identification and topology perception of domestic AI accelerator cards are realized. The installation of domestic AI accelerator card drivers and the initialization of node expansion are realized through the initialization tool, so that domestic AI accelerator card resources can be quickly connected to the cloud platform; Generate adaptation tasks: According to the characteristics and adaptation requirements of domestic AI accelerator cards, analyze the adaptation verification content to be performed, and formulate an adaptation task list based on the script tool set capabilities to form specific adaptation tasks; Adaptation task scheduling: Design a task scheduler to complete the scheduling of each adaptation task and its task items, schedule each task item to the optimal node for execution, and dynamically adjust the task scheduling according to the node load and task monitoring data to ensure the smooth execution of the task; among them, task items are clearly divided into two categories according to the importance of adaptation: key task items and indicator task items; key task items are crucial to the overall adaptation. Once their indicator values are lower than the standard values, the entire adaptation process will be judged as failed; indicator task items are assigned different weights according to their importance, with weight levels ranging from 1 to 5; the adaptation results will be calculated based on the indicator values and weights of all task items; Adaptation task execution: The task manager obtains the access method of the scheduling node through the node registration information, sends the adaptation task item to the corresponding scheduling node, completes the execution of the adaptation task, and records the adaptation log and returns the adaptation result. The data storage module saves the adaptation result and log; Adaptive task monitoring: Based on the CPU utilization, AI accelerator card utilization, and memory utilization monitoring data on the nodes provided by the cloud platform, monitor the task nodes and task status, and track the task execution progress and status in real time. Once the task execution time exceeds the threshold, it will automatically intervene to ensure the effective use of system resources and the controllability of tasks. Adaptation result analysis: Automatically obtain adaptation indicators, automatically calculate the overall adaptation comprehensive evaluation score based on the indicator weights, and form an adaptation conclusion report; and based on the comparison with historical adaptation reports, analyze the compatibility, stability and applicable scenarios of domestic AI accelerator cards.
10. The method for adaptively adapting a domestic AI accelerator card to a cloud platform according to claim 9, characterized in that: The script tool set adopts modularization and version control strategies. By building a unified script repository and combining metadata tagging technology, it can achieve accurate classification and rapid retrieval of script functions. The script tool set includes the script's CPU architecture, operating system version, script protocol, and installation package-supported operating systems and versions, CPU architecture, installation package content, installation package verification code, and size fields. During the execution of the adaptation task, the task scheduling algorithm of "resource pool filtering + multi-dimensional feature weight" is adopted, as follows: First, filter the resource pool according to the task item requirements to determine the scope of the task execution node; and filter the resource pool according to the node CPU architecture and domestic AI accelerator card type requirements of any task item, and filter the resource pool with reference to the resource pool tag information to select the resource pool that meets the requirements; Then, based on the multi-dimensional feature weight evaluation, the comprehensive available computing power of each node is calculated, and the optimal node is selected for execution; the details are as follows: ① Define the feature set: determine the dimensions or features used for evaluation. The features to be evaluated are closely related to the requirements for task execution. Specifically, for domestic AI accelerator card adaptation, the AI accelerator card utilization, CPU utilization, memory utilization, and network bandwidth occupancy are used; ②Weight allocation: According to the demand for computing resources in task execution, a weight value is assigned to each feature to distinguish the importance of each resource type. The weight value is adjusted according to the needs of specific tasks. For AI performance adaptation, the weights of AI accelerator card utilization, CPU utilization, memory utilization, and network bandwidth utilization are set to 4, 3, 2, and 1 respectively; ③ Comprehensive quantitative evaluation: The comprehensive score of each candidate node is calculated based on the weight and quantization value. The node with the highest comprehensive score is scheduled to perform the adaptation task; Among them, the resource availability rate ResourceIdleRate of the CPU, AI accelerator card, and memory on the node ji The calculation formula is as follows: Wherein, j represents the node identifier; i represents the resource type identifier; Resource weight * current node availability can be used to get the resource scheduling score ResourceSchedScore ji , the formula is as follows: ResourceSchedScore ji =ResourceIdleRate ji *ResourceWeighter i ; By setting ResourceSchedScore ji = ResourceIdleRate ji *ResourceWeighter i Calculated resource scheduling scores for each type ResourceSchedScore ji By summing up, we can calculate the ComprehensiveScore of the overall computing power of each node at present. j , the formula is as follows: By comparing the overall computing power scores of each node, the optimal computing power node can be selected, thereby achieving balanced scheduling based on computing power quantification.
Citation Information
Patent Citations
Intelligent networking vehicle intelligent driving function cloud simulation test system and method based on DevOps
CN114647585A
Computing power resource self-adaptive dynamic scheduling method and system for computing network intelligent fusion
CN116708326A
Method for scheduling heterogeneous AI accelerator card resources in Kubernetes cluster
CN117632472A
Parallel scheme planning and model training method, program product, medium and equipment
CN118227314A
Cloud resource automatic allocation system
CN118363765A
Cited By
LLM application development platform resource calculation method based on domestic CPU and OS
CN120429126A