A heterogeneous computing method, device, equipment and storage medium based on DDS

By adopting the DDS framework protocol and shared memory management driver in the heterogeneous computing system, the cross-domain transmission of image data is realized, which solves the problem of inconsistent and high complexity of cross-domain transmission interfaces in the heterogeneous computing system and achieves efficient data transmission. transmission.

CN118519797BActive Publication Date: 2024-10-18SIENGINE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410959953.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-17
Publication Date
2024-10-18
Estimated Expiration
2044-07-17

AI Technical Summary

Technical Problem

In complex heterogeneous computing systems, cross-domain transmission of image data has inconsistent interfaces and high complexity. Native description information is limited to use within the same domain, making cross-domain transmission difficult to achieve.

Method used

Using a heterogeneous computing method based on DDS, cross-domain transmission of data is realized through shared memory and DDS framework protocols, and the shared memory management driver and RPMsg transport layer are used to support the creation, release, import and export management of hash/continuous memory, and realize cross-domain Describe the transmission of information.

Benefits of technology

It significantly reduces the interface complexity, avoids the copying of data between different domains, and achieves efficient heterogeneous computing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118519797B_ABST
    Figure CN118519797B_ABST
Patent Text Reader

Abstract

A heterogeneous computing method, device, equipment and storage medium based on DDS. The heterogeneous computing method based on DDS includes: obtaining target transmission data generated by any data production module in the first domain / operating system in the target chip; importing the target transmission data into shared memory, and obtaining target description information pointing to the target transmission data, and publishing the target description information to the corresponding target topic through the DDS framework protocol; if there is a first subscriber who subscribes to the target topic in the first domain / operating system, the target description information is transmitted to the first subscriber through the DDS framework protocol; if there is a second subscriber who subscribes to the target topic in the second domain / operating system in the target chip, the target description information is transmitted to the second subscriber through the DDS framework protocol. The cross-domain transmission of the description information of the shared memory to the subscriber in another domain / operating system is realized through the DDS framework protocol, avoiding the copying of a large amount of data when data communicates between different domains.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of heterogeneous computing, and in particular to a DDS-based heterogeneous computing method, apparatus, device and storage medium. Background Art

[0002] In heterogeneous computing scenarios based on deep learning, images are the main transmission data, with large data volume, high copy cost, and low latency transmission requirements. Linux uses description information to solve the transmission and sharing of image data between different modules. At the same time, application frameworks such as DRM / V4L2 also integrate description information functions. However, native description information is limited to use within the same domain (Domain / OS). In the current complex heterogeneous computing systems, the degree of customization is high, the interface is not unified, the user usage is complex, and the same chip often involves multiple different Domain / OS. Therefore, how to conveniently and quickly complete cross-domain transmission of description information is currently in need of improvement. Summary of the invention

[0003] The present application provides a DDS-based heterogeneous computing method, device, equipment and storage medium, which can solve the technical problems existing in the above-mentioned prior art.

[0004] In a first aspect, the embodiment of the present application provides a heterogeneous computing method based on DDS, which adopts the following technical solution:

[0005] A heterogeneous computing method based on DDS, the heterogeneous computing method based on DDS comprising:

[0006] Acquire target transmission data generated by any data production module in the first domain / operating system in the target chip;

[0007] Importing the target transmission data into the shared memory, obtaining target description information pointing to the target transmission data, and publishing the target description information to the corresponding target topic through a preset DDS framework protocol;

[0008] If there is a first subscriber who subscribes to the target topic in the first domain / operating system, the target description information is transmitted to the first subscriber through the DDS framework protocol;

[0009] If there is a second subscriber who subscribes to the target topic in the second domain / operating system in the target chip, the target description information is transmitted to the second subscriber through the DDS framework protocol.

[0010] In combination with the first aspect, in one embodiment, the DDS framework protocol supports the creation, release, and import and export management of hash / continuous memory description information, and the transport layer of the DDS framework protocol can support the transmission of hash / continuous memory description information in the same domain or different domains of the same chip.

[0011] In combination with the first aspect, in one embodiment, the kernel driver layer of the DDS framework protocol has a shared memory management driver for each heterogeneous computing node, and the DDS framework protocol implements creation, release, import and export management of hash / continuous memory description information based on the shared memory management driver.

[0012] In combination with the first aspect, in one implementation, the transport layer of the DDS framework protocol supports cross-domain transmission of description information through shared memory transmission of RPMsg; an RPMsg transport layer driver is provided in the kernel driver layer of the DDS framework protocol to support cross-domain transmission of description information.

[0013] In combination with the first aspect, in one implementation, the target transmission data is transmitted according to the target, and target description information pointing to the target transmission data is obtained, and the target description information is published to the corresponding target topic through a preset DDS framework protocol, including the following steps:

[0014] According to the target transmission data, obtaining first description information;

[0015] Preprocessing the identification method of the first description information in the user state to obtain target description information;

[0016] The target description information is published to the corresponding target topic through the DDS framework protocol.

[0017] In combination with the first aspect, in an implementation manner, preprocessing the identification method of the first description information in the user state to obtain the target description information includes the following steps:

[0018] The first description information is received through a socket, and the first description information is imported into a local framework for preprocessing using an identification method in a user state to obtain target description information for publishing.

[0019] In combination with the first aspect, in one implementation, if there is a second subscriber who subscribes to the target topic in the second domain / operating system, after transmitting the target description information to the second subscriber through the DDS framework protocol, the following steps are included:

[0020] remapping the target description information into available description information in the second subscriber;

[0021] The identification method of the available description information in the user state is imported into the application framework of the second subscriber for subsequent calculation.

[0022] In a second aspect, the embodiment of the present application provides a heterogeneous computing device based on DDS, which adopts the following technical solution:

[0023] A heterogeneous computing device based on DDS, the heterogeneous computing device based on DDS comprising:

[0024] An acquisition module configured to acquire target transmission data generated by any data production module in the first domain / operating system in the target chip;

[0025] A publishing module, which is configured to import the target transmission data into a shared memory, obtain target description information pointing to the target transmission data, and publish the target description information to a corresponding target topic through a preset DDS framework protocol;

[0026] A transmission module is configured to transmit the target description information to the first subscriber through the DDS framework protocol if there is a first subscriber who subscribes to the target topic in the first domain / operating system; and to transmit the target description information to the second subscriber through the DDS framework protocol if there is a second subscriber who subscribes to the target topic in the second domain / operating system in the target chip.

[0027] In a third aspect, the embodiment of the present application provides a heterogeneous computing device based on DDS, which adopts the following technical solution:

[0028] A DDS-based heterogeneous computing device, the DDS-based heterogeneous computing device comprising a processor, a memory, and a DDS-based heterogeneous computing program stored in the memory and executable by the processor, wherein when the DDS-based heterogeneous computing program is executed by the processor, the steps of the DDS-based heterogeneous computing method as described above are implemented.

[0029] In a fourth aspect, an embodiment of the present application provides a storage medium, which adopts the following technical solution:

[0030] A storage medium stores a DDS-based heterogeneous computing program, wherein when the DDS-based heterogeneous computing program is executed by a processor, the steps of the DDS-based heterogeneous computing method described above are implemented.

[0031] The beneficial effects brought by the technical solution provided in the embodiments of the present application include:

[0032] The target transmission data generated by the data production module in the first domain / operating system in the target chip is transmitted in the form of shared memory description information, namely, the target description information, and in the specific transmission process, cross-domain transmission is realized to the subscriber in the second domain / operating system through the DDS framework protocol. The unified data distribution interface provided by DDS is utilized, which significantly reduces the complexity of the required interface. At the same time, it also avoids the copying of large amounts of data when communicating between different domains, thereby achieving more efficient completion of heterogeneous computing. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 This is a flow chart of an embodiment of a heterogeneous computing method based on DDS of the present application;

[0034] Figure 2 This is an architecture diagram of the DDS framework protocol used in the DDS-based heterogeneous computing method of this application;

[0035] Figure 3 This is a functional module diagram of an embodiment of a heterogeneous computing device based on DDS of the present application;

[0036] Figure 4 Schematic diagram of the hardware structure of a DDS-based heterogeneous computing device involved in the embodiment of the present application. DETAILED DESCRIPTION

[0037] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0038] In heterogeneous computing scenarios based on deep learning, images are the main transmission data, with large data volume, high copy cost, and low latency transmission requirements. Linux uses description information to solve the transmission and sharing of image data between different modules. At the same time, application frameworks such as DRM / V4L2 also integrate description information functions. However, native description information is limited to use within the same domain (Domain / OS). In the current complex heterogeneous computing systems, the degree of customization is high, the interface is not unified, the user usage is complex, and the same chip often involves multiple different Domain / OS. Therefore, how to conveniently and quickly complete cross-domain transmission of description information is currently in need of improvement.

[0039] Based on the above problems, the present application provides a heterogeneous computing method, apparatus, device and storage medium based on DDS. The key point of the invention is that the target transmission data generated by the data production module in the first domain / operating system in the target chip is transmitted in the form of shared memory description information, that is, the target description information, and in the specific transmission process, cross-domain transmission is realized to the subscriber in the second domain / operating system through the DDS framework protocol, thereby realizing the use of the unified data distribution interface provided by DDS, significantly reducing the complexity of the required interface, and also avoiding the copying of large amounts of data when data communicates between different domains, thereby achieving more efficient completion of heterogeneous computing.

[0040] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0041] In a first aspect, an embodiment of the present application provides a heterogeneous computing method based on DDS.

[0042] In one embodiment, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the heterogeneous computing method based on DDS of this application. Figure 1 As shown, the heterogeneous computing methods based on DDS include:

[0043] The heterogeneous computing method based on DDS includes:

[0044] S100, obtaining target transmission data generated by any data production module in the first domain / operating system in the target chip;

[0045] The target transmission data may be image data generated by a camera or related data generated by a GPU.

[0046] S200, importing the target transmission data into the shared memory, obtaining target description information pointing to the target transmission data, and publishing the target description information to the corresponding target topic through a preset DDS framework protocol;

[0047] Among them, in some embodiments provided in the present application, the target transmission data transmitted is the description information of the shared memory (i.e., dmabuf), and since the standard DDS framework protocol does not support the cross-domain transmission and distribution of dmabuf, the DDS framework protocol is adjusted in this solution to implement the DDS framework protocol to support the creation, release, import and export management of the description information of the hash / continuous memory, and the transport layer of the DDS framework protocol can support the transmission of the description information of the hash / continuous memory in the same domain or different domains of the same chip;

[0048] To achieve the above goals, see Figure 2 In some embodiments, a shared memory management driver for each heterogeneous computing node is set in the kernel driver layer of the DDS framework protocol, and then the DDS framework protocol is used to create, release, import and export description information of hash / continuous memory according to the shared memory management driver. At the same time, the transport layer of the DDS framework protocol supports cross-domain transmission of description information through RPMsg shared memory transmission; the kernel driver layer of the DDS framework protocol is provided with an RPMsg transport layer driver to support cross-domain transmission of description information.

[0049] Based on the above adjusted DDS framework protocol, step S200 will specifically include the following steps when executed:

[0050] S210, obtaining first description information according to the target transmission data;

[0051] Specifically, the target transmission data generated by the data production module will be input into the shared memory to obtain the first description information about the target transmission data, that is, the first dmabuf; for example, the camera generates an image to dmabuf through the V4L2 framework, and the GPU exports the rendered image to dmabuf through the DRM framework.

[0052] S220, pre-processing the identification method of the first description information in the user state to obtain target description information;

[0053] Specifically, in some embodiments, the generated first description information will be received by other modules through a socket, and the first description information will be imported into the local framework for preprocessing using the identification method of the first description information in user state (i.e., the fd of dmabuf), and the processed data will be saved to obtain new description information, i.e., the target description information, which can then be published using the DDS framework protocol in subsequent processes.

[0054] S230. Publish the target description information to the corresponding target topic through the DDS framework protocol.

[0055] After step S200, the following steps are included:

[0056] S300: If there is a first subscriber who subscribes to the target topic in the first domain / operating system, the target description information is transmitted to the first subscriber through the DDS framework protocol;

[0057] Specifically, a subscriber (such as a GPU) in the same domain / operating system in the same chip will subscribe to the target description information in the target topic through the DDS framework protocol and perform subsequent calculations. For example, the GPU uses the fd of the target description information to import it into the application framework for subsequent calculations.

[0058] Also includes:

[0059] S400: If there is a second subscriber who subscribes to the target topic in the second domain / operating system in the target chip, the target description information is transmitted to the second subscriber through the DDS framework protocol.

[0060] Wherein, step S400 specifically includes:

[0061] S410, remapping the target description information into available description information in the second subscriber;

[0062] Specifically, after subscribers in different domains / operating systems in the same chip subscribe to the target description information in the target subject through DDS, the target description information will first be converted into description information available in the domain / operating system, that is, usable description information.

[0063] S420: Import the identification method of the available description information in the user state into the application framework of the second subscriber for subsequent calculation.

[0064] Finally, the above method transmits the target transmission data generated by the data production module in the first domain / operating system in the target chip in the form of shared memory description information, that is, target description information, and realizes cross-domain transmission to the subscriber in the second domain / operating system through the DDS framework protocol during the specific transmission process, thereby realizing the use of the unified data distribution interface provided by DDS, significantly reducing the complexity of the required interface, and also avoiding the copying of large amounts of data when data communicates between different domains, thereby achieving more efficient completion of heterogeneous computing.

[0065] In a second aspect, an embodiment of the present application also provides a heterogeneous computing device based on DDS.

[0066] In one embodiment, referring to Figure 3 , Figure 3 This is a functional module diagram of an embodiment of a heterogeneous computing device based on DDS in this application. Figure 3 As shown, the heterogeneous computing device based on DDS includes:

[0067] An acquisition module configured to acquire target transmission data generated by any data production module in the first domain / operating system in the target chip;

[0068] A publishing module, which is configured to import the target transmission data into a shared memory, obtain target description information pointing to the target transmission data, and publish the target description information to a corresponding target topic through a preset DDS framework protocol;

[0069] A transmission module is configured to transmit the target description information to the first subscriber through the DDS framework protocol if there is a first subscriber who subscribes to the target topic in the first domain / operating system; and to transmit the target description information to the second subscriber through the DDS framework protocol if there is a second subscriber who subscribes to the target topic in the second domain / operating system.

[0070] Among them, the functional implementation of each module in the above-mentioned DDS-based heterogeneous computing device corresponds to the steps in the above-mentioned DDS-based heterogeneous computing method embodiment, and its functions and implementation processes will not be repeated here one by one.

[0071] In a third aspect, an embodiment of the present application provides a heterogeneous computing device based on DDS. The heterogeneous computing device based on DDS may be a personal computer (PC), a laptop computer, a server, or other device with data processing capabilities.

[0072] Reference Figure 4 , Figure 4 The hardware structure diagram of the heterogeneous computing device based on DDS involved in the embodiment of the present application is shown in FIG. In the embodiment of the present application, the heterogeneous computing device based on DDS may include a processor, a memory, a communication interface, and a communication bus.

[0073] The communication bus may be of any type and is used to interconnect the processor, the memory, and the communication interface.

[0074] Communication interfaces include input / output (I / O) interfaces, physical interfaces, and logical interfaces, which are used to interconnect devices within DDS-based heterogeneous computing devices, and interfaces used to interconnect DDS-based heterogeneous computing devices with other devices (such as other computing devices or user devices). Physical interfaces can be Ethernet interfaces, optical fiber interfaces, ATM interfaces, etc.; user devices can be display screens (Display), keyboards (Keyboard), etc.

[0075] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.

[0076] The processor may be a general-purpose processor, which may call a heterogeneous computing program based on DDS stored in a memory and execute a heterogeneous computing method based on DDS provided in an embodiment of the present application. For example, the general-purpose processor may be a central processing unit (CPU). The method executed when the heterogeneous computing program based on DDS is called may refer to the various embodiments of the heterogeneous computing method based on DDS of the present application, which will not be described in detail here.

[0077] Those skilled in the art will understand that Figure 4 The hardware structure shown in the figure does not constitute a limitation on the present application, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0078] In a fourth aspect, an embodiment of the present application also provides a storage medium.

[0079] The storage medium of the present application stores a heterogeneous computing program based on DDS, wherein when the heterogeneous computing program based on DDS is executed by a processor, the steps of the heterogeneous computing method based on DDS as described above are implemented.

[0080] Among them, the method implemented when the DDS-based heterogeneous computing program is executed can refer to the various embodiments of the DDS-based heterogeneous computing method of the present application, and will not be repeated here.

[0081] It should be noted that the serial numbers of the above-mentioned embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.

[0082] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit "first", "second" and "third" to different types.

[0083] In the description of the embodiments of the present application, "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.

[0084] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.

[0085] In some processes described in the embodiments of the present application, multiple operations or steps that appear in a specific order are included, but it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or in parallel, and the sequence number of the operation is only used to distinguish the different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.

[0086] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD) as described above, and includes a number of instructions for a terminal device to execute the methods described in each embodiment of the present application.

[0087] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A heterogeneous computing method based on DDS, characterized in that: The heterogeneous computing method based on DDS includes: Acquire target transmission data generated by any data production module in the first domain / operating system in the target chip; Importing the target transmission data into the shared memory, obtaining target description information pointing to the target transmission data, and publishing the target description information to the corresponding target topic through a preset DDS framework protocol; If there is a first subscriber who subscribes to the target topic in the first domain / operating system, the target description information is transmitted to the first subscriber through the DDS framework protocol; the subscribers in the same domain / operating system in the same chip use the identification method of the target description information in user state to import it into the application framework for subsequent calculation; If there is a second subscriber subscribing to the target topic in the second domain / operating system in the target chip, the target description information is transmitted to the second subscriber through the DDS framework protocol; the target description information is remapped into available description information in the second subscriber, and the identification method of the available description information in the user state is imported into the application framework of the second subscriber for subsequent calculation; The step of importing the target transmission data into a shared memory, obtaining target description information pointing to the target transmission data, and publishing the target description information to a corresponding target topic through a preset DDS framework protocol includes the following steps: According to the target transmission data, first description information is obtained; wherein the first description information is a dmabuf of a shared memory; Preprocessing the identification method of the first description information in the user state to obtain target description information; wherein the target description information is the new description information obtained by importing the identification method of the first description information in the user state, that is, the fd of dmabuf, into the local framework for preprocessing and saving the data; Publishing the target description information to the corresponding target topic through the DDS framework protocol; A shared memory management driver for each heterogeneous computing node is set in the kernel driver layer of the DDS framework protocol, and the shared memory management driver implements the creation, release, import and export management of the description information of the hash / continuous memory by the DDS framework protocol, and an RPMsg transport layer driver is provided in the kernel driver layer of the DDS framework protocol to support the cross-domain transmission of the description information; the transport layer of the DDS framework protocol can support the transmission of the description information of the hash / continuous memory in the same domain or different domains of the same chip; the transport layer of the DDS framework protocol supports the cross-domain transmission of the description information through the shared memory transmission of RPMsg.

2. The DDS-based heterogeneous computing method according to claim 1, characterized in that: The step of preprocessing the identification method of the first description information in the user state to obtain the target description information includes the following steps: The first description information is received through a socket, and the first description information is imported into a local framework for preprocessing using an identification method in a user state to obtain target description information for publishing.

3. A DDS-based heterogeneous computing device for executing the DDS-based heterogeneous computing method according to claim 1, characterized in that: The DDS-based heterogeneous computing device includes: An acquisition module configured to acquire target transmission data generated by any data production module in the first domain / operating system in the target chip; A publishing module, which is configured to import the target transmission data into a shared memory, obtain target description information pointing to the target transmission data, and publish the target description information to a corresponding target topic through a preset DDS framework protocol; A transmission module is configured to transmit the target description information to the first subscriber through the DDS framework protocol if there is a first subscriber who subscribes to the target topic in the first domain / operating system; and to transmit the target description information to the second subscriber through the DDS framework protocol if there is a second subscriber who subscribes to the target topic in the second domain / operating system in the target chip.

4. A heterogeneous computing device based on DDS, characterized in that: The DDS-based heterogeneous computing device includes a processor, a memory, and a DDS-based heterogeneous computing program stored in the memory and executable by the processor, wherein when the DDS-based heterogeneous computing program is executed by the processor, the steps of the DDS-based heterogeneous computing method as described in any one of claims 1 to 2 are implemented.

5. A storage medium, characterized in that: The storage medium stores a heterogeneous computing program based on DDS, wherein when the heterogeneous computing program based on DDS is executed by a processor, the steps of the heterogeneous computing method based on DDS as described in any one of claims 1 to 2 are implemented.

Citation Information

Patent Citations

  • Zero-copy-based DDS (Direct Digital Synthesizer) communication method and system

    CN116521394A

  • Data transmission method and device, electronic equipment and computer readable storage medium

    CN116932454A