Method, device and related product for obtaining device information

By maintaining storage space for static and dynamic device information in the server host memory, the problem of difficulty in obtaining information when accelerator devices fail is solved, and the reliability of obtaining device information in failure conditions is improved and the processing flow is simplified.

CN123137974APending Publication Date: 2026-11-20ANHUI CAMBRICON INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510652685.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-20
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

When an accelerator device malfunctions, the real-time communication mechanism between the accelerator device and the server host in traditional technologies may be interrupted, making it impossible for users to obtain device information and difficult to locate the abnormal device.

Method used

Two storage spaces are maintained in the memory of the server host: the first storage space is used to store static device information of the accelerator device, which remains valid in the event of a failure; the second storage space is used to store dynamic device information, which is cleared in the event of a failure.

Benefits of technology

When an accelerator device malfunctions, static device information can still be retrieved from the first storage space, providing a reliable source of information to help locate and find abnormal devices and simplify the fault handling process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123137974A_ABST
    Figure CN123137974A_ABST
Patent Text Reader

Abstract

The present disclosure provides a device information acquisition method and device and related products. During normal operation of an accelerator device, at least part of device information of the accelerator device is stored in a first storage space of a server host through real-time communication, and the data in the first storage space is still retained when the accelerator device is abnormal, so that the user can still obtain the device information of the accelerator device when the accelerator device is faulty.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a method, apparatus and related products for acquiring device information. Background Technology

[0002] With the widespread adoption and application of artificial intelligence (AI) technology across various industries, accelerator devices, as powerful parallel computing tools, are increasingly used. Accelerator devices typically require continuous operation for extended periods to meet the complex and demanding computational needs of large-scale AI model training and inference. However, during prolonged operation, accelerator devices may experience various software or hardware failures, such as overheating and card failures, or system software malfunctions.

[0003] In traditional technologies, users typically obtain accelerator device information through real-time communication between the server host and the accelerator device. However, when the accelerator device malfunctions, the real-time communication mechanism between the accelerator device and the server host may be interrupted, preventing users from obtaining the accelerator device information through real-time communication. Summary of the Invention

[0004] Based on existing technology, this disclosure provides a method, apparatus and related products for obtaining equipment information. When accelerator equipment malfunctions, users can still obtain and view the equipment information of the accelerator equipment, providing a reliable source of information for on-site location and search of abnormal accelerator equipment.

[0005] A method for obtaining device information, the method comprising the following steps: The static device information of the accelerator device is obtained from the accelerator device through real-time communication, and the static device information is stored in the first storage space of the host memory; wherein the static device information in the first storage space is continuously retained when the accelerator device malfunctions. When the accelerator device malfunctions, the static device information corresponding to the accelerator device is obtained from the first storage space.

[0006] The step of obtaining static device information of the accelerator device from the accelerator device via real-time communication includes: During the initialization phase of the accelerator device, the initial device information corresponding to the accelerator device is obtained through the real-time communication.

[0007] The step of obtaining the static device information of the accelerator device from the accelerator device through real-time communication further includes: During the operation of the accelerator device, at preset time intervals, static device information of the accelerator device is read from the accelerator device via real-time communication.

[0008] The step of obtaining the static device information of the accelerator device from the accelerator device through real-time communication further includes: During the runtime phase of the accelerator device, trigger commands are obtained through command-line tools or software interfaces; According to the trigger command, the static device information of the accelerator device is read from the accelerator device through the real-time communication.

[0009] The static device information includes one or more of the following: The accelerator device includes at least one identification information, resource description information, configuration information, anomaly information, and pre-agreed target information.

[0010] Wherein, obtaining the static device information corresponding to the accelerator device from the first storage space includes: Obtain the identification information of the accelerator device through command-line tools or software interfaces; Based on the identification information of the accelerator device, the static device information corresponding to the accelerator device is retrieved from the first storage space.

[0011] The device information further includes dynamic device information, and the method further includes: The corresponding dynamic device information of the at least one accelerator device is stored in the second storage space of the host memory; When the accelerator device malfunctions, the dynamic device information in the second storage space is cleared. This disclosure also provides a device for acquiring device information, including a processor and a memory, wherein the memory is used to store computer program instructions, and the processor executes the computer program instructions to implement the above-described method for acquiring device information.

[0012] This disclosure also provides a computer program product, which includes at least one computer program instruction. When the computer program instruction is executed by a processor, it implements the above-described method for obtaining device information.

[0013] This disclosure also provides a computer storage medium for storing computer program instructions, which, when executed by a processor, implement the above-described method for obtaining device information.

[0014] The device information acquisition method, apparatus and related products disclosed herein store at least a portion of the device information of the accelerator device in the first storage space of the server host through real-time communication during the normal operation of the accelerator device, and the data in the first storage space is still retained even when the accelerator device malfunctions, so that users can still obtain the device information of the accelerator device when the accelerator device fails. Attached Figure Description

[0015] Figure 1 This is a schematic diagram of a parallel computing system in one embodiment; Figure 2 This is a schematic diagram of a parallel computing system according to one embodiment of the present disclosure; Figure 3 This is a schematic diagram of a parallel computing system according to another embodiment of the present disclosure; Figure 4 This is a flowchart illustrating a method for obtaining device information according to an embodiment of the present disclosure. Detailed Implementation

[0016] To make the objectives, technical solutions, and advantages of this disclosure clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this disclosure.

[0017] The terminology used in the embodiments of this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of this disclosure. The singular forms “a,” “the,” and “the” as used in the embodiments of this disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0018] It should be understood that the term "and / or" used in this document is merely a description of the same field in the related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.

[0019] It should be understood that although terms such as first, second, third, etc., may be used to describe preset ranges in the embodiments of this disclosure, these preset ranges should not be limited to these terms. These terms are only used to distinguish preset ranges from one another. For example, without departing from the scope of the embodiments of this disclosure, a first preset range may also be referred to as a second preset range, and similarly, a second preset range may also be referred to as a first preset range.

[0020] Depending on the context, the word "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection." Similarly, depending on the context, the phrase "if determination" or "if detection (of the stated condition or event)" can be interpreted as "when determination," "in response to determination," "when detection (of the stated condition or event)," or "in response to detection (of the stated condition or event)."

[0021] With the popularization and application of artificial intelligence technology in various industries, accelerator equipment, as a powerful parallel computing device, is widely used. Figure 1 This illustrates an application example of accelerator devices in a parallel computing scenario, such as... Figure 1 The provided parallel computing system 100 may include a server host 110 and at least one accelerator device 120 (e.g., accelerator device 0, accelerator device 1, ..., accelerator device N, where N is a positive integer greater than or equal to 1). The at least one accelerator device 120 is connected to the server host 110 via a PCIe bus (Peripheral Component Interconnect Express). Specifically, the server host 110 may have at least one PCIe slot, and the at least one accelerator device 120 is respectively plugged into the corresponding PCIe slot. The server host 110 and the at least one accelerator device 120 can communicate in real time via the PCIe bus. The accelerator device 120 may be a GPU (Graphics Processing Unit), a TPU (Tensor Processing Unit), an IPU (Intelligent Processing Unit), or an NPU (Neural Network Processing Unit), etc., without specific limitations here.

[0022] See also Figure 1 The server host can run a driver 111, which controls the startup and operation of at least one accelerator device 120, as well as the information interaction between the at least one accelerator device 120 and the server host 110. The driver 111 is related to the type of accelerator device 120, and each type of accelerator device 120 has a corresponding driver. For example, NPU and GPU have different drivers.

[0023] The server host 110 may further include a host memory 112, and each accelerator device 120 may include a device memory and a device register (not shown). The driver 111 accesses the host memory 112 and the device memory or device register to realize information interaction between the server host and each accelerator device. Specifically, during their operation, each accelerator device 120 can store interaction information in its respective device memory or device register. The server host 110 can copy the interaction information stored in the device memory or device register of each accelerator device 120 to the host memory, so that users can obtain device information on the device side through the server host. When an accelerator device is reset, the driver 111 usually clears the corresponding interaction information between the accelerator device 120 and the server host 110 stored in the host memory.

[0024] In scenarios such as parallel computing, accelerator devices typically need to run continuously for extended periods to meet the complex and high-intensity computational demands of large AI model training and inference. However, during prolonged operation, accelerator devices may experience various software or hardware failures, such as overheating and card failure, or system software malfunctions.

[0025] In traditional technologies, users typically obtain accelerator device information through real-time communication between the server host and the accelerator device. For example, users can achieve real-time communication with the accelerator device through command-line tools or software interfaces provided by the server host. However, when the accelerator device malfunctions, the real-time communication mechanism between the accelerator device and the server host may be interrupted, preventing users from obtaining the accelerator device information through real-time communication. This will make it difficult for users to view device information and locate the malfunctioning device.

[0026] Based on this, the present disclosure provides a method, apparatus and related products for obtaining equipment information of accelerator equipment. During the normal operation of the accelerator equipment, at least a portion of the equipment information of the accelerator equipment is stored on a server host, so that when the accelerator equipment fails, the user can still obtain the equipment information of the accelerator equipment, providing a reliable source of information for on-site location and search of abnormal accelerator equipment.

[0027] like Figure 2As shown, the parallel processing system 200 (e.g., a server) provided in this embodiment may include a server host 210 and at least one accelerator device 220. The server host 210 may include a driver 211 capable of running thereon and host memory. In order to obtain device information of the accelerator device in an abnormal state, the driver 211 in this embodiment may maintain two storage spaces in the host memory, namely a first storage space 212 and a second storage space 213.

[0028] The first storage space 212 is used to record static device information of the accelerator device. For example, the driver may maintain a first structure in the first storage space to record the static device information of the accelerator device, which generally does not change during the operation of the accelerator device. This static device information may be all historical static device information obtained by the server host 210 from the accelerator device 220 from the initialization of the accelerator device until an anomaly occurs. This historical static device information may be obtained by the server host 210 from the accelerator device 220 through real-time communication or other means during the initialization or normal operation phase of the accelerator device 220. For example, during the initialization phase of the accelerator device 220, the server host 210 may initialize and configure the accelerator device 220, obtain its static device information after initialization, and store this static device information in the first storage space. For example, during the normal operation of the accelerator device 220, the server host 210 can obtain the static device information of the accelerator device 220 during operation through real-time communication or other means, and update the static device information stored in the first storage space 212. Furthermore, when an anomaly occurs during the operation of the accelerator device, such as a task execution error, the server host 210 can also store the error codes and anomaly diagnostic information reported by the accelerator device 220 in the first storage space 212.

[0029] Static device information may include one or more of the following: at least one identification information of the accelerator device, resource description information of the accelerator device, abnormal information of the accelerator device, configuration information of the accelerator device, and pre-agreed target information. For example, the identification information of the accelerator device may include the device number, device SN (Serial Number), device UUID (Universally Unique Identifier), accelerator device BDF (Bus, Device, Function) number, and slot number of the accelerator device on the server host. Each accelerator device has unique identification information, which can be used to distinguish different accelerator devices. The resource description information of the accelerator device may include the total capacity and specifications of the device memory on the accelerator device, the number of computing chips on the accelerator device, and the number of processor cores of each computing chip, etc., describing storage or computing resources. The abnormal information of the accelerator device may include device error codes, abnormal diagnostic information, etc. The configuration information of the accelerator device may include connection status information between the accelerator device and the server host, and the accelerator device's operating mode configuration information (e.g., the accelerator device is configured to operate in virtualization mode or physical card mode). Pre-agreed target information may include any information of interest to the user, such as the accelerator device's operating status information, instance information running on the accelerator device, and log information of the accelerator device.

[0030] In this embodiment, unless the user manually deletes the device, manually empties the first storage space, or reloads and reinstalls the driver for the accelerator device, the static device information corresponding to the accelerator device stored in the first storage space remains valid indefinitely. Even when the accelerator device malfunctions, the static device information stored in the first storage space will not be deleted but will be continuously retained.

[0031] The second storage space 213 may be a storage space agreed upon by the server host 210 and at least one accelerator device 220 for storing interactive information. For example, the driver 211 may maintain a second structure in the second storage space 213 to record the aforementioned interactive information (which may also be referred to as dynamic device information in this embodiment). The interactive information may be the status information of various sub-modules within the accelerator device during normal operation. For example, the interactive information may include the usage of device memory on the accelerator device, the real-time utilization of at least one processor core on the accelerator device, the number and execution status of tasks running on the accelerator device (such as kernel tasks), and task-related information such as task scheduling and control information on the accelerator device. When the accelerator device malfunctions and needs to be reset, since it is difficult to determine the cause of the malfunction, the interactive information in the second storage space is usually temporarily or permanently destroyed. At this time, the real-time communication between the accelerator device 220 and the server host 210 will also be interrupted. Therefore, in this embodiment, the lifespan of the interactive information in the second storage space 213 is less than or equal to the lifespan of the static device information in the first storage space 212.

[0032] The parallel processing system of this disclosure embodiment, compared to Figure 1 The conventional solution shown stores historical static device information of the accelerator device before the malfunction by maintaining a first storage space 212 in the server host 210. When the accelerator device malfunctions, the server host 210 can read part of the device information of the accelerator device from the first storage space 212, providing a reliable source of information for on-site location and search of the malfunctioning accelerator device.

[0033] The following is combined Figure 2 The working process of the device information acquisition method in this embodiment of the present disclosure is illustrated by taking accelerator device 0 as an example: First, driver 211 can boot and initialize accelerator device 0 via the PCIe bus. During the initialization process of accelerator device 0, server host 210 can establish communication with accelerator device 0 via the PCIe bus. After the initialization of accelerator device 0 is completed, server host 210 can obtain the initial static device information of accelerator device 0, as shown in the path diagram. This initial static device information may include at least one identification information such as device number, device SN (Serial Number), device UUID (Universally Unique Identifier), accelerator device BDF (Bus, Device, Function) number, and accelerator device slot number on the server host; resource description information such as the total capacity and specifications of device memory on the accelerator device, the number of computing chips on the accelerator device, and the number of processor cores of each computing chip; and various configuration information of the accelerator device, such as the connection status information between accelerator device 0 and the server host, and the operating mode information of accelerator device 0. Afterwards, the driver can store the obtained initial static device information in the first storage space, as shown in the path diagram.

[0034] After initializing accelerator device 0, driver 211 can send tasks and control information to the accelerator device via the PCIe bus to control its operation. Specifically, driver 211 can transmit interactive information such as tasks and control information of the accelerator device stored in the second storage space 213 to the device memory or device register (not shown) of accelerator device 0 via the PCIe bus, enabling accelerator device 0 to receive and execute tasks sent by the server host. During the operation of accelerator device 0, driver 211 can read static device information of accelerator device 0 during operation from its device memory or device register via the PCIe bus and write this static device information to the first storage space 212 (see the path in the figure) to update the static device information stored in the first storage space in real time during runtime. Simultaneously, driver 211 can also read interactive information of accelerator device 0 during operation from its device memory or device register via the PCIe bus, such as control signal response information, task execution status and result information, and write this interactive information to the second storage space (see the path in the figure).

[0035] Furthermore, when accelerator device 0 malfunctions, for example, when server host 210 detects that accelerator device 0 has lost its card, real-time communication between server host 210 and accelerator device 0 is interrupted. In response to the malfunction of accelerator device 0, server host 210 clears the interactive information stored in the second storage space 213 and can read some of the device information of accelerator device 0 recorded in the first storage space 212. Specifically, when accelerator device 0 malfunctions, server host 210 can receive the identification information of accelerator device 0 (e.g., the device number of the accelerator device) through a command-line tool or software interface, and retrieve the corresponding static device information of accelerator device 0 from the first storage space 212 based on the device number of accelerator device 0. This static device information is then returned to the user through the software interface or command-line tool, allowing the user to view various device information of the accelerator device, thereby providing a reliable source of information for on-site location and retrieval of malfunctioning accelerator devices.

[0036] Furthermore, the static device information stored in the first storage space 212 includes the configuration information of accelerator device 0. When accelerator device 0 malfunctions, the server host 210 can directly read the historical configuration information of accelerator device 0 from the first storage space 212 and automatically reconfigure the reset accelerator device 0 based on this historical configuration information. Moreover, the static device information in the first storage space 212 also includes information of interest to the user, such as information that is not frequently updated. This information can be pre-agreed target information. When accelerator device 0 malfunctions, the server host 210 can also directly read the static device information of the malfunctioning accelerator device from the first storage space 212 to parse the target information of interest to the user from the static device information of accelerator device 0, thereby reducing the call chain of target information and speeding up the information acquisition process.

[0037] like Figure 3 As shown, this disclosure provides an application scenario diagram of a parallel processing system. Figure 2 The systems shown are different. Figure 3 The parallel processing system 300 shown (e.g., a server) also includes a BMC (Baseboard Management Controller) component 330, which is typically located within the server and is independent of the server host 310 and accelerator device 320. See also... Figure 3The BMC component 330 can be connected to various accelerator devices via an Smbus bus. The BMC component 330 may include a cache unit for storing device information. During normal operation of the accelerator device 320, the BMC component 330 can obtain device information (including dynamic interactive information and static device information) from the accelerator device 320 through real-time communication and store this information in its cache unit. When the accelerator device 320 malfunctions or shuts down, the server host can obtain the device information by reading the data from the cache unit, thus ensuring that users can quickly locate device faults in the accelerator device when the server malfunctions. In this scenario, users can use either host memory or the BMC component to obtain and store device information. Specifically, Method 1: Use the BMC component to acquire and store device information. This method requires additional BMC component configuration, increasing server costs. Furthermore, due to the limited space in the BMC component's cache units, it can often only store limited device information in a specific data organization format, which may not meet user needs. In this method, the server host reads and writes device information through the BMC component, while interaction with the accelerator device is achieved directly through the PCIe bus.

[0038] Method 2: Use host memory to acquire and store device information. Since host memory typically has a larger storage capacity than the BMC component, and the data storage format in host memory is more flexible than that in the BMC component, Method 2, compared to Method 1, can store various types and organizational formats of device information, as well as various target information of interest to users. This makes the storage of device information more flexible and comprehensive, meeting user needs without requiring additional components. Furthermore, in this method, the server host and the accelerator device directly exchange device information and interaction information, allowing users to directly reconfigure or control the accelerator device using this information.

[0039] like Figure 4 As shown, the device information acquisition method of this disclosure embodiment can be applied to... Figure 2 or Figure 3 The server host shown can be specifically applied to a driver running on the server host. The driver can maintain a first storage space and a second storage space in the server host's memory, wherein the lifespan of data in the first storage space is greater than or equal to the lifespan of data in the second storage space. The method may include: S410: Obtain static device information of the accelerator device from the accelerator device through real-time communication, and store the static device information in the first storage space of the host memory; In this embodiment of the disclosure, when the accelerator device is functioning normally, a valid communication method is established between the server host and the accelerator device. The server host can obtain static device information of the accelerator device through real-time communication between the server host and the accelerator device or other means, and store this static device information in a first storage space in the host memory. This first storage space is maintained by the driver program, and the static device information in the first storage space is continuously retained even when the accelerator device malfunctions.

[0040] As mentioned earlier, the static device information can be all historical static device information obtained by the server host from the accelerator device through real-time communication or other means during the initialization or normal operation phase of the accelerator device. For example, during the initialization phase of the accelerator device, the server host can initialize and configure the accelerator device, obtain its static device information after initialization, and store this static device information in the first storage space. Similarly, during the normal operation phase of the accelerator device, the server host can obtain the static device information of the accelerator device during operation through real-time communication or other means, and update the static device information stored in the first storage space.

[0041] The static device information may include one or more of the following: at least one identification information of the accelerator device, resource description information of the accelerator device, abnormal information of the accelerator device, configuration information of the accelerator device, and pre-agreed target information. For example, the identification information of the accelerator device may include the device number, device SN (Serial Number), device UUID (Universally Unique Identifier), accelerator device BDF (Bus, Device, Function) number, and slot number of the accelerator device on the server host. Each accelerator device has unique identification information, which can be used to distinguish different accelerator devices. The resource description information of the accelerator device may include the total capacity and specifications of the device memory on the accelerator device, the number of computing chips on the accelerator device, and the number of processor cores of each computing chip, etc., describing storage or computing resources. The abnormal information of the accelerator device may include device error codes, abnormal diagnostic information, etc. The configuration information of the accelerator device may include connection status information between the accelerator device and the server host, and the accelerator device's operating mode configuration information (e.g., the accelerator device is configured to operate in virtualization mode or physical card mode). Pre-agreed target information may include any information of interest to the user, such as the accelerator device's operating status information, instance information running on the accelerator device, and log information of the accelerator device.

[0042] S420. When the accelerator device malfunctions, obtain the static device information corresponding to the accelerator device from the first storage space.

[0043] In this embodiment of the disclosure, when the accelerator device malfunctions, the server host can read the static device information of the accelerator device from the first storage space, thereby ensuring that the server host can still obtain some device information of the accelerator device when the accelerator device malfunctions. This allows users to still obtain and view the device information of the accelerator device when it fails, providing a reliable source of information for locating and finding the malfunctioning accelerator device on site.

[0044] Optionally, when the server host detects an anomaly in the accelerator device, it can obtain the identification information of the accelerator device input by the user through a command-line tool or software interface (API). Then, the server host can retrieve the corresponding static device information of the accelerator device from the first storage space based on the identification information. For example, if the user inputs the device number of the accelerator device through a command-line tool or software interface, such as device number 0 (which refers to accelerator device 0), the server host can receive the device number input by the user and retrieve the corresponding static storage information from the first storage space based on that device number. In optional embodiments, other identification information such as the accelerator device's SN number and UUID number can also be used to retrieve the corresponding static device information of the accelerator device from the first storage space.

[0045] Furthermore, the static device information retrieved from the first storage space can also be returned and displayed as output through command-line tools or software interfaces, so that users can view the static device information of the accelerator device, thereby facilitating users to locate the accelerator device that is malfunctioning on-site and resolve the accelerator device malfunction in a timely manner.

[0046] Optionally, the phase in which the accelerator device does not malfunction can be the initialization phase or the runtime phase of the accelerator device. Therefore, the server host can obtain the initial static device information during the initialization phase of the accelerator device through real-time communication, and can update the static device information in real time during the runtime phase of the accelerator device and store this static device information in the first storage space.

[0047] The server host can start and initialize the accelerator device. The initialization process includes, but is not limited to: training and configuring the PCIe bus link, loading and installing drivers, loading and configuring the accelerator device, and configuring environment variables. After initializing the accelerator device, the server host can send tasks and control information to the accelerator device to control its operation and task execution.

[0048] After the accelerator device completes initialization, the server host can obtain the initial static device information of the accelerator device and store it in the first storage space. This initial static device information may include at least one identification information such as the device number, device SN (Serial Number), device UUID (Universally Unique Identifier), accelerator device BDF (Bus, Device, Function) number, and the slot number of the accelerator device on the server host; resource description information such as the total capacity and specifications of the device memory on the accelerator device, the number of computing chips on the accelerator device, and the number of processor cores of each computing chip; and various configuration information of the accelerator device, such as the connection status information between accelerator device 0 and the server host, and the operating mode information of accelerator device 0.

[0049] Furthermore, after the accelerator device is initialized, the server host can send tasks and control information to the accelerator device to control its operation and task execution. For example, the server host can store the accelerator device's tasks and control information in a second storage space, and then use data transfer instructions to store the tasks and related control information from the second storage space into the accelerator device's device memory or device registers. The accelerator device then begins to run and execute tasks based on the received interaction information.

[0050] During the operation of the accelerator device, the server host can also obtain dynamic device information from the accelerator device, such as the device memory utilization rate, computing resource utilization rate, and task execution status, and store this dynamic device information in the second storage space. In this embodiment, the second storage space is used to store the interaction information between the accelerator device and the server host. When the accelerator device malfunctions, it may be reset. At this time, the server host will clear the dynamic device information in the second storage space. Meanwhile, during the accelerator's runtime phase, the server host can also obtain static device information from the accelerator to reflect its latest operational status. Specifically, during the accelerator's runtime phase, the server host obtains static device information by periodically monitoring and / or inputting trigger commands. In one possible scenario, during the runtime of the accelerator device, the server host can read the static device information of the accelerator device from the accelerator device in real time through a preset time interval, and store the static device information of the accelerator device in a first storage space. This allows for dynamic updates and modifications to the static device information in the first storage space during the runtime of the accelerator device. For example, the preset time interval could be 5 seconds, 10 seconds, etc., and is not specifically limited here.

[0051] In another possible scenario, while the accelerator device is running, the server host can also obtain the static device information of the accelerator device by receiving trigger commands input by the user. Specifically, during the normal operation of the accelerator device, the server host can obtain trigger commands through command-line tools or software interfaces, read the static device information of the accelerator device according to the trigger commands, and store the static device information of the accelerator device in the first storage space. The trigger commands can be commands for obtaining device information, configuration commands for configuring the accelerator device, or control commands for controlling the accelerator device, etc., without specific limitations here.

[0052] For example, the trigger command is a configuration command used to configure the operating mode of the accelerator device. The user enters the configuration command to switch the accelerator device's operating mode to virtualization mode via a command-line tool or software interface. The server host receives the user's configuration command and modifies the accelerator device's operating mode accordingly.

[0053] Simultaneously, the server host can also read the static device information of the accelerator device according to the configuration command. For example, after the accelerator device completes the switching of its working mode, the server host can obtain the latest working mode information of the accelerator device according to the configuration command and store the latest working mode information in the first storage space to update the static device information stored in the first storage space.

[0054] The device information acquisition method of this disclosure allows the server host to clear the interactive information stored in the second storage space and read some of the recorded device information from the first storage space when the accelerator device malfunctions, for example, when the server host detects that the accelerator device has lost its card. This static device information is then returned to the user via a software interface or command-line tool, enabling the user to view various device information of the accelerator device. This provides a reliable source of information for locating and finding the malfunctioning accelerator device on-site. Simultaneously, when the accelerator device malfunctions, the server host can also obtain the configuration information of the accelerator device from the first storage space to achieve automatic configuration after the accelerator device is reset, thus simplifying the initialization and configuration process. Furthermore, when the accelerator device malfunctions, the server host can also obtain user-interested information such as logs and task instances of the accelerator device from the first storage space, thereby simplifying the information acquisition process and improving work efficiency.

[0055] This disclosure also provides a device for acquiring device information, which may be the aforementioned server host. The device may include a processor and a memory, wherein the memory stores computer program instructions. When the processor executes the computer program instructions, it implements the storage allocation method as described in any of the above embodiments. The working principle of this storage allocation device is consistent with the execution process of the device information acquisition method in any of the above embodiments, as detailed in the above description.

[0056] Another embodiment of this disclosure provides a computer program product, which includes at least one computer program instruction. When executed by a processor, the computer program instruction implements the device information acquisition method of any of the above embodiments. Optionally, the computer program product may be a device driver running on the host side. The working principle of this computer program product is consistent with the execution process of the device information acquisition method in any of the above embodiments, as detailed in the above description.

[0057] Another embodiment of this disclosure provides a computer storage medium for storing computer program instructions. When executed by a processor, the computer program instructions implement the device information acquisition method of any of the above embodiments. The execution process of the computer program instructions stored in this computer storage medium is consistent with the execution process of the device information acquisition method in any of the above embodiments, as detailed in the above description.

[0058] The storage medium can be a computer-readable storage medium, such as ferromagnetic random access memory (FRAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), flash memory, magnetic surface memory, optical disc, or compact disk-read-only memory (CD-ROM); or it can be any device that includes one or any combination of the above-mentioned memories.

[0059] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0060] The embodiments described above are merely illustrative of several implementations of this disclosure, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this disclosure, and these all fall within the protection scope of this disclosure. Therefore, the protection scope of this patent should be determined by the appended claims.

Claims

1. A method for acquiring device information, characterized in that, The method includes the following steps: The static device information of the accelerator device is obtained from the accelerator device through real-time communication, and the static device information is stored in the first storage space of the host memory; wherein the static device information in the first storage space is continuously retained when the accelerator device malfunctions. When the accelerator device malfunctions, the static device information corresponding to the accelerator device is obtained from the first storage space.

2. The method according to claim 1, characterized in that, The step of obtaining static device information of the accelerator device from the accelerator device via real-time communication includes: During the initialization phase of the accelerator device, the initial device information corresponding to the accelerator device is obtained through the real-time communication.

3. The method according to claim 1, characterized in that, The step of obtaining static device information of the accelerator device from the accelerator device via real-time communication further includes: During the operation of the accelerator device, at preset time intervals, static device information of the accelerator device is read from the accelerator device via real-time communication.

4. The method according to claim 1 or 3, characterized in that, The step of obtaining static device information of the accelerator device from the accelerator device via real-time communication further includes: During the runtime phase of the accelerator device, trigger commands are obtained through command-line tools or software interfaces; According to the trigger command, the static device information of the accelerator device is read from the accelerator device through the real-time communication.

5. The method according to any one of claims 1-4, characterized in that, The static device information includes one or more of the following: The accelerator device includes at least one identification information, resource description information, configuration information, anomaly information, and pre-agreed target information.

6. The method according to claim 5, characterized in that, Obtaining the static device information corresponding to the accelerator device from the first storage space includes: Obtain the identification information of the accelerator device through command-line tools or software interfaces; Based on the identification information of the accelerator device, the static device information corresponding to the accelerator device is retrieved from the first storage space.

7. The method according to claim 5, characterized in that, The device information also includes dynamic device information, and the method further includes: The corresponding dynamic device information of the at least one accelerator device is stored in the second storage space of the host memory; When the accelerator device malfunctions, the dynamic device information in the second storage space is cleared.

8. A device for acquiring device information, comprising a processor and a memory, wherein the memory is used to store computer program instructions, and the processor, when executing the computer program instructions, implements the device information acquisition method as described in any one of claims 1-7.

9. A computer program product comprising at least one computer program instruction, wherein when executed by a processor, the computer program instruction implements the method for acquiring device information as described in any one of claims 1-7.

10. A computer storage medium for storing computer program instructions, which, when executed by a processor, implement the method for acquiring device information as described in any one of claims 1-7.