An update method, a computing device, an electronic device, and a storage medium

By assigning computing tasks to other available computing units in the server and adopting multiple batch update strategies, the service interruption caused by hardware updates is solved, and efficient updates are achieved in online state.

CN114168180BActive Publication Date: 2025-07-11SHANGHAI BIREN TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111522697.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-13
Publication Date
2025-07-11
Estimated Expiration
2041-12-13

AI Technical Summary

Technical Problem

When hardware updates to computing units in the server, such as GPU firmware upgrades, the server's computing service needs to be stopped, resulting in service interruption and reduced efficiency.

Method used

By assigning the computing task to other available computing units other than the target computing unit and updating in a state where the computing device can provide services, a multi-batch update strategy and a downgrade mode are employed to reduce the impact on the computing task.

Benefits of technology

It realizes hardware updates in the online state of the server, avoids service interruptions, improves update efficiency and reduces costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114168180B_ABST
    Figure CN114168180B_ABST
Patent Text Reader

Abstract

An update method for a computing device including a plurality of computing units, the computing device, an electronic device, and a storage medium. The update method includes: receiving an update task for at least one target computing unit among the plurality of computing units; allocating the current computing tasks of the at least one target computing unit to at least one other available computing unit among the plurality of computing units except the at least one target computing unit; and updating the at least one target computing unit in a state where the computing device can provide services. This method can achieve the update of the computing unit without interruption of the computing device service, thereby improving efficiency and reducing costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to an update method, a computing device, an electronic device, and a storage medium. Background Art

[0002] When using a computing device (e.g., a server) in daily life, it is usually necessary to periodically or when needed update some hardware on the server. For example, upgrade the firmware of the hardware. Usually, when performing an update, it is necessary to stop the corresponding services provided by the server externally, and the services of the server can be restored only after all the hardware that needs to be updated is updated. Summary of the Invention

[0003] During the process of updating the hardware of the computing unit in the server, it is necessary to stop the execution of the corresponding tasks in the server, which will lead to a decline in service quality, a reduction in efficiency, and an increase in costs. For example, during the process of upgrading the firmware of multiple GPU (Graphics Processing Unit) components that provide parallel computing services in a GPU server, it is necessary to stop the allocation and execution of the graphics computing tasks of these GPUs by the server, which makes the server in an offline service state, and the services provided by the server externally can be restored only after the firmware upgrades of all GPUs are completed. Since the server is in an offline service state for a period of time, it will cause the interruption of the work between the server and the client, resulting in a complex processing of the working state of the client.

[0004] The technical content of the present disclosure solves the above technical problems.

[0005] At least one embodiment of the present disclosure provides an update method for a computing device including a plurality of computing units. The update method includes: receiving an update task for at least one target computing unit among the plurality of computing units; allocating the current computing tasks of the at least one target computing unit to at least one other available computing unit among the plurality of computing units except the at least one target computing unit; and updating the at least one target computing unit in a state where the computing device can provide services.

[0006] For example, in the update method provided in an embodiment of the present disclosure, when the at least one target computing unit is all of the plurality of computing units, the update method further includes: performing a multi-batch update operation to update all of the plurality of computing units in batches. Each batch update operation in the multi-batch update operation includes: selecting at least one computing unit from the plurality of computing units as the update target computing unit in the current batch; allocating the computing tasks of the update target computing unit in the current batch to at least one other available computing unit among the plurality of computing units except the update target computing unit in the current batch; and updating the update target computing unit in the current batch.

[0007] For example, in the update method provided by an embodiment of the present disclosure, each batch update operation in the multi-batch update operation further includes: determining the number of computing units to be updated in the current batch; and selecting a corresponding number of computing units from multiple computing units as the update target computing units in the current batch according to the number of computing units.

[0008] For example, in the update method provided by an embodiment of the present disclosure, determining the number of computing units to be updated in the current batch includes: determining the number of computing units to be updated in the current batch according to the processing status of the current computing task.

[0009] For example, in the update method provided by an embodiment of the present disclosure, each batch update operation in the multi-batch update operation further includes: suspending the allocation of new computing tasks to the update target computing units in the current batch; waiting for the update target computing units in the current batch to complete the already allocated computing tasks, and then updating the update target computing units in the current batch.

[0010] For example, in the update method provided by an embodiment of the present disclosure, the update task is a firmware upgrade task or a hardware replacement task.

[0011] For example, in the update method provided by an embodiment of the present disclosure, the update method further includes: in response to receiving an update task, controlling the computing device to enter a second working mode from a first working mode, where the working capacity of the first working mode is greater than that of the second working mode.

[0012] For example, in the update method provided by an embodiment of the present disclosure, the second working mode further includes suspending the reception of a predetermined task.

[0013] For example, in the update method provided by an embodiment of the present disclosure, when the update task is a firmware upgrade task, updating the at least one target computing unit includes performing the following steps for each target computing unit: obtaining a firmware update program; writing the firmware update program into the target computing unit so that the firmware update program overwrites the original firmware program in the target computing unit; and hot restarting the updated target computing unit.

[0014] For example, in the update method provided by an embodiment of the present disclosure, updating the at least one target computing unit further includes performing the following steps for each target computing unit: detecting the loading status of the firmware update program in the target computing unit; in response to the loading status indicating that the firmware update program is successfully loaded, recording the update status of the target computing unit, or in response to the loading status indicating that the firmware update program fails to be loaded, controlling the target computing unit to restore to the original firmware program from the firmware update program.

[0015] For example, in the update method provided in an embodiment of the present disclosure, updating the at least one target computing unit further includes performing the following steps for each target computing unit: detecting the compatibility status of the firmware update program in the target computing unit; in response to the compatibility status indicating that the firmware update program is incompatible in the target computing unit, controlling the target computing unit to be restored to the original firmware program by the firmware update program.

[0016] For example, in the update method provided in an embodiment of the present disclosure, a computing device provides a kernel-mode driver to manage multiple computing units, provides a user-mode driver to manage the communication between the application layer and the kernel-mode driver, and allocates computing tasks to at least one other available computing unit among the multiple computing units except the at least one target computing unit. In a state where the computing device can provide services, updating the at least one target computing unit further includes: receiving, through the user-mode driver, information about the at least one updated target computing unit and allocating the current computing task to other available computing units, and providing the information to the kernel-mode driver; driving other available computing units to execute computing tasks through the kernel-mode driver, and updating the at least one target computing unit.

[0017] At least one embodiment of the present disclosure provides a computing device, which includes multiple computing units, a computing task management unit, and an update task management unit. The computing task management unit is configured to receive computing tasks and allocate the computing tasks to the multiple computing units; the update task management unit is configured to receive an update task for at least one target computing unit among the multiple computing units, control the computing task management unit to allocate the current computing task to at least one other available computing unit among the multiple computing units except the target computing unit, and update the target computing unit in a state where the computing device can provide services.

[0018] For example, in the computing device provided in an embodiment of the present disclosure, the update task management unit is further configured to: when the at least one target computing unit is all of the multiple computing units, perform a multi-batch update operation to update all of the multiple computing units in batches, where each batch update operation in the multi-batch update operation includes: selecting at least one computing unit from the multiple computing units as the update target computing unit in the current batch; allocating the computing tasks of the update target computing unit in the current batch to at least one other available computing unit among the multiple computing units except the update target computing unit in the current batch; updating the update target computing unit in the current batch.

[0019] For example, in the computing device provided in an embodiment of the present disclosure, the update task management unit is further configured to: determine the number of computing units to be updated in the current batch; select a corresponding number of computing units from multiple computing units as the update target computing units in the current batch according to the number of computing units.

[0020] For example, in the computing device provided in an embodiment of the present disclosure, the update task management unit is further configured to: determine the number of computing units to be updated in the current batch according to the processing status of the current computing task.

[0021] For example, in the computing device provided in an embodiment of the present disclosure, the computing task management unit is further configured to: suspend allocating new computing tasks to the update target computing units in the current batch; wait for the update target computing units in the current batch to complete the already allocated computing tasks, and then update the update target computing units.

[0022] For example, in the computing device provided in an embodiment of the present disclosure, the computing task management unit is further configured to: in response to receiving an update task, control the computing device to enter a second working mode from a first working mode, where the working capacity of the first working mode is greater than that of the second working mode.

[0023] For example, in the computing device provided in an embodiment of the present disclosure, when the update task is a firmware upgrade task, the update task management unit is further configured to: obtain a firmware update program; write the firmware update program into the target computing unit so that the firmware update program overwrites the original firmware program in the target computing unit; perform a warm restart on the updated target computing unit.

[0024] For example, in the computing device provided in an embodiment of the present disclosure, the update task management unit is further configured to: detect the loading status of the firmware update program in the target computing unit; in response to the loading status indicating that the firmware update program is successfully loaded, record the update status of the target computing unit, or in response to the loading status indicating that the firmware update program fails to be loaded, control the target computing unit to restore to the original firmware program from the firmware update program.

[0025] For example, in the computing device provided in an embodiment of the present disclosure, the update task management unit is further configured to: detect the compatibility status of the firmware update program in the target computing unit; in response to the compatibility status indicating incompatibility of the firmware update program in the target computing unit, control the target computing unit to restore to the original firmware program from the firmware update program.

[0026] For example, in a computing device provided in an embodiment of the present disclosure, the computing device further includes: a kernel-mode driver unit and a user-mode driver unit. The kernel-mode driver unit is configured to manage a plurality of computing units; and the user-mode driver unit is configured to manage the communication between the application layer and the kernel-mode driver. Among them, the user-mode driver is further configured to: receive information for updating a target computing unit and allocating a current computing task to other computing units, and provide the information to the kernel-mode driver; the kernel-mode driver is further configured to: drive other computing units to execute computing tasks and update the target computing unit.

[0027] For example, in a computing device provided in an embodiment of the present disclosure, the computing unit includes a graphics processor, a neural network processor, a tensor processor, or a data processor.

[0028] For example, in a computing device provided in an embodiment of the present disclosure, the computing device is a computing cluster, a rack-mounted server, or a computing node.

[0029] At least one embodiment of the present disclosure provides an electronic device, which includes a processor; a memory including one or more computer program modules; wherein, the one or more computer program modules are stored in the memory and configured to be executed by the processor, and the one or more computer program modules include instructions for implementing the update method provided in any embodiment of the present disclosure when executed by the processor.

[0030] At least one embodiment of the present disclosure provides a computer-readable storage medium for storing non-transitory computer-readable instructions, which can implement the update method provided in any embodiment of the present disclosure when executed by a computer. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings of the embodiments will be briefly introduced below. Obviously, the drawings in the following description only relate to some embodiments of the present disclosure and do not limit the present disclosure.

[0032] Figure 1 Shows a schematic diagram of a computing device according to at least one embodiment of the present disclosure;

[0033] Figure 2 Shows a schematic flowchart of an update method of a computing device according to at least one embodiment of the present disclosure;

[0034] Figure 3 Shows a schematic flowchart of another update method of a computing device according to at least one embodiment of the present disclosure;

[0035] Figure 4 Shows Figure 3An exemplary flowchart of S221 in the update method of the computing device shown;

[0036] Figure 5 Shows Figure 3 Another exemplary flowchart of S221 in the update method of the computing device shown;

[0037] Figure 6 A flowchart showing another update method of a computing device according to at least one embodiment of the present disclosure;

[0038] Figure 7 A flowchart showing an update method in which the update task of a computing device is a firmware upgrade task according to at least one embodiment of the present disclosure;

[0039] Figure 8 A flowchart showing another update method in which the update task of a computing device is a firmware upgrade task according to at least one embodiment of the present disclosure;

[0040] Figure 9 A flowchart showing a firmware upgrade method for a multi-GPU server according to at least one embodiment of the present disclosure;

[0041] Figure 10 A schematic diagram showing another computing device according to at least one embodiment of the present disclosure;

[0042] Figure 11 A schematic diagram showing an electronic device according to at least one embodiment of the present disclosure;

[0043] Figure 12 A schematic diagram showing another electronic device according to at least one embodiment of the present disclosure; and

[0044] Figure 13 A schematic diagram showing a computer-readable storage medium according to at least one embodiment of the present disclosure. Detailed implementation manners

[0045] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure clearer, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present disclosure. Apparently, the described embodiments are some, but not all, of the embodiments of the present disclosure. All other embodiments obtained by those of ordinary skill in the art based on the described embodiments of the present disclosure without creative efforts shall fall within the scope of protection of the present disclosure.

[0046] It should be understood that the various steps described in the method embodiments of the present disclosure may be executed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this regard.

[0047] Unless otherwise defined, the technical terms or scientific terms used in the present disclosure shall have the ordinary meanings understood by those of ordinary skill in the field to which the present disclosure pertains. The "first", "second" and similar terms used in the present disclosure do not denote any order, quantity or importance, but are only used to distinguish different components. Similarly, the terms such as "a", "an" or "the" do not denote a quantity limitation, but mean that there is at least one. The terms such as "comprising" or "including" mean that the elements or objects appearing before this term cover the elements or objects listed after this term and their equivalents, without excluding other elements or objects. The terms such as "connected" or "coupled" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect.

[0048] At least one embodiment of the present disclosure provides an update method for a computing device, an update processing device for a computing device, an electronic device, and a computer-readable storage medium. The computing device includes a plurality of computing units, and the update method includes: receiving an update task for at least one target computing unit among the plurality of computing units; allocating the current computing tasks of the at least one target computing unit to at least one other available computing unit among the plurality of computing units except the target computing unit; and updating the at least one target computing unit in a state where the computing device can provide services. For example, the update method can be applied to perform online updates on the hardware of a plurality of computing units in a server, for example, perform online firmware upgrades on the hardware of a plurality of computing units in a server, and keep the server in an online state all the time while updating the hardware of the plurality of computing units in the server. Therefore, the server can continue to execute corresponding tasks, so that the work at the client side is not interrupted, the efficiency can be improved, and the cost can be reduced.

[0049] It should be noted that the update method provided by the embodiments of the present disclosure can be at least partially applied to appropriate electronic devices. For example, in some embodiments, the update method can be implemented locally through an application installed in the electronic device or through a non-installed application (such as mini programs and instant apps existing in the industry) downloaded from, for example, a cloud server. The electronic device can include a personal computer, a mobile terminal, etc. The mobile terminal can be a device such as a mobile phone, a tablet computer, a wearable electronic device, a smart home device, etc. For example, in some embodiments, the update method can also be implemented through a server, or some steps of the update method can be implemented through a server (such as a cloud server) while other steps can be implemented locally through the electronic device. The electronic devices communicate with each other through a network (such as a wireless or wired communication network) to obtain the updated electronic device.

[0050] Figure 1 FIG. shows a schematic diagram of a computing device 100 provided according to at least one embodiment of the present disclosure.

[0051] As Figure 1 shown, an operating system can run on the computing device 100 to manage its own hardware devices and provide services for other application programs. Various application programs can also run on the computing device 100 to implement various required functions, including two-way communication, receiving computing service requests, allocating computing tasks, returning computing results, update task management, etc. For example, the computing device 100 can include, for example, an update task management unit 110, a computing task management unit 120, a user-mode driver unit (UMD) 140, a kernel-mode driver unit (KMD) 160, and multiple computing units 170. For example, the update task management unit 110, the computing task management unit 120, the user-mode driver unit (UMD) 140, and the kernel-mode driver unit (KMD) 160 can be implemented by software, hardware, firmware, or any combination thereof. The embodiments of the present disclosure do not limit the specific form of the operating system (such as Windows, Unix, Linux, etc.).

[0052] For example, each computing unit 170 can be used to perform computing tasks. For example, the computing device 100 can be a GPU server, and the computing unit 170 can be a GPU card. Each GPU server can include multiple GPU cards. For example, the GPU card includes a GPU chip and a control circuit, and the control circuit includes firmware for driving the GPU chip. Embodiments of the present disclosure do not limit the specific models or hardware structures of these GPU cards. In other examples, the computing device can also be other types of servers, and correspondingly, the computing unit can also be other types of processors. For example, the computing unit can be a neural network processing unit (NPU), a tensor processing unit (TPU), or a data processing unit (DPU), etc. Embodiments of the present disclosure do not limit this. For example, the computing unit 170 can be installed in the computing device 100 in a hot-pluggable manner. Embodiments of the present disclosure do not limit this.

[0053] For example, the update task management unit 110 can be used to receive update requests for the computing unit or regularly check whether the computing unit needs to be updated according to settings, and can also manage update policies and processes and monitor the status of update tasks as needed. In the embodiments of the present disclosure, "update" can include, for example, changes, upgrades, or downgrades to the firmware or hardware of the computing unit itself, or can also include the replacement of the entire computing unit (for example, pulling out the hardware card in a certain slot and then inserting a new hardware card), etc.

[0054] As Figure 1 shown, the update task management unit 110 can include, for example, an update task port 111 and a task monitoring and control unit 112. The update task port 111 can be used to receive update requests or regularly check whether the computing unit needs to be updated according to settings. For example, the update request is provided by an update server (such as an update server) communicating with the computing device 100, or is manually generated by an operator of the computing device 100 running an update program installed on the computing device 100. The update request can include, for example, an update object, update content (such as a firmware version), an update time, etc.; alternatively, the update task port 111 can regularly query the update server communicating with the computing device 100 according to settings to check whether the computing unit needs to be updated. If it is learned that a new firmware version is available, an update task can be generated, for example, by itself. The task monitoring and control unit 112 can be used to manage update policies and processes and monitor the status of update tasks, etc.

[0055] The computing task management unit 120 can be used to receive computing tasks and is responsible for the scheduling and management of computing tasks (e.g., inference tasks). For example, the computing tasks are allocated to each computing unit 170 according to the allocation rules. For example, the uniform allocation of computing tasks is achieved, so that each computing unit 170 can work in parallel as much as possible, thereby improving work efficiency and reducing the idle time of the computing unit 170. These computing tasks can be, for example, training a neural network, performing inference using a neural network, or rendering images, videos, etc. The embodiments of the present disclosure do not limit this. In the scenario of updating the computing unit, the computing task management unit 120 can also cooperate with the update task management unit 110 to make the specified computing unit 170 have no executing tasks. For example, the update task management unit 110 can send the identification information of the target computing unit to be updated to the computing task management unit 120, and the computing task management unit 120 stops allocating computing tasks to the target computing unit, ensuring that there are no unfinished computing tasks in the target computing unit before updating the target computing unit.

[0056] The user-mode driver unit 140 can be an interaction interface between upper-layer applications (e.g., the update task management unit 110, the computing task management unit 120, etc.) and the kernel-mode driver unit (e.g., the kernel-mode driver unit 160). In some embodiments, the user-mode driver unit 140 can provide device abstraction or provide correct device parameters to call the kernel-mode driver unit 160 interface to complete request forwarding.

[0057] The kernel-mode driver unit 160 can be used to be responsible for the driving, management, and usage logic of these computing units 170, monitor the working status of the computing unit 170, etc. For example, the kernel-mode driver unit 160 receives the computing tasks allocated by the computing task management unit 120 and provides the corresponding threads and data to the corresponding computing unit 170, so that the computing unit 170 can execute the allocated computing tasks according to the corresponding threads and data. In some embodiments, the kernel-mode driver unit 160 can be responsible for the update of the firmware in the computing unit 170 and the detection of the firmware status, hot restart the computing unit 170, etc. For example, the kernel-mode driver unit 160 can monitor the update situation of the target computing unit and feedback the update result to the update task management unit 110 through the user-mode driver unit 140.

[0058] For example, as Figure 1 shown, in some examples, the computing task management unit 120 can be directly connected to each computing unit 170 to allocate computing tasks to each computing unit 170. In other examples, the computing task management unit 120 can also be connected to the user-mode driver unit 140 to allocate computing tasks to each computing unit 170 through the user-mode driver unit 140 and the kernel-mode driver unit 160.

[0059] For example, the firmware program for updating the computing unit can be provided remotely or locally. As Figure 1 shown, optionally, in at least one example, the computing device 100 may further include a local firmware repository 130. Generally, the firmware repository 130 can be a repository (such as a database) for centrally storing and managing firmware. The firmware repository 130 can be used for, for example, persisting firmware and firmware meta-information (such as version), providing queries, storage, and retrieval of firmware and firmware meta-information, etc. For example, these firmwares include but are not limited to the firmware for updating the computing unit, and can also include the firmware for other components of the computing device 100, etc. In at least another example, when the computing device 100 generates an update request, it can communicate with a remote firmware repository (such as a database) through a communication network, download the required firmware program and related information, and then save it locally permanently or temporarily.

[0060] As Figure 1 shown, optionally, in at least one example, the computing device 100 may further include a system file system (sysfs) 150. The system file system 150 can be a mechanism provided by a UNIX-like operating system for providing kernel objects to the user space. Specifically, the system file system 150 can be a pseudo-file system that exports information about various kernel subsystems, hardware devices, and related device drivers from the kernel's device model to the user space through virtual files. In some embodiments, the system file system 150 can provide information related to the kernel-mode driver unit 160 to the update task management unit 110. In other embodiments, the system file system 150 can also directly (i.e., without passing through the user-mode driver unit 140) provide update requests from the update task management unit 110 to the kernel-mode driver unit 160.

[0061] Regarding the specific implementation forms of the above various units, the embodiments of the present disclosure do not limit this.

[0062] Figure 2 The flowchart shows the update method of a computing device according to an embodiment of the present disclosure.

[0063] Taking Figure 1 the computing device 100 as an example, the update method of the computing device shown below will be described in detail. As Figure 2 shown, the computing device 100 includes multiple computing units 170. Figure 1 As

[0064] As Figure 2 shown, the update method of the computing device 100 may include steps S210, S220, and S230.

[0065] Step S210: Receive an update task for at least one target computing unit among the multiple computing units 170.

[0066] Here, the target computing unit is the computing unit that is the current update object among the multiple computing units 170; for example, in different update batches (as described below), the target computing units are different computing units among the multiple computing units 170 respectively.

[0067] Step S220: Allocate the current computing task of the target computing unit to at least one other available computing unit among the multiple computing units 170 except the target computing unit.

[0068] For example, the other available computing units can be all or part of the multiple computing units 170 except the target computing unit, and these available computing units are currently in a state where they can provide services. For example, some of the multiple computing units 170 except the target computing unit may be in an unavailable state, for example, there is a fault, or they are currently in an update state (for example, the target computing unit in the previous update batch), etc.

[0069] Step S230: Update the target computing unit when the computing device 100 is in a state where it can provide services.

[0070] In some embodiments, as Figure 1 shown, the computing device 100 provides a kernel-mode driver (for example, the program corresponding to the kernel-mode driver unit 160) to manage the multiple computing units 170, and provides a user-mode driver (for example, the program corresponding to the user-mode driver unit 140) to manage the communication between the application layer (for example, the update task management unit 110) and the kernel-mode driver unit 160. In this case, updating at least one target computing unit and allocating the computing task to at least one other available computing unit among the multiple computing units 170 except the at least one target computing unit may include: receiving, through the user-mode driver unit 140, information on updating the target computing unit and allocating the current computing task to other computing units, and providing the information to the kernel-mode driver unit 160; and updating the target computing unit through the kernel-mode driver unit 160 and driving the other computing units to execute the computing task.

[0071] For example, the update task management unit 110 may confirm the computing units that need to be updated currently, and use the computing units that need to be updated currently as target computing units. The update task management unit 110 may send the identification information of the target computing units to the kernel-mode driver unit 160 through the user-mode driver unit 140 or the system file system 150, so that the kernel-mode driver unit 160 performs update operations on the target computing units. Moreover, the update task management unit 110 may send the identification information of the target computing units to the computing task management unit 120, so that the computing task management unit 120 makes corresponding adjustments to the scheduling of computing tasks. For example, the computing task management unit 120 stops allocating computing tasks to the target computing units, and allocates the computing tasks to other available computing units. The available computing units may be the computing units in a normal operating state that can execute computing tasks.

[0072] In some embodiments, the update task may include, for example, a firmware upgrade task or a hardware replacement task. The firmware upgrade task may upgrade the original firmware in the computing unit to a new firmware to achieve purposes such as improving the performance of the computing unit. The hardware replacement task may replace the original computing unit with a new computing unit to achieve purposes such as the replacement and upgrading of hardware.

[0073] In the update method of at least one embodiment of the present disclosure, by allocating computing tasks to other available computing units except the target computing units to be updated, during the process of updating some computing units in the computing device, some other computing units in the computing device can be used to continue to execute computing tasks, so as to achieve the update of the computing device while maintaining the continuous provision of computing services, solve the problem in the related art that the computing service of the server needs to be stopped during the execution of the update task, and further ensure the stability of the client work, and achieve the update operation of the computing units without the user's perception.

[0074] In some embodiments, receiving an update task for at least one target computing unit among a plurality of computing units 170 at step S210 may be receiving an update task for all of the plurality of computing units 170. In this case, multi-batch update operations may be performed on the plurality of computing units 170, thereby further reducing the adverse impact of the update operation on the service quality of the computing device. For example, all of the plurality of computing units 170 are divided into multiple batches, and the computing units in each batch are updated in sequence. The number of computing units in each batch may be fixed, or may also be determined according to the real-time situation of the computing device 100. The number of computing units in the current batch will be described in detail with reference to the following Figures 3 to 5 will be described in detail.

[0075] Figure 3The flowchart shows a multi-batch update method for a computing device according to an embodiment of the present disclosure.

[0076] As Figure 3 shown, in the multi-batch update method of the computing device 100, step S210 may include step S211, and step S220 may include step S221.

[0077] Step S211: Receive an update task for all computing units among a plurality of computing units 170.

[0078] Step S221: Perform a multi-batch update operation to update all of the plurality of computing units 170 in batches. Further, Figure 4 The flowchart shows Figure 3 an example flowchart of S221 in the multi-batch update method of the computing device shown.

[0079] As Figure 4 shown, each batch update operation in performing the multi-batch update operation may further include steps S2211, S2212, and S2213.

[0080] Step S2211: Select at least one computing unit from the plurality of computing units 170 as the update target computing unit in the current batch.

[0081] Step S2212: Allocate the computing tasks of the update target computing unit in the current batch to at least one other available computing unit among the plurality of computing units 170 except the update target computing unit in the current batch.

[0082] Step S2213: Update the update target computing unit in the current batch.

[0083] For example, in step S2211, select at least one unupdated computing unit as the update target computing unit in the current batch.

[0084] In some embodiments, after selecting the computing unit to be the update target computing unit in the current batch, suspend allocating new computing tasks to the selected update target computing unit in the current batch and wait for the selected update target computing unit in the current batch to complete the already allocated computing tasks.

[0085] For example, refer to Figure 1, during each batch update operation, the update task management unit 110 can determine the computing units that need to be updated in the current batch as the update target computing units in the current batch. The update task management unit 110 sends the identification information of the update target computing units in the current batch to the kernel-mode driver unit 160 and the computing task management unit 120. The computing task management unit stops sending computing tasks to the update target computing units in the current batch and allocates the current computing tasks to other available computing units that do not need to be updated in the current batch. The kernel-mode driver unit 160 can monitor whether the update target computing units in the current batch have completed the assigned computing tasks. After waiting for the update target computing units in the current batch to complete the assigned computing tasks, the kernel-mode driver unit 160 controls the update target computing units in the current batch to perform updates. During the current batch update process, the kernel-mode driver unit 160 monitors the update status of each update target computing unit. After the update is completed, the update result is fed back to the update task management unit 110, so that the update task management unit 110 can initiate the next batch update operation, such as determining the computing units that need to be updated in the next batch, and controlling the kernel-mode driver unit 160 and the computing task management unit 120 to cooperate to complete the next batch update operation. In this way, after performing multiple batch update operations, the update tasks for all multiple computing units 170 can be achieved.

[0086] As shown above, the number of computing units in the current batch can be determined according to the real-time situation of the computing device. Figure 5 Shows Figure 3 Another example flowchart of S221 in the multi-batch update method of the computing device shown, as Figure 5 shown, step S221 may include step S2214 and step S2215.

[0087] Step S2214: Determine the number of computing units to be updated in the current batch.

[0088] Step S2215: According to the determined number of computing units to be updated in the current batch, select the corresponding number of computing units from the multiple computing units 170 as the update target computing units in the current batch.

[0089] In some embodiments, in step S2214, the number of computing units to be updated in the current batch can be determined according to the processing status of the current computing task (for example, the task burden parameter), and the task burden parameter may include, but is not limited to, the speed of receiving computing task requests, the number of computing tasks in the queue, the number of computing tasks being executed, the processing speed and capabilities of the computing tasks, etc.

[0090] In some embodiments, in step S2215, for example, after calculating the number of computing units updated in the current batch according to the algorithm formula, a corresponding number of computing units are selected from the computing units that have not been updated, wherein the number of the selected unupdated computing units may be at least 1 and at most the total number of the computing units that have not been updated. For example, when the computing device is completely idle and there are no computing tasks being queued, all computing units may be updated at once, that is, all unupdated computing units are selected as update target computing units in the current batch.

[0091] For example, Figure 5 As shown, after the update target computing unit in the current batch is selected according to step S2214 and step S2215, step S2212 may be executed to distribute the computing tasks of the update target computing unit in the current batch to at least one other available computing unit in the plurality of computing units 170 except the update target computing unit in the current batch. Then step S2213 is executed to update the update target computing unit in the current batch.

[0092] In the update method of at least one embodiment of the present disclosure, the number of computing units updated in each batch is determined according to the processing status of the current computing task, which can take into account the execution of the computing task and the update task at the same time, reduce the impact of the update task on the computing task, and ensure the smooth progress of the computing task and the update task.

[0093] As shown above, in some embodiments, the computing device may also be put into a degraded mode during the execution of an update task, thereby better choosing between update tasks and computing tasks, such as maintaining a balance, thereby improving the service quality of the computing device. Figure 6 A flowchart of an update method for a computing device 100 to enter a degraded mode according to an embodiment of the present disclosure is shown.

[0094] like Figure 6 As shown, in Figure 2 After step S210 and before step S220 of the updating method of the computing device 100 shown, the updating method of the computing device 100 may further include step S240.

[0095] Step S240: In response to receiving an update task, control the computing device 100 from a first working mode (e.g., the current working mode, such as a normal working mode, etc.) to a second working mode (e.g., a degraded mode), wherein the working capacity of the first working mode is greater than the working capacity of the second working mode.

[0096] For example, see Figure 1, after the update task management unit receives an update task, it notifies the computing task management unit 120 of the information of the received update task, and the computing task management unit 120 controls the computing device to enter the degraded mode. For example, the computing task management unit 120 reduces the reception volume of computing tasks. The task reception volume of the computing task management unit 120 in the first working mode is the first task volume, and the task reception volume of the computing task management unit 120 in the second working mode is the second task volume, and the first task volume is greater than the second task volume.

[0097] In some embodiments, the second working mode may further include pausing the reception of scheduled tasks. The scheduled tasks may be, for example, other update tasks other than the current update task, such as new firmware upgrade tasks.

[0098] In the update method of the embodiments of the present disclosure, during the execution of the current update task, the processing capability of the computing device decreases. In this case, controlling the computing device to enter the degraded mode, such as throttling the computing tasks or stopping receiving new update tasks, can ensure the smooth execution of the tasks (computing tasks and update tasks) received by the computing device. And in the scenario where multiple computing devices execute computing tasks in parallel, some computing tasks can be transferred to other computing devices with stronger processing capabilities to ensure the smooth execution of the overall computing tasks.

[0099] As shown above, in some embodiments, the update task may be a firmware upgrade task. Figure 7 The flowchart shows an update method for a computing device in which the update task is a firmware upgrade task according to at least one embodiment of the present disclosure. As Figure 7 shown, step S220 may include performing steps S222 to S224 for each target computing unit.

[0100] Step S222: Obtain a firmware update program. Step S223: Write the firmware update program into the target computing unit so that the firmware update program overwrites the original firmware program in the target computing unit.

[0101] Step S224: Warm restart the updated target computing unit.

[0102] For example, see Figure 1, in some examples, the update task received by the update task management unit 110 may include a firmware update program. The update task management unit 110 sends the firmware update program to the kernel-mode driver unit 160 through the user-mode driver unit 140 or the system file system 150. The kernel-mode driver unit 160 writes the firmware update program into the target computing unit, replacing the old version of the firmware program in the target computing unit with the new firmware update program. The update task management unit 110 may also store the firmware update program in the firmware repository 130. In other examples, the update task management unit 110 may obtain the firmware update program from the firmware repository 130.

[0103] For example, the computing unit is a device that supports hot restart. For example, it is a device that adopts the PCIe standard, thus supporting hot restart. The embodiments of the present disclosure do not limit this. After writing the firmware update program into the computing unit, hot restart the computing unit to enable the computing unit to load the firmware update program.

[0104] For example, as Figure 7 shown, step S220 may further include performing steps S225 to S227 for each target computing unit.

[0105] Step S225: Detect the loading status of the firmware update program in the target computing unit to determine whether the firmware update program is successfully loaded.

[0106] Step S226: In response to the loading status indicating that the firmware update program is successfully loaded, record the update status of the target computing unit.

[0107] Step S227: In response to the loading status indicating that the firmware update program fails to be loaded, control the target computing unit to restore from the firmware update program to the original firmware program.

[0108] For example, the kernel-mode driver unit 160 can be used to detect the loading status of the firmware update program in the computing unit. In the case of successful loading, the kernel-mode driver unit 160 can record the information that the target computing unit is updated successfully and send the information of successful update to the update task management unit 110. In some examples, in the case of failed loading, the kernel-mode driver unit 160 can roll back the computing unit with failed loading from the firmware update program to the original firmware program to ensure that the computing unit can continue to execute the computing task. In other examples, in the case of failed loading, the kernel-mode driver unit 160 can re-update the computing unit with failed loading. If it still fails to be loaded after a predetermined number of updates (for example, 3 times), then roll back the computing unit with failed loading to the original firmware program.

[0109] For example, in some examples, after updating the target computing unit during a warm restart, it is possible to detect whether the firmware update program is working as expected (functioning properly) in the target computing unit, such as whether it is compatible. In response to an incompatible status indicating that the firmware update program is incompatible in the target computing unit, control the target computing unit to revert to the original firmware program by the firmware update program. For example, the firmware update program being incompatible in the target computing unit may mean that the firmware update program cannot coordinate with the existing hardware or programs in the target computing unit, resulting in a malfunction of the target computing unit.

[0110] In some other embodiments, when it is determined that the loading status of the detected firmware update program in the target computing unit is successfully loaded, it is possible to further detect whether the firmware update program is compatible in the target computing unit. Figure 8 FIG. shows a flowchart of another update method in which the update task of a computing device according to at least one embodiment of the present disclosure is a firmware upgrade task.

[0111] As Figure 8 shown, step S220 may further include performing step S228 for each target computing unit. Figure 8 Steps S222 to S225 in Figure 7 have been described in detail in the above

[0112] description and will not be elaborated here.

[0113] In the case where it is determined that the firmware update program fails to load, in step S227, control the target computing unit to revert to the original firmware program by the firmware update program. However, in the case where it is determined that the firmware update program is successfully loaded, in some embodiments, further detect whether the loaded firmware update program is compatible in the target computing unit. In the case where it is detected that the firmware update program is incompatible in the target computing unit, in step S227, control the target computing unit to revert to the original firmware program by the firmware update program. In the case where it is detected that the firmware update program is compatible in the target computing unit, in step S226, record the update status of the target computing unit. In other words, in some embodiments, only when the firmware update program is successfully loaded and compatible with the target computing unit can the update status of the target computing unit be recorded; otherwise, the target computing unit will revert to the original firmware program.

[0114] In some other examples, after updating the target computing unit during a warm restart, it is possible to first detect whether the firmware update program is compatible in the target computing unit. In response to the compatibility status indicating that the firmware update program is incompatible in the target computing unit, control the target computing unit to be restored to the original firmware program by the firmware update program. In response to the compatibility status indicating that the firmware update program is compatible in the target computing unit, further detect whether the firmware update program is successfully loaded in the target computing unit. In response to the successful loading of the firmware update program, record the update status of the target computing unit; in response to the failure of the firmware update program to load, control the target computing unit to be restored to the original firmware program by the firmware update program.

[0115] As described above, any one of the above update methods for the computing device can be applied to, for example, online firmware upgrade of a server (such as a multi-GPU server). Figure 9 FIG. shows a flowchart of a firmware upgrade method for a multi-GPU server (such as Figure 1 the computing device 100) according to an embodiment of the present disclosure. The multi-GPU server includes a plurality of GPU cards, for example, 10 to 100 GPU cards.

[0116] As Figure 9 shown, in conjunction with Figure 1 , in some examples, the update can be initiated by the update task management unit 110 of the server ( Figure 1 the computing device 100). For example, the update task management unit 110 receives an update request and initiates an update according to the received update request.

[0117] After the update task management unit 110 initiates an update, it determines whether there are any GPU cards (computing units 170) that need to be updated. If there are no GPU cards that need to be updated, the server maintains the service and exits the update program. If there are GPU cards that need to be updated, the server enters a degraded mode to restrict some operations, for example, restricting or stopping receiving new update requests, restricting receiving new service requests (flow control), restricting some server capabilities, etc.

[0118] After the server enters the degraded mode, it determines whether there are any GPU cards that need to be upgraded / downgraded. If there are no GPU cards that need to be upgraded / downgraded, the server maintains the service and exits the update program. If there are GPU cards that need to be upgraded / downgraded, the update task management unit 110 selects the target GPU cards to be upgraded / downgraded in the current batch and notifies the computing task management unit 120 of the information of the GPU cards that need to be upgraded / downgraded.

[0119] The computing task management unit 120 schedules tasks and waits for the computing tasks on the GPU cards that need to be upgraded / downgraded to end. For example, the computing task management unit 120 controls the server to enter the downgrade mode. After receiving the information of the GPU card that needs to be upgraded / downgraded, it stops scheduling computing tasks to the GPU card that needs to be upgraded / downgraded, and assigns the unstarted tasks to the GPU cards other than the GPU card that needs to be upgraded / downgraded. After all the computing tasks on the GPU card that needs to be upgraded / downgraded are completed, the computing task management unit 120 notifies the update task management unit 110.

[0120] After receiving the above notification, the update task management unit 110 initiates an update call. For example, the update task management unit 110 sends an update call to the user-mode driver unit 140, and the user-mode driver unit 140 and the kernel-mode driver unit 160 execute the update call operation step by step. In some example cases, the update call of the GPU card can also be directly sent to the kernel-mode driver unit 160 through the system file system 150.

[0121] After receiving the update call for the GPU card, the kernel-mode driver 160 updates a single batch of GPU cards. The updated GPU card is hot restarted to reload the firmware. After that, the update result of the GPU card is detected and the upgraded / downgraded state of the GPU card is updated.

[0122] In some embodiments, the update result of the GPU card is reported upward step by step by the kernel-mode driver unit 160 to the update task management unit 110, so that the update task management unit 110 persists the storage of the task state.

[0123] In some embodiments, the firmware and version information are stored in the local firmware repository 130. Generally, the kernel-mode driver unit 160 checks the firmware version. If the new version of the firmware can work compatibly with the old version of the firmware, the successfully updated GPU card can work with the new version of the firmware. Otherwise, the update task management unit 110 retries or rolls back the update operation according to the specified policy.

[0124] After the upgrade / downgrade of the current batch of GPU cards is completed, it is determined again whether there are GPU cards in the server that need to be upgraded / downgraded. If so, the above operations are repeated until all the GPU cards that need to be upgraded / downgraded are updated. In other words, in some embodiments, the upgrade / downgrade of multiple GPU cards is carried out in batches in a round-robin manner. After one batch of upgrade / downgrade is completed, the next batch of upgrade / downgrade is carried out until all the GPU cards are upgraded / downgraded.

[0125] For example, in some embodiments, the computing device may be a computing node, such as a server. Each computing node may include multiple computing units. For example, the computing device 100 may be a GPU server, and the computing unit 170 may be a GPU card. Each GPU server may include multiple GPU cards. Each computing node may be configured with components such as an update task management unit and a computing task management unit, which can manage the computing tasks and update tasks of the multiple computing units it includes and can execute the update method of the embodiments of the present disclosure.

[0126] For example, in some other embodiments, the computing device may be a rack-mounted server. Each rack-mounted server may include multiple computing nodes, and each computing node may further include multiple computing units. Each rack-mounted server may be configured with components such as an update task management unit and a computing task management unit, which can uniformly manage the computing tasks and update tasks of the multiple computing units included in the rack-mounted server.

[0127] For example, in some other embodiments, the computing device may be a computing cluster. Each computing cluster may include multiple rack-mounted servers, each rack-mounted server may include multiple computing nodes, and each computing node may further include multiple computing units. Each computing cluster may be configured with components such as an update task management unit and a computing task management unit, which can uniformly manage the computing tasks and update tasks of each computing unit included in the computing cluster.

[0128] For example, in some other embodiments, in a cluster environment, multiple computing nodes may also be updated (e.g., upgraded) simultaneously or in batches, thereby accelerating the upgrade of the entire computing cluster. According to some embodiments, the computing cluster may be configured with a cluster management control program (the cluster management control program may include, for example, Figure 1 the programs corresponding to the update task management unit 110 and the computing task management unit 120), and the cluster management control program initiates an update request for the computing nodes. The cluster may be configured with cluster management software. Through the cluster management software, coarse-grained management of the entire cluster resources (e.g., resources within the entire cluster environment) can be achieved, and fine-grained management of the resources within a single computing node can also be achieved. For example, the usage conditions (e.g., load, power consumption, temperature, status, etc.) of resources such as GPUs, memory, network, computing cores, and codecs in the entire cluster and each computing node can be displayed on the management client. In some embodiments, the cluster management software may provide, for example, management tools and API interfaces in the form of command lines to achieve visualization of the management interface.

[0129] Figure 10 FIG. shows a schematic diagram of yet another computing device 300 according to an embodiment of the present disclosure.

[0130] AsFigure 10 As shown, the computing device 300 may include a computing task management unit 320, an update task management unit 310, and a plurality of computing units 370.

[0131] In some embodiments, the computing task management unit 320 may be configured to receive computing tasks and allocate the computing tasks to the plurality of computing units 370.

[0132] In some embodiments, the update task management unit 310 may be configured to receive an update task for at least one target computing unit among the plurality of computing units 370, and update the at least one target computing unit and control the computing task management unit 320 to allocate the current computing task to at least one other available computing unit among the plurality of computing units 370 other than the at least one target computing unit in a state where the computing device 300 can provide services.

[0133] For example, the computing task management unit 320, the update task management unit 310, and the computing units 370 may be hardware, software, firmware, and any feasible combination thereof. For example, the computing task management unit 320, the update task management unit 310, and the computing units 370 may be dedicated or general-purpose circuits, chips, or devices, etc., or may also be a combination of a processor and a memory. Regarding the specific implementation forms of the above various units, the embodiments of the present disclosure do not limit this.

[0134] It should be noted that Figure 10 the units and structures of the computing device 300 shown are exemplary rather than restrictive. According to needs, the computing device 300 may further include other units and structures.

[0135] For example, the computing device may further include, as shown in Figure 1 a kernel-mode driver unit and a user-mode driver unit. The kernel-mode driver unit is configured to manage the plurality of computing units. The user-mode driver unit is configured to manage the communication between the application layer and the kernel-mode driver. The user-mode driver is further configured to: receive information on updating at least one target computing unit and allocating the current computing task to other computing units, and provide the information to the kernel-mode driver. The kernel-mode driver is further configured to: drive other computing units to execute computing tasks and update at least one target computing unit.

[0136] For example, the computing units may include a graphics processor, a neural network processor, a tensor processor, or a data processor, etc. For example, the computing device may be a computing cluster, a rack-mounted server, or a computing node, etc.

[0137] For example, the computing device 300 may further include, but is not limited to, a firmware repository 130 and a system file system 150 as shown in Figure 1 etc.

[0138] In addition, Figure 10 Each unit of the computing device 300 shown corresponds to each step of the foregoing method for updating a computing device. For the specific functions of the computing device 300 and its units, reference may be made to the relevant description of the method for updating a computing device, which will not be elaborated herein.

[0139] At least one embodiment of the present disclosure further provides an electronic device, which includes a processor and a memory. The memory includes one or more computer program modules. One or more computer program modules are stored in the memory and configured to be executed by the processor. One or more computer program modules include instructions for implementing the foregoing method for updating a computing device. The electronic device can keep the server online all the time while upgrading the firmware of the server.

[0140] Figure 11 A schematic diagram of an electronic device 400 according to an embodiment of the present disclosure is shown. As Figure 11 shown, the electronic device 400 includes a processor 410 and a memory 420. The memory 420 is used to store non-transitory computer-readable instructions (such as one or more computer program modules). The processor 410 is used to run the non-transitory computer-readable instructions, and when the non-transitory computer-readable instructions are run by the processor 410, one or more steps in the foregoing method for updating a computing device can be executed. The memory 420 and the processor 410 can be interconnected through a bus system and / or other forms of connection mechanisms (not shown).

[0141] For example, the processor 410 can be a central processing unit (CPU), a graphics processing unit (GPU), or other forms of processing units with data processing capabilities and / or program execution capabilities. For example, the central processing unit (CPU) can be of the X86 or ARM architecture, etc. The processor 410 can be a general-purpose processor or a dedicated processor, and can control other components in the electronic device 400 to execute desired functions.

[0142] For example, the memory 420 may include any combination of one or more computer program products, and the computer program products may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, erasable programmable read-only memory (EPROM), portable compact disc read-only memory (CD-ROM), USB memory, flash memory, etc. One or more computer program modules may be stored on the computer-readable storage media, and the processor 410 may run one or more computer program modules to implement various functions of the electronic device 400. Various application programs and various data, as well as various data used and / or generated by the application programs, may also be stored in the computer-readable storage media.

[0143] It should be noted that in the embodiments of the present disclosure, for the specific functions and technical effects of the electronic device 400, reference may be made to the description of the update method of the computing device in the foregoing text, and details are not described herein again.

[0144] Figure 12 FIG. shows a schematic diagram of another electronic device 500 according to an embodiment of the present disclosure. The electronic device 500 is, for example, suitable for implementing the update method of the computing device provided by the embodiments of the present disclosure. The electronic device 500 may be a terminal device, etc. It should be noted that Figure 12 The illustrated electronic device 500 is only an example, and it will not bring any limitation to the functions and usage scope of the embodiments of the present disclosure.

[0145] As Figure 12 shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 510, which may perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 520 or the program loaded from the storage device 580 into the random access memory (RAM) 530. In the RAM 530, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 510, the ROM 520, and the RAM 530 are connected to each other through a bus 540. The input / output (I / O) interface 550 is also connected to the bus 540.

[0146] Typically, the following devices can be connected to the I / O interface 550: input devices 560 including, such as, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 570 including, such as, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 580 including, such as, magnetic tape, a hard disk, etc.; and a communication device 590. The communication device 590 can allow the electronic device 500 to communicate with other electronic devices wirelessly or wiredly to exchange data. Although Figure 12 the electronic device 500 with various devices is shown, it should be understood that it is not required to implement or have all the shown devices, and the electronic device 500 can alternatively implement or have more or fewer devices.

[0147] For example, according to an embodiment of the present disclosure, the update method of the above computing device can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes program codes for executing the update method of the above computing device. In such an embodiment, the computer program can be downloaded and installed from a network through the communication device 590, or installed from the storage device 580, or installed from the ROM 520. When the computer program is executed by the processing device 510, the functions defined in the update method of the computing device provided by the embodiments of the present disclosure can be realized.

[0148] At least one embodiment of the present disclosure also provides a computer-readable storage medium, which is used to store non-temporary computer-readable instructions, and when the non-temporary computer-readable instructions are executed by a computer, the update method of the above computing device can be realized. By using this computer-readable storage medium, the server can be kept online while upgrading the firmware of the server.

[0149] Figure 13 The schematic diagram of a computer-readable storage medium according to an embodiment of the present disclosure is shown. As Figure 13 shown, the storage medium 600 is used to store non-temporary computer-readable instructions 610. For example, when the non-temporary computer-readable instructions 610 are executed by a computer, one or more steps in the update method of the computing device described above can be executed.

[0150] For example, the storage medium 600 can be applied to the above electronic device 400. For example, the storage medium 600 can be the memory 420 in the Figure 11 shown electronic device 400. For example, the relevant description about the storage medium 600 can refer to the corresponding description of the memory 420 in the Figure 11 shown electronic device 400, which will not be elaborated here.

[0151] The following points need to be explained:

[0152] (1) The accompanying drawings of the embodiments of the present disclosure only relate to the structures involved in the embodiments of the present disclosure, and other structures can refer to the general design.

[0153] (2) Without conflict, the embodiments of the present disclosure and the features in the embodiments can be combined with each other to obtain new embodiments.

[0154] As mentioned above, the above are only the specific implementation manners of the present disclosure, but the protection scope of the present disclosure is not limited thereto. The protection scope of the present disclosure should be subject to the protection scope of the claims.

Claims

1. A method for updating a computing device, the computing device including a plurality of computing units, the method comprising: Receiving an update task for at least one target computing unit among the plurality of computing units; Allocating the current computing task of the at least one target computing unit to at least one other available computing unit among the plurality of computing units except the at least one target computing unit; Updating the at least one target computing unit in a state where the computing device can provide services, wherein the update task includes a firmware upgrade task, the update method further comprising: In response to receiving the update task, controlling the computing device to enter a second working mode from a first working mode, wherein the working capacity of the first working mode is greater than that of the second working mode.

2. The update method according to claim 1, wherein, When the at least one target computing unit is all of the plurality of computing units, the update method further comprises: Performing a multi-batch update operation to update all of the plurality of computing units in batches, wherein each batch update operation in the multi-batch update operation includes: Selecting at least one computing unit from the plurality of computing units as the update target computing unit in the current batch; Allocating the computing task of the update target computing unit in the current batch to at least one other available computing unit among the plurality of computing units except the update target computing unit in the current batch; Updating the update target computing unit in the current batch.

3. The update method according to claim 2, wherein, Each batch update operation in the multi-batch update operation further includes: Determining the number of computing units updated in the current batch; Selecting a corresponding number of computing units from the plurality of computing units as the update target computing units in the current batch according to the number of computing units.

4. The update method according to claim 3, wherein, Determining the number of computing units updated in the current batch includes: Determining the number of computing units updated in the current batch according to the processing status of the current computing task.

5. The update method according to claim 3, wherein Each batch update operation in the multi-batch update operation further includes: Pausing the allocation of new computing tasks to the update target computing units in the current batch; Waiting for the update target computing units in the current batch to complete the already allocated computing tasks, and then updating the update target computing units in the current batch.

6. The update method according to claim 1 or 2, wherein The update task further includes a hardware replacement task.

7. The update method according to claim 1, wherein, The second working mode further includes pausing the reception of predetermined tasks.

8. The update method according to claim 1 or 2, wherein, Updating the at least one target computing unit includes performing the following steps for each of the target computing units: Obtaining a firmware update program; Writing the firmware update program into the target computing unit so that the firmware update program overwrites the original firmware program in the target computing unit; Performing a warm restart on the updated target computing unit.

9. The update method according to claim 8, wherein, Updating the at least one target computing unit further includes performing the following steps for each of the target computing units: Detecting the loading state of the firmware update program in the target computing unit; In response to the loading state indicating that the firmware update program is successfully loaded, recording the update state of the target computing unit, or In response to the loading state indicating that the firmware updater fails to load, control the target computing unit to restore from the firmware updater to the original firmware program.

10. The update method according to claim 8, wherein, Updating the at least one target computing unit further includes performing the following steps for each of the target computing units: Detect the compatibility state of the firmware updater in the target computing unit; In response to the compatibility state indicating incompatibility of the firmware updater in the target computing unit, control the target computing unit to restore from the firmware updater to the original firmware program.

11. The update method according to claim 1 or 2, wherein, The computing device provides a kernel-mode driver to manage the multiple computing units, and provides a user-mode driver to manage the communication between the application layer and the kernel-mode driver. When distributing a computing task to at least one other available computing unit among the multiple computing units excluding the at least one target computing unit, in a state where the computing device can provide services, updating the at least one target computing unit further includes: Receiving, through the user-mode driver, information on updating the at least one target computing unit and distributing the current computing task to the other available computing units, and providing the information to the kernel-mode driver; Driving the other available computing units to execute computing tasks through the kernel-mode driver, and updating the at least one target computing unit.

12. A computing device, comprising: Multiple computing units; A computing task management unit configured to receive a computing task and distribute the computing task to the multiple computing units; An update task management unit configured to receive an update task for at least one target computing unit among the multiple computing units, control the computing task management unit to distribute the current computing task of the at least one target computing unit to at least one other available computing unit among the multiple computing units excluding the target computing unit, and update the at least one target computing unit in a state where the computing device can provide services. Wherein, the update task includes a firmware upgrade task. Wherein, the computing task management unit is further configured to: In response to receiving the update task, control the computing device to enter a second working mode from a first working mode, wherein the working capacity of the first working mode is greater than that of the second working mode.

13. The computing device according to claim 12, wherein, The update task management unit is further configured to: In a case where the at least one target computing unit is all of the multiple computing units, perform a multi-batch update operation to update all of the multiple computing units in batches, wherein each batch update operation in the multi-batch update operation includes: Selecting at least one computing unit from the multiple computing units as the update target computing unit in the current batch; Distributing the computing task of the update target computing unit in the current batch to at least one other available computing unit among the multiple computing units excluding the update target computing unit in the current batch; Updating the update target computing unit in the current batch.

14. The computing device according to claim 13, wherein, The update task management unit is further configured to: Determine the number of computing units to be updated in the current batch; According to the number of the computing units, select a corresponding number of computing units from the multiple computing units as the update target computing units in the current batch.

15. The computing device according to claim 14, wherein The update task management unit is further configured to: Determine the number of computing units to be updated in the current batch according to the processing status of the current computing task.

16. The computing device according to claim 14, wherein, The computing task management unit is further configured to: Suspend allocating new computing tasks to the update target computing units in the current batch; Wait for the update target computing units in the current batch to complete the already allocated computing tasks, and then update the update target computing units.

17. The computing device according to claim 12 or 13, wherein, The update task management unit is further configured to: Obtain a firmware update program; Write the firmware update program into the target computing unit so that the firmware update program overwrites the original firmware program in the target computing unit; Thermally restart the updated target computing unit.

18. The computing device according to claim 17, wherein, The update task management unit is further configured to: Detect the loading status of the firmware update program in the target computing unit; In response to the loading status indicating that the firmware update program is successfully loaded, record the update status of the target computing unit, or In response to the loading status indicating that the firmware update program fails to be loaded, control the target computing unit to be restored to the original firmware program by the firmware update program.

19. The computing device according to claim 17, wherein, The update task management unit is further configured to: Detect the compatibility status of the firmware update program in the target computing unit; In response to the compatibility status indicating incompatibility of the firmware update program in the target computing unit, control the target computing unit to be restored to the original firmware program by the firmware update program.

20. The computing device according to claim 12 or 13, further comprising: A kernel-mode driver unit configured to manage the multiple computing units; And A user-mode driver unit configured to manage the communication between the application layer and the kernel-mode driver program, wherein the user-mode driver program is further configured to: receive information for updating the at least one target computing unit and allocating the current computing task to the other available computing units, and provide the information to the kernel-mode driver program; The kernel-mode driver program is further configured to: drive the other available computing units to execute computing tasks and update the at least one target computing unit.

21. The computing device according to claim 12 or 13, wherein, The computing unit includes a graphics processor, a neural network processor, a tensor processor or a data processor.

22. The computing device according to claim 12 or 13, wherein, The computing device is a computing cluster, a rack-mounted server or a computing node.

23. An electronic device, comprising: A processor; A memory including one or more computer program modules; wherein the one or more computer program modules are stored in the memory and configured to be executed by the processor, and the one or more computer program modules include instructions for implementing the update method according to any one of claims 1-11 when executed by the processor.

24. A computer-readable storage medium for storing non-transitory computer-readable instructions that, when executed by a computer, can implement the update method according to any one of claims 1-11.

Citation Information

Patent Citations

  • GPU fault prediction method and device

    CN105988918A

  • Firmware upgrading method, system and device and computer readable storage medium

    CN110502262A

  • Containerized service updating method and device

    CN112947965A