Driving management method and device of heterogeneous computing power equipment, medium and equipment
By monitoring the driver resource changes of heterogeneous computing power devices on the control node and generating custom driver instance resources or marking processing, the problem of low efficiency of heterogeneous device driver management is solved, and the automated management of heterogeneous device drivers is realized, which improves the Operation and maintenance efficiency.
Patent Information
- Application Number
- CN202411274969.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2024-12-17
AI Technical Summary
In the prior art, heterogeneous device drivers have low management efficiency, mainly relying on manual or script deployment, and lack of automated management tools.
By deploying a controller on the control node, monitoring the changes in custom driver resources of heterogeneous computing devices, generating node-level custom driver instance resources or performing marking processing based on predefined templates, triggering the executor to perform corresponding actions, and realizing the driver Automatic deployment, expansion, reduction, upgrade and deletion of
It improves the management efficiency of heterogeneous device drivers, realizes automatic changes in drivers, reduces manual intervention, and improves operation and maintenance efficiency.
Smart Images

Figure CN119149117A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of driver management technology, and in particular to a driver management method, device, medium, and equipment for heterogeneous computing devices. Background Art
[0002] In recent years, with the development of artificial intelligence and various cloud-edge devices, various heterogeneous devices have been increasingly widely used, for example, various graphics processors (GPUs) have been used. At the same time, with the development of container technology and the development of the container orchestration system Kubernetes, various heterogeneous devices have also been applied to containers. Container technology solves the application scheduling problem of heterogeneous devices. Among them, heterogeneous devices refer to a collection of multiple different types of devices, such as various computing devices, different types of GPUs, CPUs, etc. However, the premise of using heterogeneous devices is to install the corresponding drivers on the host machine, and the management of drivers is currently a relatively vacant field, which is more dependent on manual or script deployment, which is inefficient. Summary of the invention
[0003] In response to at least one of the above technical problems, an embodiment of the present invention provides a driver management method and apparatus, medium, and equipment for a heterogeneous computing device.
[0004] In a first aspect, a driver management method for a heterogeneous computing device provided by an embodiment of the present invention is executed by a controller deployed on a control node, and the method includes:
[0005] Monitoring the custom driver resources of the heterogeneous computing power device; wherein the custom driver resources are created based on a predefined custom driver resource template;
[0006] When a change in the custom driver resource is detected, a target node is determined; the change includes one of creation, deletion, expansion, reduction and upgrade;
[0007] Generate node-level custom driver instance resources or mark the corresponding node-level custom driver instance resources according to a predefined custom driver instance resource template, so as to trigger the executor deployed on the target node to perform corresponding actions, and report the execution results to the controller;
[0008] When the execution result is received, the status of the custom driver instance resource on the target node is displayed.
[0009] In one embodiment, the custom driver resource template includes: the type of custom driver resource, the name of the heterogeneous computing device, the namespace of the custom driver resource, the driver version, the node selected for the custom driver resource, and the image required to install the driver;
[0010] And / or, the custom driver instance resource template includes: the type of custom driver instance resource, the custom driver instance name including the name and node name of the heterogeneous computing device, the namespace of the custom driver instance resource, the driver version, the node of the custom driver instance resource and the image required to install the driver.
[0011] In one embodiment, when a change in the custom driver resource is monitored, the target node is determined, including: if the change is creation, each node selected for the custom driver resource defined in the custom driver resource is used as the target node; correspondingly, according to a predefined custom driver instance resource template, a node-level custom driver instance resource is generated or a node-level custom driver instance resource is marked to trigger the executor deployed on the target node to perform a corresponding action, including: generating a node-level custom driver instance resource to trigger the executor deployed on the target node to deploy the node-level custom driver instance resource on the target node, so as to create the node-level custom driver instance resource on the target node;
[0012] And / or, when a change in the custom driver resource is monitored, a target node is determined, including: if the change is an expansion, a newly added node in the node selected for the custom driver resource defined in the custom driver resource is used as the target node; correspondingly, according to a pre-defined custom driver instance resource template, a node-level custom driver instance resource is generated or a node-level custom driver instance resource is marked to trigger the executor deployed on the target node to perform a corresponding action, including: a node-level custom driver instance resource is generated to trigger the executor deployed on the target node to deploy the node-level custom driver instance resource on the target node to achieve expansion of the node-level custom driver instance resource.
[0013] In one embodiment, before performing a deployment operation or a capacity expansion operation, the executor automatically matches the type, model, CPU architecture and operating system of the heterogeneous computing power device, and executes the corresponding deployment or capacity expansion operation after the automatic matching is successful.
[0014] In one embodiment, when monitoring that the custom driver resource has changed, determining the target node includes:
[0015] If the change is a reduction in capacity, the reduced node among the nodes selected for the custom driver resource defined in the custom driver resource is used as the target node;
[0016] Correspondingly, generating a node-level custom driver instance resource or marking the node-level custom driver instance resource according to a predefined custom driver instance resource template to trigger the executor deployed on the target node to perform a corresponding action includes:
[0017] The node-level custom driver instance resource on the target node is marked for shrinkage to trigger the executor deployed on the target node to delete the node-level custom driver instance resource on the target node to achieve shrinkage of the node-level custom driver instance resource.
[0018] In one embodiment, when monitoring that the custom driver resource has changed, determining the target node includes:
[0019] If the change is deletion, the node to be deleted among the nodes selected for the custom driver resource defined in the custom driver resource is used as the target node;
[0020] Correspondingly, generating a node-level custom driver instance resource or marking the node-level custom driver instance resource according to a predefined custom driver instance resource template to trigger the executor deployed on the target node to perform a corresponding action includes:
[0021] A node-level custom driver instance resource on the target node is marked for deletion to trigger an executor deployed on the target node to delete the node-level custom driver instance resource on the target node.
[0022] In one embodiment, when monitoring that the custom driver resource has changed, determining the target node includes:
[0023] If the change is an upgrade, the node that needs to be upgraded among the nodes selected for the custom driver resource defined in the custom driver resource is used as the target node;
[0024] Correspondingly, generating a node-level custom driver instance resource or marking the node-level custom driver instance resource according to a predefined custom driver instance resource template to trigger the executor deployed on the target node to perform a corresponding action includes:
[0025] The node-level custom driver instance resource on the target node is marked for upgrade to trigger the executor deployed on the target node to perform an upgrade operation on the node-level custom driver instance resource on the target node.
[0026] According to a second aspect, a driver management device for a heterogeneous computing device provided by an embodiment of the present invention is deployed on a controller on a control node, and the device includes:
[0027] A resource monitoring module, used to monitor the custom driver resources of the heterogeneous computing power device; wherein the custom driver resources are created based on a predefined custom driver resource template;
[0028] A target determination module, used to determine a target node when a change in the custom driver resource is detected; the change includes one of creation, deletion, expansion, reduction and upgrade;
[0029] An instance processing module, used to generate a node-level custom driver instance resource or mark the corresponding node-level custom driver instance resource according to a predefined custom driver instance resource template, so as to trigger the executor deployed on the target node to perform a corresponding action, and report the execution result to the controller;
[0030] The status display module is used to display the status of the custom driver instance resource on the target node when receiving the execution result.
[0031] According to a third aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, enables the computer to execute the method provided in the first aspect.
[0032] According to a fourth aspect, an embodiment of the present invention provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method provided in the first aspect is implemented.
[0033] The driver management method, apparatus, medium, and equipment for heterogeneous computing devices provided in the embodiments of the present invention are that the controller monitors the custom driver resources of the heterogeneous computing devices, and when it monitors that the custom driver resources have changed, it determines the target node, and then generates a node-level custom driver instance resource or marks the corresponding node-level custom driver instance resource, so that the executor deployed on the target node performs the corresponding action and reports the execution result to the controller, and then the controller displays the status of the custom driver instance resource on the target node. It can be seen that the embodiments of the present invention manage the driver resources of heterogeneous computing devices by means of custom resources, thereby realizing automatic changes in drivers. Compared with the traditional method of manual or script deployment, the embodiments of the present invention can improve operation and maintenance and management efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1It is a flowchart of a method for managing a driver of a heterogeneous computing device in one embodiment of the present invention;
[0035] Figure 2 This is a structural block diagram of a driver management device for heterogeneous computing power equipment in one embodiment of the present invention. DETAILED DESCRIPTION
[0036] In a first aspect, an embodiment of the present invention provides a driver management method for a heterogeneous computing device, the method being executed by a controller deployed on a control node, see Figure 1 , the method comprises the following steps S110 to S140:
[0037] S110, monitoring the custom driver resources of the heterogeneous computing power device; wherein the custom driver resources are created based on a predefined custom driver resource template;
[0038] The custom driver resource template includes: the type of custom driver resource, the name of the heterogeneous computing device, the namespace of the custom driver resource, the driver version, the node selected for the custom driver resource, and the image required to install the driver.
[0039] For example, a custom driver resource is as follows:
[0040] kind:deviceDriver
[0041] name:driver1
[0042] namespace:kube-system
[0043] version:1.0.0
[0044] nodeSelector:-node-role.kubernetes.io / node=true
[0045] images: driver:imagename:imagetag
[0046] Among them, kind indicates the type of custom driver resources, name indicates the name of the heterogeneous computing device, namespace indicates the namespace of the custom driver resources, version indicates the driver version, nodeSelector indicates the node selector, that is, the node selected for the custom driver resources, and images indicates the image required to install the driver, which mainly includes the driver installation package.
[0047] Among them, the custom driver resource template is defined by using the custom resource technology of Kubernetes, namely CRD technology. The custom driver resource template can also be called a driver management model.
[0048] S120, when monitoring the custom driver resource to change, determine the target node; the change includes one of creation, deletion, expansion, reduction and upgrade;
[0049] The creation refers to creating a new node-level custom driver instance resource on the node.
[0050] Deletion refers to deleting the node-level custom driver instance resource on the node.
[0051] Among them, capacity expansion refers to increasing the number of nodes that deploy node-level custom driver instance resources.
[0052] Among them, scaling down refers to reducing the number of nodes where node-level custom driver instance resources are deployed.
[0053] The upgrade refers to upgrading the custom driver instance resources on the node.
[0054] S130, generating a node-level custom driver instance resource or marking the corresponding node-level custom driver instance resource according to a predefined custom driver instance resource template, so as to trigger the executor deployed on the target node to perform a corresponding action, and reporting the execution result to the controller;
[0055] Among them, the custom driver instance resource template includes: the type of custom driver instance resource, the custom driver instance name including the name and node name of the heterogeneous computing device, the namespace of the custom driver instance resource, the driver version, the node of the custom driver instance resource and the image required to install the driver.
[0056] The custom driver instance name includes the name of the heterogeneous computing device and the node name.
[0057] For example, a custom driver instance resource is as follows:
[0058] kind:deviceDriverInstance
[0059] name:driver1-node1
[0060] namespace:kube-system
[0061] version:1.0.0
[0062] nodeName:node1
[0063] images: driver:imagename:imagetag
[0064] Among them, kind indicates the type of custom driver instance resource, name indicates the custom driver instance name, namespace indicates the namespace of custom driver instance resource, version indicates the driver version, nodeName indicates the node of custom driver instance resource, and images indicates the image required to install the driver.
[0065] In one embodiment, when the custom driver resource is monitored to have changed, determining the target node in S120 includes: if the change is creation, taking each node defined in the custom driver resource and selected for the custom driver resource as the target node;
[0066] Correspondingly, S130 generates node-level custom driver instance resources or marks the corresponding node-level custom driver instance resources according to a predefined custom driver instance resource template to trigger the executor deployed on the target node to perform corresponding actions, including: generating node-level custom driver instance resources to trigger the executor deployed on the target node to deploy the node-level custom driver instance resources on the target node to achieve the creation of the node-level custom driver instance resources on the target node.
[0067] It can be seen that when the controller detects the creation of custom driver resources for heterogeneous computing devices, the driver deployment is triggered. At this time, the controller selects each node selected by the node selector as the target node based on the node selector of the custom driver resources of the heterogeneous computing device, and then generates node-level custom driver instance resources. After the executor on the target node detects the generation of node-level custom driver instance resources, it triggers the driver deployment action, thereby deploying node-level custom driver instance resources on the target node, and finally reports the deployment results to the controller.
[0068] In one embodiment, when the custom driver resource is monitored to have changed, determining the target node in S120 includes: if the change is expansion, taking a newly added node in the nodes selected for the custom driver resource defined in the custom driver resource as the target node;
[0069] Correspondingly, S130 generates node-level custom driver instance resources or marks the corresponding node-level custom driver instance resources according to a predefined custom driver instance resource template to trigger the executor deployed on the target node to perform corresponding actions, including: generating node-level custom driver instance resources to trigger the executor deployed on the target node to deploy the node-level custom driver instance resources on the target node to achieve expansion of the node-level custom driver instance resources.
[0070] It can be seen that when the controller detects that the number of nodes selected by the node selector of the custom driver resource increases, it is known that capacity expansion is needed, and the newly added nodes among the nodes selected by the node selector are used as the target nodes, and then the node-level custom driver instance resources are generated. After the executor on the target node detects the generation of the node-level custom driver instance resources, the driver deployment action is triggered, thereby deploying the node-level custom driver instance resources on the target node to achieve capacity expansion, and then the expansion result is reported to the controller.
[0071] Among them, before performing deployment operations or expansion operations, the executor can automatically match the type, model, CPU architecture and operating system of heterogeneous computing power devices, and after the automatic matching is successful, perform the corresponding deployment or expansion operations.
[0072] It can be seen that in the creation or expansion scenario, since a new node-level custom driver instance resource is added, the driver automatic matching logic will be entered before the deployment operation or expansion operation: first enter the device type matching, such as whether it is a GPU device or other device, and then further match the device model, such as what manufacturer's GPU is and what model it is. Then enter the CPU architecture matching, supporting x86 and arm64 matching. Then enter the operating system matching, supporting the current mainstream operating systems. If all previous matches are passed, obtain the installation package and install the driver.
[0073] In one embodiment, when the custom driver resource is monitored to have changed, determining the target node in S120 includes: if the change is a reduction in capacity, taking the reduced node in the nodes selected for the custom driver resource defined in the custom driver resource as the target node;
[0074] Correspondingly, S130 generates node-level custom driver instance resources or marks the corresponding node-level custom driver instance resources according to the pre-defined custom driver instance resource template to trigger the executor deployed on the target node to perform corresponding actions, including: marking the node-level custom driver instance resources on the target node for shrinkage to trigger the executor deployed on the target node to delete the node-level custom driver instance resources on the target node to achieve shrinkage of the node-level custom driver instance resources.
[0075] It can be seen that when the controller detects that the number of nodes selected by the node selector of the custom driver resource decreases, it is known that it needs to be scaled down, and the reduced nodes among the nodes selected by the node selector are used as the target nodes, and then the node-level custom driver instance resources on the target nodes are marked for scaling down. After the executor on the target node detects the scaling down mark, the scaling down action is triggered, that is, the node-level custom driver instance resources on the target node are deleted. The scaling down result is then reported to the controller.
[0076] In one embodiment, when the custom driver resource is monitored to have changed, determining the target node in S120 includes: if the change is deletion, taking the node to be deleted from the nodes defined in the custom driver resource and selected for the custom driver resource as the target node;
[0077] Correspondingly, S130 generates node-level custom driver instance resources or marks the corresponding node-level custom driver instance resources according to the pre-defined custom driver instance resource template to trigger the executor deployed on the target node to perform corresponding actions, including: marking the node-level custom driver instance resources on the target node for deletion to trigger the executor deployed on the target node to delete the node-level custom driver instance resources on the target node.
[0078] It can be seen that when the custom driver resources of the heterogeneous computing power device are deleted, the deletion of the driver is triggered. At this time, the controller will use the node where the custom driver instance resources need to be deleted as the target node, and mark the node-level custom driver instance resources on the target node for deletion. When the executor on the target node detects the deletion mark, the deletion action is triggered to delete the node-level custom driver instance resources on the target node, and the result is reported to the controller after the deletion.
[0079] In one embodiment, when the custom driver resource is monitored to have changed, determining the target node in S120 includes: if the change is an upgrade, taking the node that needs to be upgraded among the nodes defined in the custom driver resource and selected for the custom driver resource as the target node;
[0080] Correspondingly, S130 generates node-level custom driver instance resources or marks the corresponding node-level custom driver instance resources according to the pre-defined custom driver instance resource template to trigger the executor deployed on the target node to perform corresponding actions, including: upgrading the node-level custom driver instance resources on the target node to trigger the executor deployed on the target node to upgrade the node-level custom driver instance resources on the target node.
[0081] It can be seen that when the version of the custom driver resources of the heterogeneous computing power device is changed, the driver upgrade is triggered. At this time, the controller takes the node that needs to be upgraded as the target node, and marks the node-level custom driver instance resources on the target node for upgrade. After the executor on the target node detects the upgrade mark, it triggers the upgrade action and reports the upgrade result to the controller.
[0082] S140: When the execution result is received, the status of the custom driver instance resource on the target node is displayed.
[0083] Among them, Kubernetes, as an advanced container orchestration and scheduling system, provides container orchestration and scheduling capabilities, and also provides crd technology. crd is a user-defined resource. Based on crd technology, custom resources can be managed, which provides a powerful tool for managing heterogeneous device drivers.
[0084] Among them, the controller runs on the cluster control plane and monitors the changes of the custom driver resources of the heterogeneous computing power devices. This monitoring can be implemented based on the watch mechanism of Kubernetes. Then the controller determines the action to be performed based on the changes. The judgment of the change can be implemented based on the comparison between the current state and the modified state recorded in the custom driver resources. For creation and expansion, the controller will instantiate the node-level custom driver instance resource on the node specified by the custom driver resource of the heterogeneous computing power device. For shrinking, deletion, and upgrading, the controller performs corresponding marking. Through instantiation or marking processing, the executor on the target node is triggered to perform the corresponding operation.
[0085] Among them, the executor runs on a single node as a resident process. It has a cluster-level controller and a node-level executor, which work together to manage the drive resources of heterogeneous computing devices.
[0086] Among them, the custom resource technology of the container orchestration system Kubernetes, namely the CRD technology, provides a powerful tool for the management of heterogeneous device drivers. The embodiment of the present invention manages the driver resources of heterogeneous computing devices through custom resources, improves operation and maintenance and management efficiency, and builds a bridge for the use of heterogeneous computing devices in container clusters.
[0087] In summary, the controller monitors the custom driver resources of the heterogeneous computing power device. When it monitors that the custom driver resources have changed, it determines the target node, and then generates a node-level custom driver instance resource or marks the node-level custom driver instance resource, so that the executor deployed on the target node performs the corresponding action and reports the execution result to the controller, and then the controller displays the status of the custom driver instance resource on the target node. It can be seen that the embodiment of the present invention manages the driver resources of the heterogeneous computing power device by means of custom resources, thereby realizing automatic driver changes. Compared with the traditional method of manual or script deployment, the embodiment of the present invention can improve operation and maintenance and management efficiency.
[0088] In a second aspect, an embodiment of the present invention provides a driver management device for a heterogeneous computing device, wherein the device is deployed on a controller on a control node, see Figure 2 , the device 100 comprises:
[0089] The resource monitoring module 110 is used to monitor the custom driver resources of the heterogeneous computing power device; wherein the custom driver resources are created based on a predefined custom driver resource template;
[0090] The target determination module 120 is used to determine the target node when monitoring the change of the custom driver resource; the change includes one of creation, deletion, expansion, reduction and upgrade;
[0091] The instance processing module 130 is used to generate a node-level custom driver instance resource or mark the node-level custom driver instance resource according to a predefined custom driver instance resource template, so as to trigger the executor deployed on the target node to perform a corresponding action, and report the execution result to the controller;
[0092] The status display module 140 is used to display the status of the custom driver instance resource on the target node when receiving the execution result.
[0093] In one embodiment, the custom driver resource template includes: the type of custom driver resource, the name of the heterogeneous computing device, the namespace of the custom driver resource, the driver version, the node selected for the custom driver resource, and the image required for installing the driver; and / or, the custom driver instance resource template includes: the type of custom driver instance resource, the custom driver instance name including the name and node name of the heterogeneous computing device, the namespace of the custom driver instance resource, the driver version, the node of the custom driver instance resource, and the image required for installing the driver.
[0094] In one embodiment, the target determination module is specifically used for: if the change is creation, then each node selected for the custom driver resource defined in the custom driver resource is used as the target node; correspondingly, the instance processing module is specifically used for: generating a node-level custom driver instance resource to trigger the executor deployed on the target node to deploy the node-level custom driver instance resource on the target node, so as to achieve the creation of the node-level custom driver instance resource on the target node.
[0095] In one embodiment, the target determination module is specifically used to: if the change is expansion, then the newly added node in the node selected for the custom driver resource defined in the custom driver resource is used as the target node; correspondingly, the instance processing module is specifically used to: generate a node-level custom driver instance resource to trigger the executor deployed on the target node to deploy the node-level custom driver instance resource on the target node to achieve expansion of the node-level custom driver instance resource.
[0096] In one embodiment, before performing a deployment operation or a capacity expansion operation, the executor automatically matches the type, model, CPU architecture and operating system of the heterogeneous computing power device, and executes the corresponding deployment or capacity expansion operation after the automatic matching is successful.
[0097] In one embodiment, the target determination module is specifically used to: if the change is a reduction in capacity, then the reduced node in the nodes selected for the custom driver resource defined in the custom driver resource is used as the target node; correspondingly, the instance processing module is specifically used to: mark the node-level custom driver instance resource on the target node for reduction in capacity, so as to trigger the executor deployed on the target node to delete the node-level custom driver instance resource on the target node, so as to achieve the reduction in capacity of the node-level custom driver instance resource.
[0098] In one embodiment, the target determination module is specifically used for: if the change is deletion, then the node that needs to be deleted among the nodes selected for the custom driver resource defined in the custom driver resource is used as the target node; correspondingly, the instance processing module is specifically used for: marking the node-level custom driver instance resource on the target node for deletion to trigger the executor deployed on the target node to delete the node-level custom driver instance resource on the target node.
[0099] In one embodiment, the target determination module is specifically used for: if the change is an upgrade, then the node that needs to be upgraded among the nodes selected for the custom driver resource defined in the custom driver resource is used as the target node; correspondingly, the instance processing module is specifically used for: marking the node-level custom driver instance resource on the target node for upgrade to trigger the executor deployed on the target node to perform an upgrade operation on the node-level custom driver instance resource on the target node.
[0100] It is understandable that the explanation, specific implementation, beneficial effects, examples, etc. of the relevant contents in the device provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.
[0101] In a third aspect, an embodiment of the present invention provides a computer-readable medium, on which computer instructions are stored. When the computer instructions are executed by a processor, the processor executes the method provided in the first aspect.
[0102] Specifically, a system or device equipped with a storage medium can be provided, on which software program code that implements the functions of any of the above-mentioned embodiments is stored, and a computer (or CPU or MPU) of the system or device can be enabled to read and execute the program code stored in the storage medium.
[0103] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.
[0104] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.
[0105] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.
[0106] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion module connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or expansion module is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.
[0107] It is understandable that the explanation, specific implementation methods, beneficial effects, examples, etc. of the relevant contents in the computer-readable medium provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.
[0108] In a fourth aspect, an embodiment of the present specification provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, it implements the method in any embodiment of the specification.
[0109] It is understandable that the explanation, specific implementation, beneficial effects, examples, etc. of the relevant contents in the computing device provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.
[0110] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0111] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the present invention can be implemented by hardware, software, widgets, or any combination thereof. When implemented by software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium.
[0112] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.
Claims
1. A driver management method for heterogeneous computing devices, characterized in that: Executed by a controller deployed on a control node, the method includes: Monitoring the custom driver resources of the heterogeneous computing power device; wherein the custom driver resources are created based on a predefined custom driver resource template; When a change in the custom driver resource is detected, a target node is determined; the change includes one of creation, deletion, expansion, reduction and upgrade; Generate node-level custom driver instance resources or mark the corresponding node-level custom driver instance resources according to a predefined custom driver instance resource template, so as to trigger the executor deployed on the target node to perform corresponding actions, and report the execution results to the controller; When the execution result is received, the status of the custom driver instance resource on the target node is displayed.
2. The method according to claim 1, characterized in that The custom driver resource template includes: the type of custom driver resource, the name of the heterogeneous computing device, the namespace of the custom driver resource, the driver version, the node selected for the custom driver resource, and the image required to install the driver; And / or, the custom driver instance resource template includes: the type of custom driver instance resource, the custom driver instance name including the name and node name of the heterogeneous computing device, the namespace of the custom driver instance resource, the driver version, the node of the custom driver instance resource and the image required to install the driver.
3. The method according to claim 2, characterized in that When a change in the custom driver resource is monitored, the target node is determined, including: if the change is creation, each node selected for the custom driver resource defined in the custom driver resource is used as the target node; correspondingly, according to the pre-defined custom driver instance resource template, a node-level custom driver instance resource is generated or a node-level custom driver instance resource is marked to trigger the executor deployed on the target node to perform a corresponding action, including: generating a node-level custom driver instance resource to trigger the executor deployed on the target node to deploy the node-level custom driver instance resource on the target node, so as to create the node-level custom driver instance resource on the target node; And / or, when a change in the custom driver resource is monitored, a target node is determined, including: if the change is an expansion, a newly added node in the node selected for the custom driver resource defined in the custom driver resource is used as the target node; correspondingly, according to a pre-defined custom driver instance resource template, a node-level custom driver instance resource is generated or a node-level custom driver instance resource is marked to trigger the executor deployed on the target node to perform a corresponding action, including: a node-level custom driver instance resource is generated to trigger the executor deployed on the target node to deploy the node-level custom driver instance resource on the target node to achieve expansion of the node-level custom driver instance resource.
4. The method according to claim 3, characterized in that Before performing a deployment operation or a capacity expansion operation, the executor automatically matches the type, model, CPU architecture and operating system of the heterogeneous computing power device, and after the automatic matching is successful, performs the corresponding deployment or capacity expansion operation.
5. The method according to claim 2, characterized in that: When the custom driver resource is monitored to change, determining the target node includes: If the change is a reduction in capacity, the reduced node among the nodes selected for the custom driver resource defined in the custom driver resource is used as the target node; Correspondingly, generating a node-level custom driver instance resource or marking the node-level custom driver instance resource according to a predefined custom driver instance resource template to trigger the executor deployed on the target node to perform a corresponding action includes: The node-level custom driver instance resource on the target node is marked for shrinkage to trigger the executor deployed on the target node to delete the node-level custom driver instance resource on the target node to achieve shrinkage of the node-level custom driver instance resource.
6. The method according to claim 2, characterized in that When the custom driver resource is monitored to change, determining the target node includes: If the change is deletion, the node to be deleted among the nodes selected for the custom driver resource defined in the custom driver resource is used as the target node; Correspondingly, generating a node-level custom driver instance resource or marking the node-level custom driver instance resource according to a predefined custom driver instance resource template to trigger the executor deployed on the target node to perform a corresponding action includes: A node-level custom driver instance resource on the target node is marked for deletion to trigger an executor deployed on the target node to delete the node-level custom driver instance resource on the target node.
7. The method according to claim 2, characterized in that When the custom driver resource is monitored to change, determining the target node includes: If the change is an upgrade, the node that needs to be upgraded among the nodes selected for the custom driver resource defined in the custom driver resource is used as the target node; Correspondingly, generating a node-level custom driver instance resource or marking the node-level custom driver instance resource according to a predefined custom driver instance resource template to trigger the executor deployed on the target node to perform a corresponding action includes: The node-level custom driver instance resource on the target node is marked for upgrade to trigger the executor deployed on the target node to perform an upgrade operation on the node-level custom driver instance resource on the target node.
8. A driver management device for heterogeneous computing power equipment, characterized in that: The device is deployed on a controller on a control node, and the device includes: A resource monitoring module, used to monitor the custom driver resources of the heterogeneous computing power device; wherein the custom driver resources are created based on a predefined custom driver resource template; A target determination module, used to determine a target node when a change in the custom driver resource is detected; the change includes one of creation, deletion, expansion, reduction and upgrade; An instance processing module, used to generate a node-level custom driver instance resource or mark the corresponding node-level custom driver instance resource according to a predefined custom driver instance resource template, so as to trigger the executor deployed on the target node to perform a corresponding action, and report the execution result to the controller; The status display module is used to display the status of the custom driver instance resource on the target node when receiving the execution result.
9. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed in a computer, the computer is caused to execute the method according to any one of claims 1 to 7.
10. A computing device, characterized in that The method comprises a memory and a processor, wherein the memory stores executable codes, and when the processor executes the executable codes, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Method for realizing computing power virtualization elastic capacity expansion and contraction under large model reasoning framework
CN120631561A
