Method and system for asynchronous deep learning reasoning under heterogeneous many-core architecture

By defining asynchronous acquisition interfaces and inference result interfaces in the heterogeneous many-core architecture, data copies are automatically managed, which solves the problem of user manual management complexity and performance loss in deep learning inference, and achieves efficient asynchronous deep learning inference and data cutting. points, improving equipment utilization and performance.

CN118709778APending Publication Date: 2024-09-27TAICHU (HANGZHOU) INTEGRATED CIRCUIT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410776707.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-17
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

In the existing technology, deep learning inference requires users to manually manage the copy and asynchronous operations of data between the Host and Device, resulting in complexity and performance loss.

Method used

Provides a method for asynchronous deep learning inference under a heterogeneous many-core architecture. By defining an asynchronous acquisition interface and an inference result interface, the data is automatically copied between the Host and the Device, and the handle results are used to obtain inference results, and Efficiently split data on many-core architecture.

Benefits of technology

It achieves efficient data copying and inference calculation from the Host to the Device without the user being aware of it, improving the throughput and utilization of heterogeneous devices without any loss in performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118709778A
    Figure CN118709778A
Patent Text Reader

Abstract

The invention relates to an asynchronous deep learning reasoning method and device under a heterogeneous many-core architecture, computer equipment, a storage medium and a computer program product. The method comprises the following steps: defining an asynchronous acquisition interface and a reasoning result interface; calling an asynchronous acquisition interface to send the data of the host end to a preset reasoning framework and acquiring a corresponding handle result; and calling a reasoning result interface based on the handle result to obtain a reasoning result corresponding to the reasoning framework. By adopting the method, a set of user interfaces is provided, so that a user can conveniently carry out asynchronous deep learning reasoning on heterogeneous many-cores, an implementation mode is provided, data can be efficiently copied to a memory of a Device end from a memory of a Host end, calculation is carried out on heterogeneous equipment, and reasoning calculation is carried out on the equipment; the asynchronous operation of copying the result back to the memory of the Host end is carried out, and meanwhile, the data can be segmented to each core of the many-core architecture under the conditions that the user is non-inductive and the performance is lossless.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of deep learning reasoning, and in particular to a method, apparatus, device and storage medium for performing asynchronous deep learning reasoning in a heterogeneous many-core architecture. Background Art

[0002] Deep learning reasoning is an important part of deep learning technology. It refers to the process in which after the user completes model training and gives input data, the input data is calculated based on the model structure and trained parameters, and the results are returned to the user.

[0003] When using heterogeneous devices such as GPUs for inference, data needs to be copied from the host's memory to the device's memory, the device performs inference calculations, and then copies the results back to the host's memory. In order to increase the throughput and utilization of the device, these steps can be performed asynchronously. Specifically, while the device is calculating the first batch of data, the second batch of data can be copied from the host to the device at the same time. Similarly, when the first batch of data is calculated and copied back to the host, the second batch of data can also be calculated synchronously.

[0004] In the prior art, the inference framework provides a method and interface for performing asynchronous inference calculations on data on a device, and users need to complete the copying of data between the host and the device and the asynchronous management of these steps by themselves. Summary of the invention

[0005] Based on this, it is necessary to provide a method, device, computer equipment, computer-readable storage medium and computer program product for performing asynchronous deep learning reasoning in a heterogeneous multi-core architecture that automatically completes data copying between the Host and Device ends in response to the above technical problems.

[0006] In a first aspect, the present application provides a method for performing asynchronous deep learning reasoning in a heterogeneous multi-core architecture. The method includes:

[0007] Define asynchronous acquisition interface and inference result interface;

[0008] Call the asynchronous acquisition interface to send the host data to the preset inference framework and obtain the corresponding handle result;

[0009] Based on the handle result, the inference result interface is called to obtain the inference result corresponding to the inference framework.

[0010] In one of the embodiments, before defining the asynchronous acquisition interface, the method further includes:

[0011] The reasoning framework calculates and sets the offset of the pointer in the temporary input buffer;

[0012] Copy the host data pointed to by the pointer to the device;

[0013] After the calculation is completed on the device side, the offset of the temporary output buffer is output through the calculation pointer;

[0014] After the device completes the calculation, the data is copied to the corresponding position of the temporary output buffer.

[0015] In one of the embodiments, counting the number of cores of the many-core chip;

[0016] The inference framework opens temporary input buffers and temporary output buffers equal to the number of cores, and the temporary input buffers and temporary output buffers are opened on the memory of the many cores;

[0017] Set corresponding identity information based on the user's reasoning request;

[0018] The temporary input buffer and the temporary output buffer record the identity information corresponding to the input and output data.

[0019] In one embodiment, defining an asynchronous acquisition interface includes:

[0020] Compare the identity information of the temporary input buffer input corresponding to the many-core core with the identity information of the output;

[0021] If the identity information of the input of the temporary input buffer corresponding to the many-core core is the same as the identity information of the output, the data on the host side is copied to the device side.

[0022] In one embodiment, defining the inference result interface includes:

[0023] Compare the identity information of the temporary output buffer input corresponding to the many-core core with the identity information of the output;

[0024] If the identity information of the temporary output buffer input corresponding to the many-core core is the same as the identity information of the output, the data on the device side is copied to the host side.

[0025] In one of the embodiments, determining whether the identity information of the input data of the temporary input buffer is greater than the identity information of the output data;

[0026] If the identity information of the input data in the temporary input buffer is greater than the identity information of the output data, the input data is copied from the temporary input buffer and stored in the temporary output buffer;

[0027] Update the identity information corresponding to the data output by the temporary input cache;

[0028] The device reads the data in the temporary output buffer to perform inference calculation and output the inference result;

[0029] Update the identity information corresponding to the data that has completed the calculation;

[0030] If the identity information of the output data of the temporary output cache is the same as the identity information of the input data, the inference result is copied to the temporary output cache.

[0031] In a second aspect, the present application also provides an asynchronous deep learning reasoning device under a heterogeneous multi-core architecture. The device includes:

[0032] User interface definition module, used to define asynchronous acquisition interface and reasoning result interface;

[0033] The acquisition interface calculation module is used to call the asynchronous acquisition interface to send the data on the host side to the preset reasoning framework and obtain the corresponding handle result;

[0034] The inference result acquisition module is used to call the inference result interface based on the handle result to obtain the inference result corresponding to the inference framework.

[0035] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0036] Define asynchronous acquisition interface and inference result interface;

[0037] Call the asynchronous acquisition interface to send the host data to the preset inference framework and obtain the corresponding handle result;

[0038] Based on the handle result, the inference result interface is called to obtain the inference result corresponding to the inference framework.

[0039] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0040] Define asynchronous acquisition interface and inference result interface;

[0041] Call the asynchronous acquisition interface to send the host data to the preset inference framework and obtain the corresponding handle result;

[0042] Based on the handle result, the inference result interface is called to obtain the inference result corresponding to the inference framework.

[0043] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0044] Define asynchronous acquisition interface and inference result interface;

[0045] Call the asynchronous acquisition interface to send the host data to the preset inference framework and obtain the corresponding handle result;

[0046] Based on the handle result, the inference result interface is called to obtain the inference result corresponding to the inference framework.

[0047] The above-mentioned method, apparatus, computer equipment, storage medium and computer program product for performing asynchronous deep learning reasoning under the heterogeneous many-core architecture define an asynchronous acquisition interface and an inference result interface; call the asynchronous acquisition interface to send the data on the host side to the preset inference framework and obtain the corresponding handle result; based on the handle result, call the inference result interface to obtain the inference result corresponding to the inference framework. The present application adopts the above-mentioned method, and by proposing a set of user interfaces, it allows users to conveniently perform asynchronous deep learning reasoning on heterogeneous many-cores, and proposes an implementation method that can efficiently copy data from the host side's memory to the device side's memory, perform calculations on heterogeneous devices, perform inference calculations on the devices, and then copy the results back to the host side's memory asynchronously. At the same time, the data can be segmented to each core of the many-core architecture without the user noticing and without performance loss. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 It is a flowchart of a method for performing asynchronous deep learning reasoning under a heterogeneous many-core architecture in one embodiment;

[0049] Figure 2 A schematic diagram of data segmentation using an asynchronous deep learning reasoning method under a heterogeneous many-core architecture in one embodiment;

[0050] Figure 3 A schematic diagram of the internal framework of an asynchronous deep learning reasoning method under a heterogeneous many-core architecture in one embodiment;

[0051] Figure 4 A comparison chart of whether to use asynchronous interface performance in an asynchronous deep learning reasoning method under a heterogeneous many-core architecture in an embodiment;

[0052] Figure 5 It is a structural block diagram of an asynchronous deep learning reasoning device under a heterogeneous many-core architecture in one embodiment; DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0054] The embodiment of the present application provides an asynchronous deep learning reasoning method under a heterogeneous multi-core architecture. In the prior art, there are many mature technologies for deep learning on CPUs, such as using ONNX Runtime for reasoning. ONNX Runtime is a mature CPU reasoning framework with a relatively simple user interface and is user-friendly. However, the hardware characteristics of the CPU determine that its reasoning performance is poor compared to GPUs, GPGPUs, and ASIC chips specifically used for deep learning reasoning.

[0055] When using heterogeneous devices such as GPUs for inference, data needs to be copied from the memory of the host (CPU) to the memory of the device (GPU and other devices) (hereinafter referred to as H2D), the device performs inference calculations, and then copies the results back to the memory of the host (hereinafter referred to as D2H). In order to increase the throughput and utilization of the device, these steps can be performed asynchronously. Specifically, when the device is calculating the first batch of data, the second batch of data can be copied from the host to the device at the same time. Similarly, when the first batch of data is calculated and copied back to the host, the second batch of data can also be calculated synchronously.

[0056] The main way to implement asynchronous interfaces on devices in the industry is that the inference framework provides methods and interfaces for asynchronous inference calculations on data on the device, and users need to complete the copying of data between the host and the device and the asynchronous management of these steps. Specifically, the common management methods are: the management method based on stream interfaces represented by TensorRT, and the management method based on user thread synchronization represented by MagicMind.

[0057] In one embodiment, Figure 1 As shown, in this embodiment, the method includes the following steps:

[0058] Step 202: define an asynchronous acquisition interface and an inference result interface.

[0059] Among them, / / define the asynchronous reasoning interface, receive the input tensor list, and return the Future object. The specific code can be shown as:

[0060] Future RunAsync(const std::vector <tensor>&input_tensor);

[0061] / / Define the interface for obtaining results and return a list of tensors. The specific code can be shown as follows:

[0062] std::vector <tensor>get();

[0063] Step 204, calling the asynchronous acquisition interface to send the data on the host side to the preset reasoning framework and obtain the corresponding handle result.

[0064] The user only needs to call the run_async interface to pass the data on the Host side to the inference framework and obtain a result as a handle.

[0065] Step 206: Call the inference result interface based on the handle result to obtain the inference result corresponding to the inference framework.

[0066] The inference result is obtained by calling get_result through the handle. By flexibly controlling the calling order of run_async and get_result interfaces, asynchronous inference can be performed and the asynchronous parallelism can be controlled.

[0067] In the above-mentioned asynchronous deep learning reasoning method under the heterogeneous many-core architecture, a set of user interfaces is proposed, which allows users to conveniently perform asynchronous deep learning reasoning on heterogeneous many-cores, and an implementation method is proposed, which can efficiently realize the asynchronous copying of data from the host memory to the device memory, perform calculations on the heterogeneous devices, and the devices perform reasoning calculations, and then copy the results back to the host memory. At the same time, the data can be split onto each core of the many-core architecture without the user noticing and without performance loss.

[0068] In one embodiment, Figure 2 As shown in the figure, before defining the asynchronous acquisition interface and the inference result interface, the data needs to be segmented to adapt to the many-core architecture, including:

[0069] The inference framework calculates and sets the offset of the pointer in the temporary input buffer; copies the data on the host side pointed by the pointer to the device side; after completing the calculation on the device side, the offset of the pointer in the output temporary output buffer is calculated; and the data after the calculation on the device side is copied to the corresponding position of the temporary output buffer.

[0070] Specifically, in terms of data segmentation, the framework calculates and sets the offset of the pointer on the input buffer, and copies the host data pointed to by the pointer to the device. After the calculation on the device is completed, the framework calculates the offset of the pointer on the output buffer and copies the data to the corresponding position of the output buffer. In the whole process, no additional data copying is added due to the existence of multiple cores.

[0071] In one embodiment, Figure 3 As shown, the data structure of the reasoning framework needs to be set, including:

[0072] The number of cores of the many-core chip is counted; the inference framework opens a temporary input buffer and a temporary output buffer equal to the number of cores, and the temporary input buffer and the temporary output buffer are opened in the memory of the many-core; the corresponding identity information is set based on the user's inference request; the temporary input buffer and the temporary output buffer record the identity information corresponding to the input and output data.

[0073] Specifically, for a multi-core chip with N cores, the inference framework opens 2N buffers, N buffers are used to store input data, and N buffers are used to store output data. The buffers are located in the device memory on the corresponding multi-cores. Each batch of inference requests from the user corresponds to a unique request_ID. Each buffer records the last requst_ID put in and the last requst_ID taken out.

[0074] In one embodiment, defining an asynchronous acquisition interface includes:

[0075] The identity information of the temporary input buffer input corresponding to the multi-core core is compared with the identity information of the output; if the identity information of the temporary input buffer input corresponding to the multi-core core is the same as the identity information of the output, the data on the host side is copied to the device side.

[0076] Specifically, the user thread calls the run_async interface. After completing data segmentation, the user thread performs the following operations on the N cores in sequence:

[0077] Determine whether the request_ID last taken out of the input buffer corresponding to the core is equal to the request_ID last put in; if not, it means that the working thread has not taken the last input, and determine whether the request_ID last taken out of the input buffer corresponding to the core is equal to the request_ID last put in. If satisfied, copy the data from the Host to the Device.

[0078] In one embodiment, defining an inference result interface includes:

[0079] The identity information of the temporary output buffer input corresponding to the many-core core is compared with the identity information of the output; if the identity information of the temporary output buffer input corresponding to the many-core core is the same as the identity information of the output, the data on the device side is copied to the host side.

[0080] Specifically, the user calls the get_result interface, and the user thread performs the following operations on the N many-cores in turn:

[0081] Determine whether the request_ID last placed into the output buffer corresponding to the core is greater than the request_ID last taken out;

[0082] If it is not satisfied, it means that the working thread has not yet output a new result, and it needs to wait until it is satisfied, and then return to determine whether the request_ID last put into the output buffer corresponding to the core is greater than the request_ID last taken out. If it is satisfied, enter to copy the data from the Device end to the Host end.

[0083] In one embodiment, a specific work thread workflow is also included:

[0084] Determine whether the identity information of the input data of the temporary input buffer is greater than the identity information of the output data; if the identity information of the input data of the temporary input buffer is greater than the identity information of the output data, copy the input data from the temporary input buffer and store it in the temporary output buffer; update the identity information corresponding to the data output by the temporary input buffer; the device reads the data in the temporary output buffer for inference calculation and outputs the inference result; update the identity information corresponding to the data after the calculation; if the identity information of the output data of the temporary output buffer is the same as the identity information of the input data, copy the inference result to the temporary output buffer.

[0085] Specifically, the worker threads are started at the time of initialization, and each worker thread corresponds to one multi-core. The worker thread records the request_id of the last time it completed the calculation (starting with -1), and continuously loops through the following process

[0086] Determine whether the request_ID last placed in the corresponding input buffer is greater than the request_ID of the last calculation completed. If not, it means that the user has no new input. Determine whether the request_ID last placed in the corresponding input buffer is greater than the request_ID of the last calculation completed. If so, copy the data from the input buffer; update the last request_ID taken from the buffer and perform reasoning calculation. Update the requst_ID of the last calculation completed. Check whether the last request_ID taken from the output buffer is equal to the last request_ID passed in. If not, it means that the last result has not been taken. Check whether the last request_ID taken from the output buffer is equal to the last request_ID passed in. If so, copy the output result into the output buffer.

[0087] This application adopts the above method, and by proposing a set of user interfaces, it allows users to conveniently perform asynchronous deep learning reasoning on heterogeneous many-cores, and proposes an implementation method that can efficiently copy data from the memory of the host to the memory of the device, perform calculations on the heterogeneous devices, and the devices perform reasoning calculations, and then copy the results back to the memory of the host asynchronously. At the same time, the data can be split onto each core of the many-core architecture without the user noticing and without performance loss.

[0088] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0089] Based on the same inventive concept, the embodiment of the present application also provides a device for performing asynchronous deep learning reasoning under a heterogeneous multi-core architecture for implementing the asynchronous deep learning reasoning method under the heterogeneous multi-core architecture involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of the device for performing asynchronous deep learning reasoning under one or more heterogeneous multi-core architectures provided below can be referred to the limitations of the asynchronous deep learning reasoning method under the heterogeneous multi-core architecture above, and will not be repeated here.

[0090] In one embodiment, Figure 5 As shown, an asynchronous deep learning reasoning device under a heterogeneous multi-core architecture is provided, including: a user interface definition module, an acquisition interface calculation module, an inference result acquisition module, a data structure construction module, a data segmentation module and a work thread process module, wherein:

[0091] In one embodiment, the data segmentation module is also used in the inference framework to calculate and set the offset of the pointer in the temporary input buffer; copy the data on the host side pointed to by the pointer to the device side; after completing the calculation on the device side, calculate the offset of the pointer in the output temporary output buffer; copy the data after the calculation on the device side is completed to the corresponding position of the temporary output buffer.

[0092] In one embodiment, the data structure construction module is also used to count the number of cores of the many-core chip; the inference framework opens up temporary input buffers and temporary output buffers equal to the number of cores, and the temporary input buffers and temporary output buffers are opened in the memory of the many-cores; the corresponding identity information is set based on the user's inference request; the temporary input buffer and temporary output buffer record the identity information corresponding to the input and output data.

[0093] In one embodiment, the user interface definition module is also used to compare the identity information of the temporary input cache input corresponding to the multi-core core with the identity information of the output; if the identity information of the temporary input cache input corresponding to the multi-core core is the same as the identity information of the output, the data on the host side is copied to the device side.

[0094] In one embodiment, the user interface definition module is also used to compare the identity information of the temporary output cache input corresponding to the multi-core core with the identity information of the output; if the identity information of the temporary output cache input corresponding to the multi-core core is the same as the identity information of the output, the data on the device side is copied to the host side.

[0095] In one embodiment, the working thread process module is also used to determine whether the identity information of the input data of the temporary input cache is greater than the identity information of the output data; if the identity information of the input data of the temporary input cache is greater than the identity information of the output data, the input data is copied from the temporary input buffer and stored in the temporary output cache; the identity information corresponding to the data output by the temporary input cache is updated; the device side reads the data in the temporary output cache for inference calculation and outputs the inference result; the identity information corresponding to the data whose calculation is completed is updated; if the identity information of the output data of the temporary output cache is the same as the identity information of the input data, the inference result is copied to the temporary output cache.

[0096] Each module in the above-mentioned asynchronous deep learning reasoning method device under the heterogeneous multi-core architecture can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0097] In one embodiment, a computer device is provided, which may be a server, and includes a processor, a memory, and a network interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a method for coordinated investment in a power transmission and energy storage system is implemented.

[0098] Those skilled in the art will appreciate that a block diagram of only a portion of the structure related to the solution of the present application does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0099] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0100] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0101] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0102] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0103] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0104] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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.

[0105] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.< / tensor> < / tensor>

Claims

1. A method for asynchronous deep learning reasoning under a heterogeneous many-core architecture, characterized in that: The method comprises: Define asynchronous acquisition interface and inference result interface; Call the asynchronous acquisition interface to send the host data to the preset inference framework and obtain the corresponding handle result; Based on the handle result, the inference result interface is called to obtain the inference result corresponding to the inference framework.

2. The method according to claim 1, characterized in that Before defining the asynchronous acquisition interface, it also includes: The reasoning framework calculates and sets the offset of the pointer in the temporary input buffer; Copy the host data pointed to by the pointer to the device; After the calculation is completed on the device side, the offset of the temporary output buffer is output through the calculation pointer; After the device completes the calculation, the data is copied to the corresponding position of the temporary output buffer.

3. The method according to claim 1, characterized in that The method further comprises: Count the number of cores in many-core chips; The inference framework opens temporary input buffers and temporary output buffers equal to the number of cores, and the temporary input buffers and temporary output buffers are opened on the memory of the multi-cores; Set corresponding identity information based on the user's reasoning request; The temporary input buffer and the temporary output buffer record the identity information corresponding to the input and output data.

4. The method according to claim 1, characterized in that: The definition of the asynchronous acquisition interface includes: Compare the identity information of the temporary input buffer input corresponding to the many-core core with the identity information of the output; If the identity information of the input of the temporary input buffer corresponding to the many-core core is the same as the identity information of the output, the data on the host side is copied to the device side.

5. The method according to claim 4, characterized in that The definition of the inference result interface includes: Compare the identity information of the temporary output buffer input corresponding to the many-core core with the identity information of the output; If the identity information of the temporary output buffer input corresponding to the many-core core is the same as the identity information of the output, the data on the device side is copied to the host side.

6. The method according to claim 5, characterized in that The method further comprises: Determine whether the identity information of the input data of the temporary input buffer is greater than the identity information of the output data; If the identity information of the input data in the temporary input buffer is greater than the identity information of the output data, the input data is copied from the temporary input buffer and stored in the temporary output buffer; Update the identity information corresponding to the data output by the temporary input cache; The device reads the data in the temporary output buffer to perform inference calculation and output the inference result; Update the identity information corresponding to the data that has completed the calculation; If the identity information of the output data of the temporary output cache is the same as the identity information of the input data, the inference result is copied to the temporary output cache.

7. An asynchronous deep learning reasoning device under a heterogeneous many-core architecture, characterized in that: The device comprises: User interface definition module, used to define asynchronous acquisition interface and reasoning result interface; The acquisition interface calculation module is used to call the asynchronous acquisition interface to send the data on the host side to the preset reasoning framework and obtain the corresponding handle result; The inference result acquisition module is used to call the inference result interface based on the handle result to obtain the inference result corresponding to the inference framework.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.