An accelerator core online reconfiguration method, device, equipment and storage medium

By receiving acceleration core update tasks and retrieving acceleration core files, and if the conditions are not met, the current file is obtained for reconstruction, the problem of complexity and time consumption in traditional online reconstruction methods is solved, and efficient AI accelerated computing is achieved.

CN116302003BActive Publication Date: 2026-07-24SHANDONG INSPUR SCI RES INST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANDONG INSPUR SCI RES INST CO LTD
Filing Date
2023-04-24
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Traditional online reconfiguration methods are complex to operate, time-consuming to upgrade, and prone to errors, making it impossible to efficiently upgrade device software.

Method used

By receiving the acceleration core update task, it searches for the existence of the corresponding acceleration core file. If the condition is not met, it sends a notification to the upper layer application to obtain the current acceleration core file. When it receives the load instruction, it performs the acceleration core reconstruction operation and uses the shared memory area and the mutable program area to update the acceleration core online.

Benefits of technology

It reduces the consumption of critical hardware resources, shortens program loading time, and improves the efficiency of AI accelerated computing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116302003B_ABST
    Figure CN116302003B_ABST
Patent Text Reader

Abstract

The application discloses an acceleration core online reconstruction method and device, equipment and a storage medium, and relates to the technical field of computers and AI acceleration calculation. The method comprises the following steps: receiving an acceleration core update task, and searching whether a corresponding acceleration core file exists based on the acceleration core update task to obtain a search result; if the search result does not satisfy a preset acceleration core loading condition, sending a file sending notification to an upper-layer application to receive a current acceleration core file sent by the upper-layer application; and when an acceleration core online loading instruction is received, performing a preset acceleration core reconstruction operation based on the current acceleration core file. The application judges whether an acceleration core file identical to a file in an update task exists at present, obtains a new current acceleration core file for acceleration core reconstruction if no identical file exists, replaces and upgrades the acceleration core according to requirements during running, reduces the occupation of key hardware resources, shortens the program loading time, and improves the efficiency of AI acceleration calculation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computer technology and AI-accelerated computing, and particularly to a method, apparatus, device, and storage medium for accelerating online core reconfiguration. Background Technology

[0002] Online reconfiguration involves reconfiguring the hardware and software resources of a device during operation to meet different functional requirements. Traditional methods require compiling all algorithms into the program and downloading the entire program to the device via a specific programming tool or online communication. If software upgrades are needed during use, this presents challenges such as complex operations, long upgrade times, and a high risk of errors. Summary of the Invention

[0003] In view of this, the purpose of this invention is to provide a method, apparatus, device, and storage medium for accelerating online kernel reconfiguration, which can reduce the occupation of critical hardware resources, shorten program loading time, and improve the efficiency of AI accelerated computing. The specific solution is as follows:

[0004] Firstly, this application discloses a method for accelerating online kernel reconfiguration, including:

[0005] Receive the accelerated core update task, and search for the existence of a corresponding accelerated core file based on the accelerated core update task to obtain the search results;

[0006] If the search result does not meet the preset acceleration core loading conditions, a file sending notification is sent to the upper-layer application to receive the current acceleration core file sent by the upper-layer application;

[0007] When an online loading instruction for the acceleration core is received, a preset acceleration core reconstruction operation is performed based on the current acceleration core file.

[0008] Optionally, the step of searching for the existence of a corresponding acceleration core file based on the acceleration core update task to obtain search results includes:

[0009] Obtain the information of the acceleration core file to be updated in the acceleration core update task;

[0010] The program index table is searched based on the information of the acceleration core file to be updated in order to determine whether there is any historical acceleration core file information with the same file name as the information of the acceleration core file to be updated in the program index table.

[0011] If the program index table does not contain any historical acceleration core file information with the same file name as the acceleration core file information to be updated, then the search result is determined to be that the preset acceleration core loading condition is not met.

[0012] If the program index table contains historical acceleration core file information with the same file name as the acceleration core file information to be updated, then a file availability check is performed, and the preset acceleration core loading conditions are determined based on the check results.

[0013] Optionally, the executable file availability check, and the determination of whether the preset acceleration core loading conditions are met based on the check results, includes:

[0014] Obtain the attribute information corresponding to the historical accelerated core file information, and determine whether the attribute information is available;

[0015] If the attribute information is unavailable, then the historical acceleration core file information is determined to be unavailable and the preset acceleration core loading condition is not met;

[0016] If the attribute information is available, then retrieve the historical version number corresponding to the historical accelerated core file information;

[0017] Determine whether the historical version number matches the version number to be updated corresponding to the information of the acceleration core file to be updated;

[0018] If the historical version number is consistent with the version number to be updated, then the historical acceleration core file information is determined to be available and the preset acceleration core loading conditions are met.

[0019] If the historical version number is inconsistent with the version number to be updated, the historical acceleration core file information is determined to be unavailable and the preset acceleration core loading conditions are not met.

[0020] Optionally, before searching the program index table based on the information of the acceleration core file to be updated, the method further includes:

[0021] Obtain the basic information of the historical accelerated core file information and store the basic information in the program index table; the basic information includes the file name, file version number, program attributes, usage frequency and storage location corresponding to the historical accelerated core file information.

[0022] Optionally, after receiving the current acceleration core file sent by the upper-layer application, the method further includes:

[0023] Determine if there are any unused positions in the program index table;

[0024] If an unused location exists in the program index table, the current accelerated kernel file is stored in any of the unused locations and the information in the program index table is updated.

[0025] If the unused location does not exist in the program index table, retrieve the program attributes of all historical accelerated kernel file information;

[0026] Update the information of any failed location among all locations where the program attribute is failed to the information of the current accelerated core file, and store the current accelerated core file at the failed location;

[0027] If all the program attributes of the historical accelerated core file information are valid, then all the historical accelerated core file information are sorted according to the frequency of use to obtain a sorting table;

[0028] The storage area containing the historical accelerated core file information with the lowest usage frequency in the sorting table is overwritten by the current accelerated core file.

[0029] Optionally, when receiving an online loading instruction for the acceleration core, performing a preset acceleration core reconstruction operation based on the current acceleration core file includes:

[0030] When an online loading instruction for the acceleration core is received, a start loading instruction is sent to the fixed program area of ​​the AI ​​acceleration computing region so that the fixed program area enters the upgrade waiting mode after receiving the start loading instruction.

[0031] Obtain the current acceleration core program from the current acceleration core file, and write the current acceleration core program into the variable program area of ​​the AI ​​acceleration computing region;

[0032] When the current acceleration core program is written, a write completion notification is sent to the fixed program area so that the fixed program area can reload the current acceleration core program after receiving the write completion notification.

[0033] Obtain the accelerated kernel loading execution result and return the execution result to the application layer upgrade area.

[0034] Optionally, before obtaining the current acceleration core program from the current acceleration core file and writing the current acceleration core program into the variable program area of ​​the AI ​​acceleration computing region, the method further includes:

[0035] Determine if an accelerated kernel file upgrade instruction has been received;

[0036] If the acceleration core file upgrade instruction is received, the steps of obtaining the current acceleration core program from the current acceleration core file and writing the current acceleration core program into the variable program area of ​​the AI ​​acceleration computing region are executed.

[0037] Secondly, this application discloses an accelerated nuclear online reconfiguration device, comprising:

[0038] Task reception is used to receive accelerated core update tasks;

[0039] The retrieval module is used to search for the existence of a corresponding acceleration core file based on the acceleration core update task, so as to obtain the retrieval results;

[0040] The file receiving module is used to send a file sending notification to the upper-layer application if the search result does not meet the preset acceleration core loading conditions, so as to receive the current acceleration core file sent by the upper-layer application.

[0041] The acceleration core refactoring module is used to perform a preset acceleration core refactoring operation based on the current acceleration core file when an online acceleration core loading instruction is received.

[0042] Thirdly, this application discloses an electronic device, including:

[0043] Memory, used to store computer programs;

[0044] A processor for executing the computer program to implement the steps of the accelerated online core reconfiguration method disclosed above.

[0045] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the accelerated core online reconfiguration method disclosed above.

[0046] As can be seen, this application provides an online acceleration core reconfiguration method, including: receiving an acceleration core update task, and searching for the existence of a corresponding acceleration core file based on the acceleration core update task to obtain a search result; if the search result does not meet the preset acceleration core loading conditions, sending a file sending notification to the upper-layer application to receive the current acceleration core file sent by the upper-layer application; when receiving an online acceleration core loading instruction, performing a preset acceleration core reconfiguration operation based on the current acceleration core file. Therefore, this application determines whether a new acceleration core file identical to the one in the update task exists; if not, it obtains a new current acceleration core file for acceleration core reconfiguration. During operation, the acceleration core is replaced and upgraded as needed, reducing the occupation of critical hardware resources, shortening program loading time, and improving the efficiency of AI accelerated computing. Attached Figure Description

[0047] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0048] Figure 1 This is a flowchart of a method for accelerating online kernel reconfiguration disclosed in this application;

[0049] Figure 2 This is a schematic diagram illustrating the implementation principle of the accelerated core online reconfiguration method for AI computing disclosed in this application.

[0050] Figure 3 This application discloses a specific flowchart of an accelerated online kernel reconfiguration method.

[0051] Figure 4 This application discloses an online update flowchart for the accelerated core online reconfiguration method for AI computing.

[0052] Figure 5 This is a schematic diagram of the accelerated online reconfiguration device for nuclear cores provided in this application;

[0053] Figure 6 This application provides a structural diagram of an electronic device. Detailed Implementation

[0054] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0055] Currently, online reconfiguration involves reconfiguring the hardware and software resources of a device during operation to meet different functional requirements. Traditional methods require compiling all algorithms into the program and downloading the entire program to the device via a specific programming tool or online communication. If software upgrades are needed during use, this presents challenges such as complex operations, long upgrade times, and a high risk of errors. Therefore, this application provides an accelerated online reconfiguration method that reduces the consumption of critical hardware resources, shortens program loading time, and improves the efficiency of AI accelerated computing.

[0056] This invention discloses a method for accelerating online core reconfiguration, see [link to relevant documentation]. Figure 1 As shown, the method includes:

[0057] Step S11: Receive the accelerated core update task, and search for the existence of a corresponding accelerated core file based on the accelerated core update task to obtain the search results.

[0058] In this embodiment, an acceleration core update task is received, and a search is performed based on the acceleration core update task to determine if a corresponding acceleration core file exists, thereby obtaining the search results. It is understood that the online reconstruction method for acceleration cores in AI computing disclosed in this application is applied to the online update and upgrade of AI computing acceleration cores, that is, during operation, the acceleration cores in the variable program area are replaced and upgraded according to requirements, such as... Figure 2 As shown, it mainly includes an application layer upgrade module, an acceleration core management module, an AI acceleration computing module, and a shared memory area. The application layer upgrade module exchanges data with the shared memory area via a data bus; the variable program area of ​​the AI ​​acceleration computing module reads files from the shared memory area via the data bus; the application layer upgrade module exchanges data with the acceleration core management module via register read / write; the acceleration core management module and the AI ​​acceleration computing module belong to the same address space and communicate using a custom protocol.

[0059] The application-layer upgrade module is primarily used to receive update command information, query the program index table in the shared storage area, provide query feedback, receive and store the acceleration core file, and issue commands. Specifically, it handles two scenarios: 1. If the query of the index table (i.e., the program index table) finds a corresponding acceleration core file, it reports the file's readiness and awaits further instructions. If a "continue loading" command is received, a loading command is issued to the acceleration core management module. 2. If the query of the index table finds no corresponding acceleration core file or that the file version has expired, it notifies the upper-layer application that a new acceleration core file needs to be issued. It receives the acceleration core file to be upgraded (i.e., the current acceleration core file), stores the file in the specified location in the index table, updates the corresponding index table information, and awaits further instructions. If a "continue loading" command is received, a loading command is issued to the acceleration core management module.

[0060] Step S12: If the search result does not meet the preset acceleration core loading conditions, a file sending notification is sent to the upper-layer application to receive the current acceleration core file sent by the upper-layer application.

[0061] In this embodiment, after retrieving the existence of a corresponding acceleration core file based on the acceleration core update task and obtaining the retrieval result, if the retrieval result does not meet the preset acceleration core loading conditions, a file sending notification is sent to the upper-layer application to receive the current acceleration core file sent by the upper-layer application. It can be understood that after receiving the current acceleration core file sent by the upper-layer application, it is determined whether there is an unused location in the program index table; if the unused location exists in the program index table, the current acceleration core file is stored in any of the unused locations and the information in the program index table is updated; if the unused location does not exist in the program index table, the program attributes of all historical acceleration core file information are retrieved; the information of any invalid location among all locations with invalid program attributes is updated to the information of the current acceleration core file, and the current acceleration core file is stored in the invalid location; if the program attributes of all historical acceleration core file information are valid, all historical acceleration core file information is sorted according to the usage frequency to obtain a sorting table; the current acceleration core file is used to cover the storage area of ​​the historical acceleration core file information with the lowest usage frequency in the sorting table.

[0062] Step S13: When an online loading instruction for the acceleration core is received, a preset acceleration core reconstruction operation is performed based on the current acceleration core file.

[0063] In this embodiment, if the search result does not meet the preset acceleration core loading conditions, a file sending notification is sent to the upper-layer application to receive the current acceleration core file sent by the upper-layer application. When an online acceleration core loading instruction is received, a preset acceleration core reconstruction operation is performed based on the current acceleration core file. Specifically, when an online acceleration core loading instruction is received, a start loading instruction is sent to the fixed program area of ​​the AI ​​acceleration computing region so that the fixed program area enters an upgrade waiting mode after receiving the start loading instruction; the current acceleration core program is obtained from the current acceleration core file and written to the variable program area of ​​the AI ​​acceleration computing region; when the current acceleration core program is written, a write completion notification is sent to the fixed program area so that the fixed program area reloads the current acceleration core program after receiving the write completion notification; the acceleration core loading execution result is obtained and the execution result is returned to the application layer upgrade area.

[0064] It should be noted that before obtaining the current acceleration core program from the current acceleration core file and writing the current acceleration core program into the variable program area of ​​the AI ​​acceleration computing region, it is determined whether an acceleration core file upgrade instruction has been received; if the acceleration core file upgrade instruction is received, the step of obtaining the current acceleration core program from the current acceleration core file and writing the current acceleration core program into the variable program area of ​​the AI ​​acceleration computing region is executed.

[0065] That is, when the application layer upgrade module receives instruction information from the upper layer application, the instruction information includes an online loading instruction for the acceleration core and an acceleration core file upgrade instruction. The acceleration core file upgrade instruction is an instruction to write the current acceleration core program into the variable program area of ​​the AI ​​acceleration computing region. The online loading instruction for the acceleration core is an instruction to perform a preset acceleration core reconstruction operation based on the latest acceleration core file. If the search result does not meet the preset acceleration core loading conditions, the module receives the current acceleration core file sent by the upper layer application and writes the current acceleration core program into the variable program area upon receiving the acceleration core file upgrade instruction. Upon receiving the online loading instruction for the acceleration core, it performs a preset acceleration core reconstruction operation based on the current acceleration core file. If the search result meets the preset acceleration core loading conditions, there is no acceleration core program to be written, meaning there is no need to execute the acceleration core file upgrade instruction. If a continue loading instruction is received, a loading command (i.e., an online loading instruction for the acceleration core) is sent to the acceleration core management module.

[0066] Understandably, the acceleration core management module is responsible for managing the scheduling and management tasks of the acceleration cores. This mainly includes: receiving loading instructions from the application layer upgrade module; issuing update start instructions to the fixed program area (the application layer upgrade module issues an online loading instruction to the acceleration core management module after receiving the acceleration core loading instruction from the upper-layer application); after receiving the online loading instruction, the acceleration core management module notifies the fixed program area that data is about to be loaded, and writes the acceleration core program into the variable program area of ​​the AI ​​acceleration computing module according to the parsed address; notifying the fixed program area that the acceleration core writing is complete and the acceleration core needs to be reloaded; after the acceleration core management module finishes loading the file, it notifies the fixed program area that the file loading is complete and feeds back the execution result to the application layer upgrade module. The AI ​​acceleration computing module is divided into a variable program area and a fixed program area. The fixed program area is burned into the device before leaving the factory. In addition to running the device's basic hardware initialization functions, it is also responsible for receiving loading instructions from the acceleration core management module. When it receives the update start instruction, it enters an upgrade waiting mode and no longer runs other loading computing functions. The variable program area contains acceleration cores split from the algorithm (i.e., the acceleration core file), which are continuously loaded and run during operation as the functionality changes.

[0067] This application enables online updates and upgrades of the variable program area acceleration core of the AI ​​acceleration computing module by using a shared storage area and refactoring and loading only for the acceleration core. This reduces the occupation of critical hardware resources, reduces the confirmation and verification process of data transmission, shortens the program upgrade and loading time, and improves the efficiency of accelerated computing.

[0068] As can be seen, this application provides an online acceleration core reconfiguration method, including: receiving an acceleration core update task, and searching for the existence of a corresponding acceleration core file based on the acceleration core update task to obtain a search result; if the search result does not meet the preset acceleration core loading conditions, sending a file sending notification to the upper-layer application to receive the current acceleration core file sent by the upper-layer application; when receiving an online acceleration core loading instruction, performing a preset acceleration core reconfiguration operation based on the current acceleration core file. Therefore, this application determines whether a new acceleration core file identical to the one in the update task exists; if not, it obtains a new current acceleration core file for acceleration core reconfiguration. During operation, the acceleration core is replaced and upgraded as needed, reducing the occupation of critical hardware resources, shortening program loading time, and improving the efficiency of AI accelerated computing.

[0069] See Figure 3 As shown, this embodiment of the invention discloses a method for accelerating online core reconfiguration. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution.

[0070] Step S21: Receive the acceleration core update task and obtain the acceleration core file information to be updated in the acceleration core update task.

[0071] Step S22: Search the program index table based on the information of the acceleration core file to be updated, so as to determine whether there is any historical acceleration core file information with the same file name as the information of the acceleration core file to be updated in the program index table.

[0072] In this embodiment, as Figure 4 As shown, after obtaining the information of the acceleration core file to be updated in the acceleration core update task, a search is performed in the program index table based on the information of the acceleration core file to be updated to determine whether there is any historical acceleration core file information with the same file name as the acceleration core file information to be updated in the program index table; the program index table is located in the shared storage area. It can be understood that before searching in the program index table based on the acceleration core file information to be updated, basic information of the historical acceleration core file information is obtained and stored in the program index table; the basic information includes the file name, file version number, program attributes, usage frequency, and storage location corresponding to the historical acceleration core file information.

[0073] The shared memory area is a data storage region designated by the system. It can be a memory address or a region in external flash memory. The shared memory area contains a program index table and an acceleration core storage area. The index table mainly contains information such as file name, file version number, program attributes (available, invalid, etc.), usage frequency, and storage location.

[0074] Step S23: If the program index table does not contain any historical acceleration core file information with the same file name as the acceleration core file information to be updated, then the search result is determined to be that the preset acceleration core loading condition is not met.

[0075] In this embodiment, after determining whether there is a historical accelerated core file with the same name as the file information of the accelerated core file to be updated in the program index table, if there is no such historical accelerated core file with the same name as the file information of the accelerated core file to be updated in the program index table, then the search result is determined to be that the preset accelerated core loading condition is not met. It can be understood that if a corresponding accelerated core file is found after querying the index table, and then the information that the file is ready is reported upwards, then the system waits for the next instruction. If a continue loading instruction is received, a loading command is issued to the accelerated core management module.

[0076] Step S24: If the program index table contains historical acceleration core file information with the same file name as the acceleration core file information to be updated, then perform a file availability check and determine whether the preset acceleration core loading conditions are met based on the check result.

[0077] In this embodiment, after determining whether there is historical acceleration core file information with the same file name as the acceleration core file information to be updated in the program index table, if there is such historical acceleration core file information with the same file name as the acceleration core file information to be updated in the program index table, a file availability check is performed, and the preset acceleration core loading condition is determined based on the check result. Specifically, the attribute information corresponding to the historical acceleration core file information is obtained, and it is determined whether the attribute information is available; if the attribute information is unavailable, the historical acceleration core file information is determined to be unavailable and the preset acceleration core loading condition is not met; if the attribute information is available, the historical version number corresponding to the historical acceleration core file information is retrieved; it is determined whether the historical version number is consistent with the version number to be updated corresponding to the acceleration core file information to be updated; if the historical version number is consistent with the version number to be updated, the historical acceleration core file information is determined to be available and the preset acceleration core loading condition is met; if the historical version number is inconsistent with the version number to be updated, the historical acceleration core file information is determined to be unavailable and the preset acceleration core loading condition is not met.

[0078] Understandably, the application-layer upgrade module receives the acceleration core file to be upgraded and verifies its validity before querying the shared storage index table. If a filename corresponding to the file is already found in the index table, the module retrieves the attributes corresponding to the filename. If an attribute is unavailable, the acceleration core file is deemed invalid. If an attribute is available, the module continues to retrieve the file version number. If the version number matches, the module returns information to the upper-layer application, informing it that the file exists and is available. If no filename is found, the version number is inconsistent, or the attributes are invalid, the upper-layer application is informed that the acceleration core needs to be updated to obtain the current acceleration core file. After obtaining the current acceleration core file, if there is a free space in the index table, the program file is placed at the corresponding address and the index table information is updated. If all spaces are occupied, the module retrieves the program attributes, updates the index table for invalid attributes with the new program file information, and updates the storage area corresponding to the index table where the program is stored. If all spaces are occupied and all attributes are valid, the acceleration cores are sorted by usage frequency, and the storage area of ​​the least frequently used acceleration core is overwritten.

[0079] Step S25: If the search result does not meet the preset acceleration core loading conditions, a file sending notification is sent to the upper-layer application to receive the current acceleration core file sent by the upper-layer application.

[0080] Step S26: When an online loading instruction for the acceleration core is received, a preset acceleration core reconstruction operation is performed based on the current acceleration core file.

[0081] Understandably, as mentioned above Figure 4 As shown, after obtaining the current acceleration core file, when receiving the online loading instruction for the acceleration core, a preset acceleration core reconstruction operation is performed based on the current acceleration core file. That is, the acceleration core management module loads the program into the variable program area, and the loading is completed and the result is fed back to the application layer upgrade module.

[0082] For details regarding steps S21, S25, and S26, please refer to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.

[0083] As can be seen, this embodiment of the application receives an acceleration core update task and obtains the acceleration core file information to be updated in the acceleration core update task; it searches the program index table based on the acceleration core file information to determine whether there is any historical acceleration core file information with the same file name as the acceleration core file information to be updated in the program index table; if there is no historical acceleration core file information with the same file name as the acceleration core file information to be updated in the program index table, it is determined that the search result does not meet the preset acceleration core loading condition; if there is historical acceleration core file information with the same file name as the acceleration core file information to be updated in the program index table, a file availability check is performed, and the preset acceleration core loading condition is determined based on the check result; if the search result does not meet the preset acceleration core loading condition, a file sending notification is sent to the upper-layer application to receive the current acceleration core file sent by the upper-layer application; when an acceleration core online loading instruction is received, a preset acceleration core reconstruction operation is performed based on the current acceleration core file to reduce the occupation of key hardware resources, shorten the program loading time, and improve the efficiency of AI accelerated computing.

[0084] See Figure 5 As shown in the figure, this application also discloses a device for accelerating online core reconfiguration, including:

[0085] Task Receive 11 is used to receive accelerated core update tasks;

[0086] The retrieval module 12 is used to search for the existence of a corresponding acceleration core file based on the acceleration core update task, so as to obtain the retrieval results;

[0087] The file receiving module 13 is used to send a file sending notification to the upper-layer application if the search result does not meet the preset acceleration core loading conditions, so as to receive the current acceleration core file sent by the upper-layer application.

[0088] The acceleration core reconstruction module 14 is used to perform a preset acceleration core reconstruction operation based on the current acceleration core file when an online loading instruction for the acceleration core is received.

[0089] As can be seen, this application includes: receiving an acceleration core update task, and searching for the existence of a corresponding acceleration core file based on the acceleration core update task to obtain a search result; if the search result does not meet the preset acceleration core loading conditions, sending a file sending notification to the upper-layer application to receive the current acceleration core file sent by the upper-layer application; when receiving an online acceleration core loading instruction, performing a preset acceleration core reconstruction operation based on the current acceleration core file. Therefore, this application determines whether a new acceleration core file identical to the one in the update task exists; if not, it obtains a new current acceleration core file for acceleration core reconstruction. During operation, the acceleration core is replaced and upgraded as needed, reducing the occupation of critical hardware resources, shortening program loading time, and improving the efficiency of AI accelerated computing.

[0090] In some specific embodiments, the task receiving 11 specifically includes:

[0091] The task receiving unit is used to receive accelerated core update tasks.

[0092] In some specific embodiments, the retrieval module 12 specifically includes:

[0093] The unit for obtaining information on acceleration core files to be updated is used to obtain information on acceleration core files to be updated in the acceleration core update task.

[0094] A basic information acquisition unit is used to acquire basic information about the historical accelerated core file information.

[0095] A basic information storage unit is used to store the basic information in the program index table; the basic information includes the file name, file version number, program attributes, usage frequency, and storage location corresponding to the historical accelerated core file information;

[0096] The retrieval unit is used to search the program index table based on the information of the acceleration core file to be updated, so as to determine whether there is historical acceleration core file information with the same file name as the information of the acceleration core file to be updated in the program index table;

[0097] The first determination unit is used to determine that the search result does not meet the preset acceleration core loading condition if there is no historical acceleration core file information with the same file name as the acceleration core file information to be updated in the program index table.

[0098] The attribute information acquisition unit is used to acquire the attribute information corresponding to the historical acceleration core file information if the program index table contains historical acceleration core file information with the same file name as the acceleration core file information to be updated.

[0099] An attribute information availability determination unit is used to determine whether the attribute information is available.

[0100] The second determination unit is used to determine that the historical acceleration core file information is unavailable and that the preset acceleration core loading condition is not met if the attribute information is unavailable.

[0101] The historical version number retrieval unit is used to retrieve the historical version number corresponding to the historical accelerated core file information if the attribute information is available.

[0102] The version number consistency judgment unit is used to determine whether the historical version number is consistent with the version number to be updated corresponding to the information of the acceleration core file to be updated;

[0103] The third determination unit is used to determine that the historical acceleration core file information is available and that the preset acceleration core loading conditions are met if the historical version number is consistent with the version number to be updated.

[0104] The fourth determination unit is used to determine that the historical acceleration core file information is unavailable and that the preset acceleration core loading conditions are not met if the historical version number is inconsistent with the version number to be updated.

[0105] In some specific embodiments, the file receiving module 13 specifically includes:

[0106] The current acceleration core file receiving unit is used to send a file sending notification to the upper-layer application if the search result does not meet the preset acceleration core loading conditions, so as to receive the current acceleration core file sent by the upper-layer application.

[0107] A program index table determination unit is used to determine whether there are unused positions in the program index table;

[0108] The first current acceleration core file storage unit is used to store the current acceleration core file in any of the unused locations and update the information in the program index table if the program index table contains the unused location.

[0109] The program attribute retrieval unit is used to retrieve the program attributes of all the historical accelerated core file information if the unused position does not exist in the program index table.

[0110] The information update unit is used to update the information of any failure location among all locations where the program attribute is failure to the information of the current acceleration kernel file;

[0111] The second current accelerated kernel file storage unit is used to store the current accelerated kernel file at the failed location;

[0112] A sorting unit is used to sort all the historical accelerated core file information according to the frequency of use if all the program attributes of all the historical accelerated core file information are valid, so as to obtain a sorting table.

[0113] The current accelerated core file overwrite unit is used to overwrite the storage area of ​​the historical accelerated core file information with the lowest usage frequency in the sorting table using the current accelerated core file.

[0114] In some specific embodiments, the accelerated core reconstruction module 14 specifically includes:

[0115] The start loading instruction sending unit is used to send a start loading instruction to the fixed program area of ​​the AI ​​acceleration computing region when it receives the online loading instruction of the acceleration core, so that the fixed program area enters the upgrade waiting mode after receiving the start loading instruction;

[0116] The accelerated kernel file upgrade instruction receiving and judgment unit is used to determine whether an accelerated kernel file upgrade instruction has been received;

[0117] The current acceleration core program acquisition unit is used to acquire the current acceleration core program from the current acceleration core file if the acceleration core file upgrade instruction is received;

[0118] The current acceleration core program writing unit is used to write the current acceleration core program into the variable program area of ​​the AI ​​acceleration computing region;

[0119] The current acceleration core program reloading unit is used to send a write completion notification to the fixed program area when the current acceleration core program is written, so that the fixed program area can reload the current acceleration core program after receiving the write completion notification.

[0120] The execution result return unit is used to obtain the execution result of the accelerated core loading and return the execution result to the application layer upgrade area.

[0121] Furthermore, embodiments of this application also provide an electronic device. Figure 6 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.

[0122] Figure 6This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the accelerated core online reconfiguration method disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0123] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0124] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0125] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the accelerated kernel online reconfiguration method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program capable of performing other specific tasks.

[0126] Furthermore, this application also discloses a storage medium storing a computer program. When the computer program is loaded and executed by a processor, it implements the steps of the accelerated core online reconfiguration method disclosed in any of the foregoing embodiments.

[0127] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0128] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0129] The above provides a detailed description of the accelerated online reconfiguration method, apparatus, device, and storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for accelerating online kernel reconfiguration, characterized in that, include: Receive the accelerated core update task, and search for the existence of a corresponding accelerated core file based on the accelerated core update task to obtain the search results; If the search result does not meet the preset acceleration core loading conditions, a file sending notification is sent to the upper-layer application to receive the current acceleration core file sent by the upper-layer application; When an online loading instruction for the acceleration core is received, a preset acceleration core reconstruction operation is performed based on the current acceleration core file; The step of searching for the existence of a corresponding acceleration core file based on the acceleration core update task to obtain search results includes: Obtain the information of the acceleration core file to be updated in the acceleration core update task; The program index table is searched based on the information of the acceleration core file to be updated in order to determine whether there is any historical acceleration core file information with the same file name as the information of the acceleration core file to be updated in the program index table. If the program index table does not contain any historical acceleration core file information with the same file name as the acceleration core file information to be updated, then the search result is determined to be that the preset acceleration core loading condition is not met. If the program index table contains historical acceleration core file information with the same file name as the acceleration core file information to be updated, then a file availability check is performed, and the preset acceleration core loading conditions are determined based on the check results. The executable file availability check, and the determination of whether the preset acceleration core loading conditions are met based on the check results, include: Obtain the attribute information corresponding to the historical accelerated core file information, and determine whether the attribute information is available; If the attribute information is unavailable, then the historical acceleration core file information is determined to be unavailable and the preset acceleration core loading condition is not met; If the attribute information is available, then retrieve the historical version number corresponding to the historical accelerated core file information; Determine whether the historical version number matches the version number to be updated corresponding to the information of the acceleration core file to be updated; If the historical version number is consistent with the version number to be updated, then the historical acceleration core file information is determined to be available and the preset acceleration core loading conditions are met. If the historical version number is inconsistent with the version number to be updated, the historical acceleration core file information is determined to be unavailable and the preset acceleration core loading conditions are not met. The step of performing a preset acceleration core reconstruction operation based on the current acceleration core file when receiving an online loading instruction for the acceleration core includes: When an online loading instruction for the acceleration core is received, a start loading instruction is sent to the fixed program area of ​​the AI ​​acceleration computing region, so that the fixed program area enters the upgrade waiting mode after receiving the start loading instruction and suspends the execution of other computing functions except for upgrade waiting. Obtain the current acceleration core program from the current acceleration core file, and write the acceleration core program into the variable program area of ​​the AI ​​acceleration computing region according to the parsed address; When the current acceleration core program is written, a write completion notification is sent to the fixed program area so that the fixed program area can reload the current acceleration core program after receiving the write completion notification. Obtain the accelerated core loading execution result and return the execution result to the application layer upgrade area; The accelerated online reconfiguration method for the core further includes: Obtain basic information about the historical accelerated core files and store it in the program index table; the basic information includes the file name, file version number, program attributes, usage frequency, and storage location corresponding to the historical accelerated core files. The accelerated online reconfiguration method for the core further includes: Determine if there are any unused positions in the program index table; If an unused location exists in the program index table, the current accelerated kernel file is stored in any of the unused locations and the information in the program index table is updated. If the unused location is not found in the program index table, retrieve the program attributes of all historical accelerated kernel file information; Update the information of any failed location among all locations where the program attribute is failed to the information of the current accelerated core file, and store the current accelerated core file at the failed location; If all the program attributes of the historical accelerated core file information are valid, then all the historical accelerated core file information are sorted according to the frequency of use to obtain a sorting table; The current accelerated core file is used to overwrite the storage area of ​​the historical accelerated core file information with the lowest usage frequency in the sorting table.

2. The accelerated online core reconfiguration method according to claim 1, characterized in that, Before obtaining the current acceleration core program from the current acceleration core file and writing the current acceleration core program into the variable program area of ​​the AI ​​acceleration computing region, the method further includes: Determine if an accelerated kernel file upgrade instruction has been received; If the acceleration core file upgrade instruction is received, the steps of obtaining the current acceleration core program from the current acceleration core file and writing the current acceleration core program into the variable program area of ​​the AI ​​acceleration computing region are executed.

3. A device for accelerating online nuclear reconfiguration, characterized in that, include: Task reception is used to receive accelerated core update tasks; The retrieval module is used to search for the existence of a corresponding acceleration core file based on the acceleration core update task, so as to obtain the retrieval results; The file receiving module is used to send a file sending notification to the upper-layer application if the search result does not meet the preset acceleration core loading conditions, so as to receive the current acceleration core file sent by the upper-layer application. The acceleration core refactoring module is used to perform a preset acceleration core refactoring operation based on the current acceleration core file when an online loading instruction for the acceleration core is received. The online reconfiguration device for the acceleration core is used to acquire information about the acceleration core files to be updated in the acceleration core update task; to search the program index table based on the information about the acceleration core files to be updated, so as to determine whether there is any historical acceleration core file information with the same file name as the information about the acceleration core files to be updated in the program index table; if there is no historical acceleration core file information with the same file name as the information about the acceleration core files to be updated in the program index table, it is determined that the search result does not meet the preset acceleration core loading conditions; if there is historical acceleration core file information with the same file name as the information about the acceleration core files to be updated in the program index table, a file availability check is performed, and the preset acceleration core loading conditions are determined based on the check result. The online reconfiguration device for the acceleration core is configured to acquire attribute information corresponding to the historical acceleration core file information and determine whether the attribute information is available; if the attribute information is unavailable, the historical acceleration core file information is determined to be unavailable and the preset acceleration core loading condition is not met; if the attribute information is available, the historical version number corresponding to the historical acceleration core file information is retrieved; it is determined whether the historical version number is consistent with the version number to be updated corresponding to the acceleration core file information to be updated; if the historical version number is consistent with the version number to be updated, the historical acceleration core file information is determined to be available and the preset acceleration core loading condition is met; if the historical version number is inconsistent with the version number to be updated, the historical acceleration core file information is determined to be unavailable and the preset acceleration core loading condition is not met. The online reconfiguration device for the acceleration core is configured to, upon receiving an online loading instruction for the acceleration core, send a start loading instruction to the fixed program area of ​​the AI ​​acceleration computing region, so that the fixed program area enters an upgrade waiting mode after receiving the start loading instruction and suspends the execution of other computing functions except for upgrade waiting; obtain the current acceleration core program from the current acceleration core file, and write the acceleration core program into the variable program area of ​​the AI ​​acceleration computing region according to the parsed address; send a write completion notification to the fixed program area when the current acceleration core program is written, so that the fixed program area reloads the current acceleration core program after receiving the write completion notification; obtain the acceleration core loading execution result and return the execution result to the application layer upgrade area; The online refactoring device for the accelerated core is used to acquire basic information of the historical accelerated core file information and store the basic information in the program index table; the basic information includes the file name, file version number, program attributes, usage frequency and storage location corresponding to the historical accelerated core file information; The online reconfiguration device for the accelerated core is used to determine whether there are unused locations in the program index table; if there are unused locations in the program index table, the current accelerated core file is stored in any of the unused locations and the information in the program index table is updated; if there are no unused locations in the program index table, the program attributes of all historical accelerated core file information are retrieved; the information of any failed location among all locations with failed program attributes is updated to the information of the current accelerated core file, and the current accelerated core file is stored in the failed location; if the program attributes of all historical accelerated core file information are valid, all historical accelerated core file information is sorted according to the usage frequency to obtain a sorting table; the current accelerated core file is used to cover the storage area of ​​the historical accelerated core file information with the lowest usage frequency in the sorting table.

4. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the accelerated online core reconfiguration method as described in any one of claims 1 to 2.

5. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein, when the computer programs are executed by a processor, they implement the accelerated online core reconfiguration method as described in any one of claims 1 to 2.

Citation Information

Patent Citations

  • CN107562437A

  • CN115390880A