Heterogeneous computing data processing system, method, electronic device, and storage medium
By introducing a global logical address space mapping mechanism in a heterogeneous computing system, the host processor determines the target computing module and its storage location and generates scheduling instructions. The target processing unit then performs data processing, which solves the latency and overhead problems caused by data transmission across processing units and improves system efficiency.
Patent Information
- Application Number
- CN202611062588.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-16
- Publication Date
- 2026-11-27
AI Technical Summary
In heterogeneous computing systems, the limited private storage capacity of processing units leads to a large amount of data transfer across processing units, increasing data processing latency and system communication overhead.
By mapping the local storage space of each processing unit, the storage space of the host processor, and the storage space of the cache expansion device to the global logical address space, the host processor determines the target computing module and its storage location based on the computing resources and data storage mapping relationship, and generates scheduling instructions. The target processing unit responds to the scheduling instructions to perform data processing.
It reduces data transmission across processing units, lowers data processing latency and system communication overhead, and improves data processing efficiency.
Smart Images

Figure CN123178114A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of chip technology, and in particular to a data processing system, method, electronic device and storage medium for heterogeneous computing. Background Technology
[0002] In heterogeneous computing systems, data processing tasks are typically completed collaboratively by a host processor and multiple processing units. The host processor is responsible for task scheduling, while each processing unit loads different computing modules to process the input data.
[0003] Currently, in related technologies, when input data needs to be processed by a specific target computing module, due to the limitations of the processing unit's private storage capacity, the target computing module may not be loaded onto the processing unit where the input data is currently located. In this case, the input data needs to be moved to the processing unit where the target computing module is located before computation can be performed. As the number of processing units increases and the size of computing modules grows, the situation where input data and the target computing module are located in different processing units occurs frequently, resulting in a large amount of cross-processing unit data transmission in the system, increasing data processing latency and system communication overhead. Summary of the Invention
[0004] This disclosure provides a data processing system, method, electronic device, and storage medium for heterogeneous computing. Its main objective is to address the problems in existing technologies where large amounts of data are transmitted across processing units, leading to high data processing latency and system communication overhead.
[0005] According to a first aspect of this disclosure, a heterogeneous computing data processing system is provided, comprising: a host processor, at least two processing units, and at least one cache expansion device, wherein the local storage space of each processing unit, the storage space of the host processor, and the storage space of each cache expansion device are all mapped to a global logical address space.
[0006] The host processor is configured to determine the target processing unit to which the target computing module corresponding to the data to be processed belongs, and the storage location of the data to be processed in the global logical address space, based on the computing resource mapping relationship and the data storage mapping relationship, and generate a scheduling instruction; and send the scheduling instruction to the target processing unit. The target processing unit is configured to respond to the scheduling instruction, read the data to be processed based on the global logical address space, call the target computing module to process the data to be processed, and obtain the data processing result.
[0007] In some embodiments, the host processor is configured to: The target computing module is determined according to the type of the data to be processed. The target processing unit to which the target computing module belongs is determined based on the computing resource mapping relationship; Based on the data storage mapping relationship, the storage location of the data to be processed in the global logical address space and the storage location of the target calculation parameters of the target calculation module in the global logical address space are determined respectively. The scheduling instruction is generated based on the correspondence between the storage location of the data to be processed and the local storage space of the target processing unit, and the correspondence between the storage location of the target calculation parameters and the local storage space of the target processing unit.
[0008] In some embodiments, generating the scheduling instruction based on the correspondence between the storage location of the data to be processed and the local storage space of the target processing unit, and the correspondence between the storage location of the target calculation parameters and the local storage space of the target processing unit, includes: When both the data to be processed and the target calculation parameters are stored in the local storage space of the target processing unit, a local calculation scheduling instruction is generated. When the data to be processed and / or the target calculation parameters are not stored in the local storage space of the target processing unit, a cross-storage scheduling instruction is generated.
[0009] In some embodiments, the target processing unit is further configured to initiate a read request in response to the local computing scheduling instruction or the cross-memory scheduling instruction, and read the data to be processed and / or the target computing parameters through a high-speed interconnect protocol.
[0010] In some embodiments, the high-speed interconnect protocol includes an address resolution sublayer, a cache access sublayer, and a memory access sublayer, wherein, The address resolution sublayer is used to parse the global logical address of the data to be processed and / or the target calculation parameters carried in the read request, and determine the storage range to which the global logical address belongs; when the storage range is the local storage space of the target processing unit, the target processing unit is controlled to read the data to be processed and / or the target calculation parameters locally; when the storage range is the local storage space of other processing units besides the target processing unit, the data to be processed and / or the target calculation parameters are routed to the target processing unit. The cache access sub-protocol is used to read the data to be processed and / or the target calculation parameters and forward them to the target processing unit when the storage range is the storage space of the cache extension device. The memory access sub-protocol is used to read the data to be processed and / or the target calculation parameters and forward them to the target processing unit when the storage range is the storage space of the host processor.
[0011] In some embodiments, the host processor is further configured to: The load status of each processing unit is obtained, and the computing modules in the processing units with load status higher than a first preset threshold are migrated to the processing units with load status lower than a second preset threshold, and the computing resource mapping relationship is updated; wherein, the first preset threshold is greater than the second preset threshold. The access frequency of each calculation parameter is obtained, and calculation parameters whose access frequency is higher than a third preset threshold are migrated to the local storage space of the corresponding processing unit; calculation parameters whose access frequency is lower than the third preset threshold but higher than a fourth preset threshold are migrated to the storage space of the cache expansion device; calculation parameters whose access frequency is lower than the fourth preset threshold are migrated to the storage space of the host processor; and the data storage mapping relationship is updated based on the migration results of each calculation parameter.
[0012] According to a second aspect of this disclosure, a data processing method for heterogeneous computing is provided, the method being applied to a host processor, comprising: Based on the mapping relationship between computing resources and data storage, the target processing unit to which the target computing module corresponding to the data to be processed belongs, and the storage location of the data to be processed in the global logical address space are determined; wherein, the local storage space of each processing unit, the storage space of the host processor, and the storage space of each cache expansion device are all mapped to the global logical address space; Based on the relationship between the storage location of the data to be processed in the global logical address space and the local storage space of the target processing unit, a scheduling instruction is generated and sent to the target processing unit so that the target processing unit responds to the scheduling instruction, reads the data to be processed based on the global logical address space, and calls the target computing module to process the data to be processed.
[0013] According to a third aspect of this disclosure, a data processing method for heterogeneous computing is provided, the method being applied to a target processing unit, comprising: The system receives scheduling instructions sent by the host processor; wherein the scheduling instructions are generated by the host processor based on the mapping relationship between computing resources and data storage; the local storage space of each processing unit, the storage space of the host processor, and the storage space of each cache expansion device are all mapped to the global logical address space. In response to the scheduling instruction, the data to be processed is read based on the global logical address space; The target calculation module is invoked to process the data to be processed, and the data processing result is obtained.
[0014] According to a fourth aspect of this disclosure, a heterogeneous computing data processing apparatus is provided, the apparatus being configured on a host processor, comprising: The determining unit is used to determine the target processing unit to which the target computing module corresponding to the data to be processed belongs, and the storage location of the data to be processed in the global logical address space, based on the computing resource mapping relationship and the data storage mapping relationship; wherein, the local storage space of each processing unit, the storage space of the host processor and the storage space of each cache expansion device are all mapped to the global logical address space; The generation unit is configured to generate a scheduling instruction based on the relationship between the storage location of the data to be processed in the global logical address space and the local storage space of the target processing unit, and send the scheduling instruction to the target processing unit so that the target processing unit responds to the scheduling instruction, reads the data to be processed based on the global logical address space, and calls the target computing module to process the data to be processed.
[0015] According to a fifth aspect of this disclosure, a data processing apparatus for heterogeneous computing is provided, the apparatus being configured in a target processing unit, comprising: A receiving unit is used to receive scheduling instructions sent by the host processor; wherein the scheduling instructions are generated by the host processor based on the computing resource mapping relationship and the data storage mapping relationship; the local storage space of each processing unit, the storage space of the host processor, and the storage space of each cache expansion device are all mapped to the global logical address space; A reading unit is used to read data to be processed based on the global logical address space in response to the scheduling instruction; The processing unit is used to call the target computing module to process the data to be processed and obtain the data processing result.
[0016] According to a sixth aspect of this disclosure, an electronic device is provided, comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method described in the second or third aspect above.
[0017] According to a seventh aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are configured to cause the computer to perform the methods described in the second or third aspect above.
[0018] According to the eighth aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the method as described in the second or third aspect above.
[0019] In summary, the heterogeneous computing data processing system, method, electronic device, and storage medium provided in this disclosure include: a host processor, at least two processing units, and at least one cache expansion device, wherein the local storage space of each processing unit, the storage space of the host processor, and the storage space of each cache expansion device are all mapped to a global logical address space; the host processor is used to determine the target processing unit to which the target computing module corresponding to the data to be processed belongs, and the storage location of the data to be processed in the global logical address space, based on the computing resource mapping relationship and the data storage mapping relationship, and generate a scheduling instruction; and send the scheduling instruction to the target processing unit; the target processing unit is used to respond to the scheduling instruction, read the data to be processed based on the global logical address space, call the target computing module to process the data to be processed, and obtain a data processing result. Compared with related technologies, the solution disclosed herein can determine the target processing unit to which the target computing module belongs and the storage location of the data to be processed in the global logical address space by the host processor based on the computing resource mapping relationship and the data storage mapping relationship, and generate scheduling instructions so that the target processing unit reads the data to be processed based on the global logical address space and calls the target computing module for processing, thereby reducing cross-processing unit data transmission caused by the inconsistency between the data to be processed and the processing unit where the target computing module is located, and reducing data processing latency and system communication overhead.
[0020] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description
[0021] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein: Figure 1 This is a schematic diagram of the structure of a heterogeneous computing data processing system provided in an embodiment of the present disclosure; Figure 2 This is a schematic flowchart illustrating a data processing method for heterogeneous computing applied to a host processor, provided in an embodiment of this disclosure. Figure 3 This is a schematic flowchart illustrating a data processing method for heterogeneous computing applied to a target processing unit, provided in an embodiment of this disclosure. Figure 4 This is a schematic diagram of the structure of a data processing device for heterogeneous computing configured on a host processor, provided in an embodiment of this disclosure. Figure 5 This is a schematic diagram of the structure of a data processing device for heterogeneous computing configured in a target processing unit, provided in an embodiment of the present disclosure. Figure 6 This is a schematic block diagram of an example electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0022] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0023] This invention has a wide range of applications, and is especially suitable for efficient inference and training scenarios of Mixture of Experts (MoE) models.
[0024] The following description, with reference to the accompanying drawings, outlines a data processing system, method, electronic device, and storage medium for heterogeneous computing according to embodiments of the present disclosure.
[0025] Figure 1 This is a schematic diagram of the structure of a heterogeneous computing data processing system provided in an embodiment of this disclosure.
[0026] like Figure 1 As shown, the system includes a host processor 11, at least two processing units 12, and at least one cache expansion device 13, wherein the local storage space of each processing unit 12, the storage space of the host processor 11, and the storage space of each cache expansion device 13 are all mapped to the global logical address space.
[0027] In some embodiments, a global logical address space is an address space that uniformly addresses multiple physically dispersed storage resources in a system, with each storage location having a unique address identifier within the global logical address space. By mapping the local storage space of each processing unit, the storage space of the host processor, and the storage space of the cache expansion device to the global logical address space, any processing unit or host processor in the system can directly access data in the local storage space of other processing units, the storage space of the cache expansion device, or the storage space of the host processor through addresses in the global logical address space. The mapping of the aforementioned storage spaces can be implemented using high-speed interconnect protocols (such as CXL protocols that support cache coherency and memory access), or other interconnect technologies capable of mapping multiple independent storage spaces to a unified address space. Specifically, this disclosure does not limit the specific implementation of these technologies.
[0028] The host processor 11 is used to determine the target processing unit 12 to which the target computing module corresponding to the data to be processed belongs, and the storage location of the data to be processed in the global logical address space, according to the computing resource mapping relationship and the data storage mapping relationship, and to generate a scheduling instruction; and to send the scheduling instruction to the target processing unit 12.
[0029] In some embodiments, the computing resource mapping relationship is information used to record the correspondence between each processing unit and the loaded computing module. This information can be stored in the host processor-accessible storage space in the form of tables, lists, databases, or other data structures, including but not limited to tables, lists, databases, or other data structures. The data storage mapping relationship is information used to record the correspondence between data and its storage location in the global logical address space. This information can also be stored in the form of tables, lists, databases, or other data structures. After acquiring the data to be processed, the host processor determines that the data needs to be processed by the target computing module. Then, based on the computing resource mapping relationship, it determines which processing unit the target computing module is currently loaded onto; this processing unit is the target processing unit. Simultaneously, the host processor determines the current storage location of the data to be processed in the global logical address space based on the data storage mapping relationship. Afterward, based on the determined target processing unit and the storage location of the data to be processed, the host processor generates a corresponding scheduling instruction and sends the scheduling instruction to the target processing unit.
[0030] In some implementations, the computation module can be an expert within the MoE model, and the processing unit can be a Neural Processing Unit (NPU) or other types of Artificial Intelligence (AI) accelerator chips. The data to be processed can be input token vectors during the MoE model's inference or training process, or other types of data to be computed. The target computation module is the expert that the data to be processed needs to activate.
[0031] In this way, the host processor can determine, based on the pre-maintained computing resource mapping relationship and data storage mapping relationship, which processing unit the computing module required for the data to be processed is located on, and the current storage location of the data to be processed, and generate scheduling instructions accordingly, thereby realizing the perception and scheduling of computing resources and data location.
[0032] The target processing unit 12 is used to respond to the scheduling instruction, read the data to be processed based on the global logical address space, call the target computing module to process the data to be processed, and obtain the data processing result.
[0033] In some embodiments, after receiving a scheduling instruction from the host processor, the target processing unit reads the data to be processed from the corresponding storage location via a high-speed interconnect protocol, based on the address information of the data to be processed in the global logical address space carried or implicitly indicated in the scheduling instruction. Since the local storage space of each processing unit, the storage space of the host processor, and the storage space of each cache extension device are all mapped to the global logical address space, the target processing unit only needs to use the global logical address to read the data. After reading the data to be processed, the target processing unit calls its own loaded target computing module to perform calculations on the data to be processed, obtaining the data processing result.
[0034] In some embodiments, when the target processing unit reads data to be processed, the storage location of the data to be processed may be the target processing unit's own local storage space, the local storage space of other processing units, the storage space of a cache extension device, or the storage space of the host processor. Regardless of the location of the data to be processed, the target processing unit initiates a read operation based on the global logical address space, with the underlying high-speed interconnect protocol handling address resolution and data routing. For example, when the data to be processed is stored in the target processing unit's own local storage space, the target processing unit reads it directly locally; when the data to be processed is stored in the local storage space of other processing units, the high-speed interconnect protocol routes the read request to the other processing unit and sends the data to be processed back to the target processing unit; when the data to be processed is stored in the storage space of a cache extension device or the host processor, the high-speed interconnect protocol reads the data to be processed from the corresponding storage space and forwards it to the target processing unit.
[0035] In this way, the target processing unit can read the data to be processed based on the global logical address space, without being limited by the actual storage location of the data to be processed, thereby reducing the data transfer links in the cross-processing unit data transmission process.
[0036] In summary, the heterogeneous computing data processing system provided in this embodiment can determine the target processing unit to which the target computing module belongs and the storage location of the data to be processed in the global logical address space by the host processor based on the computing resource mapping relationship and the data storage mapping relationship, and generate scheduling instructions so that the target processing unit reads the data to be processed based on the global logical address space and calls the target computing module for processing, thereby reducing cross-processing unit data transmission caused by the inconsistency between the data to be processed and the processing unit where the target computing module is located, and reducing data processing latency and system communication overhead.
[0037] Optionally, based on any of the above embodiments or alternative methods, the host processor 11 is configured to: The target computing module is determined based on the type of data to be processed.
[0038] In some embodiments, the type of data to be processed can be determined based on the feature information carried by the data itself. Taking the MoE model as an example, the data to be processed is the input word vector. The host processor can obtain the routing information or feature labels of the word vector and determine which expert needs to process the word vector based on the routing information or feature labels. This expert is the target computing module. The type of data to be processed can also be determined by other classification methods, such as based on the task type, source identifier, or preset scheduling strategy to which the data to be processed belongs. Specifically, this disclosure does not limit this aspect.
[0039] The target processing unit to which the target computing module belongs is determined based on the computing resource mapping relationship.
[0040] In some embodiments, the computing resource mapping relationship records the correspondence between each processing unit and the loaded computing modules. After determining the target computing module, the host processor can determine which processing unit the target computing module is currently loaded onto by querying the computing resource mapping relationship; this processing unit is the target processing unit. The computing resource mapping relationship can be stored in the form of, but not limited to, tables, where each row records the mapping between the identifier of a computing module and the identifier of the processing unit where the computing module is currently located. The computing resource mapping relationship can be established by the host processor during system initialization and dynamically updated during system operation based on the migration of computing modules.
[0041] Based on the data storage mapping relationship, the storage location of the data to be processed in the global logical address space and the storage location of the target calculation parameters of the target calculation module in the global logical address space are determined respectively.
[0042] In some embodiments, the data storage mapping relationship records the correspondence between data and its storage location in the global logical address space. This data includes the data to be processed and the computation parameters of each computation module. The data to be processed is the input data that needs to be processed by the computation module, and the computation parameters are the weights, biases, and other parameter data required by the computation module to perform computations. By querying the data storage mapping relationship, the host processor can determine the current storage location of the data to be processed and the current storage location of the target computation parameters of the target computation module. The storage location of the data to be processed may be any one of the following: the local storage space of the target processing unit, the local storage space of other processing units, the storage space of the cache expansion device, or the storage space of the host processor; the storage location of the target computation parameters is similarly determined.
[0043] The scheduling instruction is generated based on the correspondence between the storage location of the data to be processed and the local storage space of the target processing unit, and the correspondence between the storage location of the target calculation parameters and the local storage space of the target processing unit.
[0044] In some embodiments, after determining the storage locations of the data to be processed and the target computation parameters, the host processor compares these two storage locations with the local storage space of the target processing unit, and generates corresponding scheduling instructions based on the comparison results. The scheduling instructions instruct the target processing unit how to acquire the data to be processed and the target computation parameters to complete the computation task. The data to be processed and the target computation parameters are two independent judgment objects. The host processor determines whether the data to be processed is stored in the local storage space of the target processing unit and whether the target computation parameters are stored in the local storage space of the target processing unit, and generates corresponding scheduling instructions based on the combination of the two judgment results.
[0045] In this way, the scheduling instructions can reflect the actual distribution of the data to be processed and the calculation parameters, providing a basis for the subsequent target processing unit to select a suitable data reading path.
[0046] Optionally, based on any of the above embodiments or optional methods, the step of generating the scheduling instruction according to the correspondence between the storage location of the data to be processed and the local storage space of the target processing unit, and the correspondence between the storage location of the target calculation parameters and the local storage space of the target processing unit, includes: When both the data to be processed and the target calculation parameters are stored in the local storage space of the target processing unit, a local calculation scheduling instruction is generated. When the data to be processed and / or the target calculation parameters are not stored in the local storage space of the target processing unit, a cross-storage scheduling instruction is generated.
[0047] In some embodiments, after determining the storage location of the data to be processed and the storage location of the target computation parameters, the host processor determines whether both storage locations are local storage spaces of the target processing unit. When both the storage location of the data to be processed and the storage location of the target computation parameters are local storage spaces of the target processing unit, it indicates that the data to be processed and the computation parameters are already local to the target processing unit, and no data needs to be obtained from other storage locations. At this time, the host processor generates a local computation scheduling instruction, which instructs the target processing unit to directly read the data to be processed and the target computation parameters from its own local storage space and complete the computation locally. In response to the local computation scheduling instruction, the target processing unit can read data from its local storage space via a high-speed interconnect protocol. Since the data is local, the reading process does not require cross-storage data transfer with other processing units, cache extension devices, or the host processor.
[0048] When either or both of the data to be processed and the target computation parameters are not stored in the local storage space of the target processing unit 12, it indicates that at least some data is not local to the target processing unit and needs to be retrieved from other storage locations. In this case, the host processor generates a cross-memory scheduling instruction, which instructs the target processing unit to read the data to be processed and / or the target computation parameters from a storage location other than the target processing unit's local storage. The cross-memory scheduling instruction may carry or implicitly indicate the address information of the data to be read in the global logical address space. Based on this address information, the target processing unit reads the data from the corresponding storage location via a high-speed interconnect protocol.
[0049] In this way, the host processor can distinguish between generating local computing scheduling instructions and cross-memory scheduling instructions based on whether the data to be processed and the target computing parameters are both located locally in the target processing unit. This allows for direct local computing when the data is ready locally, and for obtaining the required data through cross-memory methods when the data is not local, thereby achieving adaptive scheduling for different data distribution scenarios.
[0050] Optionally, based on any of the above embodiments or optional methods, the target processing unit 12 is further configured to initiate a read request in response to the local computing scheduling instruction or the cross-memory scheduling instruction, and read the data to be processed and / or the target computing parameters through a high-speed interconnect protocol.
[0051] In some embodiments, after receiving a scheduling instruction from the host processor, the target processing unit initiates a corresponding read request based on the type of the scheduling instruction. When the scheduling instruction is a local computation scheduling instruction, the target processing unit initiates a local read request, reading the data to be processed and the target computation parameters from its own local storage space via a high-speed interconnect protocol. When the scheduling instruction is a cross-memory scheduling instruction, the target processing unit initiates a cross-memory read request, reading the data to be processed and / or the target computation parameters from a storage location outside the target processing unit's local storage via a high-speed interconnect protocol. Specifically, the cross-memory read request carries the address information of the data to be processed and / or the target computation parameters in the global logical address space. The target processing unit sends the cross-memory read request out via the high-speed interconnect protocol, which routes the cross-memory read request to the corresponding storage location based on the address information, retrieves the data from that storage location, and then sends it back to the target processing unit.
[0052] Taking the inference scenario of the MoE model as an example, assume the data to be processed is a word vector stored in the storage space of the cache extension device, while the expert to be activated for this word vector and its expert weights are already loaded locally in the target processing unit. The host processor determines the target processing unit where the expert is located by querying the computing resource mapping relationship, and determines that the word vector is stored in the cache extension device and the expert weights are stored locally in the target processing unit by querying the data storage mapping relationship. Since the word vector is not stored locally in the target processing unit, the host processor generates a cross-storage scheduling instruction and sends it to the target processing unit. In response to the cross-storage scheduling instruction, the target processing unit initiates a cross-storage read request. This read request carries the address of the word vector in the global logical address space. The high-speed interconnect protocol routes the read request to the cache extension device based on this address, reads the word vector from the cache extension device, and sends it back to the target processing unit. The target processing unit simultaneously reads the expert weights locally, and then calls the expert to perform calculations on the word vector.
[0053] In this way, the target processing unit can read the data to be processed and the target calculation parameters from local or cross-storage locations through high-speed interconnection protocols according to the type of scheduling instruction. This makes the data reading process uniform for the target processing unit, without needing to know the actual storage location of the data, thus simplifying the data acquisition process of the target processing unit.
[0054] It's important to note that whether the host processor generates a local computation scheduling instruction or a cross-memory scheduling instruction depends on the mapping between the storage locations of the data to be processed and the target computation parameters, and the local storage space of the target processing unit, determined at the scheduling level. When the target processing unit responds to the scheduling instruction and initiates a read request, the request carries the address information of the data to be processed and / or the target computation parameters in the global logical address space. The address resolution sublayer in the high-speed interconnect protocol parses this address information at the data path layer to determine the storage range to which the address belongs, and selects the corresponding data read path based on the storage range. In other words, the scheduling layer's judgment is executed by the host processor, while the routing selection at the data path layer is executed by the address resolution sublayer. These two layers collaborate to complete the entire process from scheduling decision to data read.
[0055] Optionally, based on any of the above embodiments or optional methods, the high-speed interconnection protocol includes an address resolution sublayer, a cache access sublayer, and a memory access sublayer, wherein, The address resolution sublayer is used to parse the global logical address of the data to be processed and / or the target calculation parameters carried in the read request, and determine the storage range to which the global logical address belongs; when the storage range is the local storage space of the target processing unit, the target processing unit is controlled to read the data to be processed and / or the target calculation parameters locally; when the storage range is the local storage space of other processing units besides the target processing unit, the data to be processed and / or the target calculation parameters are routed to the target processing unit.
[0056] In some embodiments, the address resolution sublayer is a functional layer in the high-speed interconnect protocol responsible for address resolution and routing decisions. When the address resolution sublayer receives a read request initiated by a target processing unit, it extracts the global logical address from the read request and determines the storage range to which the global logical address belongs based on pre-configured address mapping rules. The address mapping rules for the global logical address space can be configured by the host processor during system initialization, dividing the global logical address space into multiple address segments, each corresponding to a storage range. For example, the global logical address space can be divided into a first address segment, a second address segment, a third address segment, and a fourth address segment. The first address segment corresponds to the target processing unit's own local storage space, the second address segment corresponds to the local storage space of other processing units, the third address segment corresponds to the storage space of the cache expansion device, and the fourth address segment corresponds to the host processor's storage space. The address resolution sublayer determines the storage range to which the address belongs by determining which address segment the global logical address in the read request falls into.
[0057] When the storage range is determined to be the target processing unit's own local storage space, the address resolution sublayer controls the target processing unit to complete the data reading locally, and the read data is directly returned to the computing module inside the target processing unit. When the storage range is determined to be the local storage space of another processing unit, the address resolution sublayer sends the read request to the corresponding processing unit via a high-speed interconnect protocol, and that processing unit reads the data locally and then sends it back to the target processing unit via the high-speed interconnect protocol, thus completing the data routing.
[0058] In some implementations, the address resolution sublayer function can be implemented by hardware routing circuitry or by software modules in the protocol stack. This disclosure does not limit the specific implementation method.
[0059] The cache access sub-protocol is used to read the data to be processed and / or the target calculation parameters and forward them to the target processing unit when the storage range is the storage space of the cache extension device.
[0060] In some embodiments, the cache access subprotocol is a protocol layer within the high-speed interconnect protocol responsible for handling data interaction with the cache extension device. When the address resolution sublayer determines that the storage range corresponding to the read request is the storage space of the cache extension device, it hands the read request over to the cache access subprotocol for processing. The cache access subprotocol sends the read request to the cache extension device according to the interaction specifications with the cache extension device. The cache extension device reads the corresponding data from its own storage space based on the global logical address in the read request and then sends the data back to the target processing unit via the cache access subprotocol.
[0061] Taking the CXL protocol as an example, the cache access sub-protocol corresponds to the CXL.cache sub-protocol within the CXL protocol. The CXL.cache sub-protocol maintains cache consistency between the cache extension device and the host processor. Under the CXL.cache sub-protocol, the cache extension device can be considered a remote cache for the target processing unit, and the target processing unit accesses data in the cache extension device in a manner similar to accessing its own local cache. It should be noted that cache access sub-protocols are not limited to the CXL.cache sub-protocol; other interconnect protocols that support processing units accessing external cache devices and maintaining cache consistency can also be used as cache access sub-protocols.
[0062] The memory access sub-protocol is used to read the data to be processed and / or the target calculation parameters and forward them to the target processing unit when the storage range is the storage space of the host processor.
[0063] In some embodiments, the memory access subprotocol is a protocol layer within the high-speed interconnect protocol responsible for handling data interaction with the host processor's storage space. When the address resolution sublayer determines that the storage range corresponding to the read request is the host processor's storage space, it hands the read request over to the memory access subprotocol for processing. The memory access subprotocol sends the read request to the host processor according to the interaction specifications between the memory access subprotocol and the host processor's storage space. The host processor reads the corresponding data from its own storage space based on the global logical address in the read request and then sends the data back to the target processing unit via the memory access subprotocol.
[0064] Taking the CXL protocol as an example, the memory access sub-protocol corresponds to the CXL.mem sub-protocol within the CXL protocol. The CXL.mem sub-protocol allows processing units to directly read and write to the host processor's storage space via memory access. Under the CXL.mem sub-protocol, the host processor's storage space can be considered a remote memory pool accessible to the processing unit. It should be noted that the memory access sub-protocol is not limited to the CXL.mem sub-protocol; other interconnect protocols that support processing units accessing the host processor's storage space can also be used as memory access sub-protocols.
[0065] In this way, the high-speed interconnect protocol resolves the global logical address in the read request and makes routing decisions through the address resolution sublayer. Based on the storage range, the read request is handed over to the cache access sub-protocol or the memory access sub-protocol for processing, so that the target processing unit can read data from different storage locations through a unified global logical address.
[0066] Optionally, based on any of the above embodiments or optional methods, the host processor 11 is further configured to: The load status of each processing unit is obtained, and the computing modules in the processing units with load status higher than a first preset threshold are migrated to the processing units with load status lower than a second preset threshold, and the computing resource mapping relationship is updated; wherein, the first preset threshold is greater than the second preset threshold. The access frequency of each calculation parameter is obtained, and calculation parameters whose access frequency is higher than a third preset threshold are migrated to the local storage space of the corresponding processing unit; calculation parameters whose access frequency is lower than the third preset threshold but higher than a fourth preset threshold are migrated to the storage space of the cache expansion device; calculation parameters whose access frequency is lower than the fourth preset threshold are migrated to the storage space of the host processor; and the data storage mapping relationship is updated based on the migration results of each calculation parameter.
[0067] In some embodiments, during system operation, the host processor can continuously or periodically monitor the load status of each processing unit and the access status of each computing parameter, and dynamically adjust computing and storage resources based on the monitoring results. This dynamic adjustment mainly includes two aspects: first, the migration of computing modules between processing units; and second, the migration of computing parameters between different storage tiers. These two aspects are described below.
[0068] For the migration of computing modules, the host processor obtains the load status of each processing unit. The load status reflects the current computational workload of the processing unit, and metrics for load status may include, but are not limited to, the computing resource utilization rate, the length of the pending task queue, and the number of computing tasks completed per unit time. The host processor compares the load status of each processing unit with preset thresholds. A first preset threshold is used to determine if a processing unit is under high load, and a second preset threshold is used to determine if a processing unit is under low load; the first preset threshold is greater than the second preset threshold. When the load status of a processing unit is higher than the first preset threshold, it indicates that the processing unit is currently overloaded. The host processor migrates at least one computing module from this processing unit to a processing unit with a load status lower than the second preset threshold to alleviate the computational pressure on the high-load processing unit. After the migration is complete, the host processor updates the computing resource mapping relationship, modifying the processing unit identifier corresponding to the migrated computing module to the new processing unit identifier. When a computing module is migrated from one processing unit to another, the corresponding computing parameters of that module can also be migrated accordingly. The specific migration strategy can be determined based on actual needs.
[0069] For the migration of computational parameters, the host processor obtains the access frequency of each computational parameter. Access frequency reflects how frequently a computational parameter has been read and used for computation by the processing unit recently. The statistical methods for access frequency may include, but are not limited to, counting the number of times a computational parameter is read within a preset time window, or calculating an access heat value based on the most recent access time. The host processor compares the access frequency of a computational parameter with preset third and fourth preset thresholds, where the third preset threshold is greater than the fourth preset threshold. When the access frequency of a computational parameter is higher than the third preset threshold, it indicates that the computational parameter is hot data and is frequently used. The host processor migrates this computational parameter to the local storage space of the corresponding processing unit so that the processing unit can access the computational parameter with lower latency. When the access frequency of a computational parameter is lower than the third preset threshold but higher than the fourth preset threshold, it indicates that the computational parameter is warm data, which may be used recently but not frequently. The host processor migrates this computational parameter to the storage space of the cache expansion device to save local storage space of the processing unit while ensuring a certain access speed. When the access frequency of a certain calculation parameter falls below a fourth preset threshold, it indicates that the parameter is cold data and has not been used for a long time. The host processor migrates this calculation parameter to the host processor's storage space to free up storage space in the cache expansion device for other warm or hot data. Based on the migration results of each calculation parameter, the host processor updates the data storage mapping relationship, modifying the storage location information corresponding to the migrated calculation parameter to the new storage location.
[0070] It should be noted that the specific values of the first, second, third, and fourth preset thresholds can be set and adjusted according to factors such as the actual hardware configuration of the system, model size, and performance requirements. This embodiment does not limit the specific values of each threshold. Furthermore, the host processor's migration operations of computing modules and parameters can be dynamically executed during system operation without stopping the currently running computing task, thereby achieving real-time adjustment and optimization of system resources.
[0071] In this way, the host processor can dynamically adjust the distribution of computing modules among processing units according to the load status of the processing units, thereby achieving load balancing among processing units and avoiding situations where some processing units are overloaded while others are idle. At the same time, the host processor can dynamically adjust the distribution of computing parameters among local storage space, cache expansion device storage space, and host processor storage space according to the access frequency of computing parameters. This ensures that frequently accessed hot data is stored close to the processing units, while infrequently accessed cold data is stored in large-capacity remote storage space, thereby improving data access efficiency and reducing data access latency with limited storage resources.
[0072] Corresponding to the heterogeneous computing data processing system described above, this invention also proposes a heterogeneous computing data processing method. Since the method embodiments of this invention correspond to the system embodiments described above, details not disclosed in the method embodiments can be referred to in the system embodiments described above, and will not be repeated here.
[0073] Figure 2 This is a schematic flowchart illustrating a data processing method for heterogeneous computing applied to a host processor, provided in an embodiment of this disclosure.
[0074] like Figure 2 As shown, the method includes steps 101-102.
[0075] Step 101: Based on the computing resource mapping relationship and the data storage mapping relationship, determine the target processing unit to which the target computing module corresponding to the data to be processed belongs, and the storage location of the data to be processed in the global logical address space; wherein, the local storage space of each processing unit, the storage space of the host processor and the storage space of each cache expansion device are all mapped to the global logical address space.
[0076] In some embodiments, the computing resource mapping relationship is used to record the correspondence between each processing unit and the loaded computing module, and the data storage mapping relationship is used to record the correspondence between data and its storage location in the global logical address space. After acquiring the data to be processed, the host processor determines that the data needs to be processed by the target computing module. Then, based on the computing resource mapping relationship, it determines which processing unit the target computing module is currently loaded onto; this processing unit is the target processing unit. Simultaneously, the host processor determines the current storage location of the data to be processed in the global logical address space based on the data storage mapping relationship. The global logical address space is an address space that uniformly addresses multiple physically dispersed storage resources in the system. The local storage space of each processing unit, the storage space of the host processor, and the storage space of each cache expansion device are all mapped to the global logical address space, and each storage location has a unique address identifier in the global logical address space.
[0077] Step 102: Based on the relationship between the storage location of the data to be processed in the global logical address space and the local storage space of the target processing unit, a scheduling instruction is generated and sent to the target processing unit so that the target processing unit responds to the scheduling instruction, reads the data to be processed based on the global logical address space, and calls the target computing module to process the data to be processed.
[0078] In some embodiments, after determining the storage location of the target processing unit and the data to be processed, the host processor compares the storage location of the data to be processed with the local storage space of the target processing unit, and generates a corresponding scheduling instruction based on the comparison result. The scheduling instruction is used to instruct the target processing unit from which storage location to read the data to be processed and how to execute the computation task. The host processor sends the generated scheduling instruction to the target processing unit. After receiving the scheduling instruction, the target processing unit reads the data to be processed based on the global logical address space according to the instructions in the scheduling instruction, and calls the target computing module loaded by itself to perform computation processing on the data to be processed, and obtain the data processing result.
[0079] In summary, the heterogeneous computing data processing method provided in this disclosure can determine the target processing unit to which the target computing module belongs and the storage location of the data to be processed in the global logical address space by the host processor based on the computing resource mapping relationship and the data storage mapping relationship, and generate scheduling instructions so that the target processing unit reads the data to be processed based on the global logical address space and calls the target computing module for processing, thereby reducing cross-processing unit data transmission caused by the inconsistency between the data to be processed and the processing unit where the target computing module is located, and reducing data processing latency and system communication overhead.
[0080] Figure 3 This is a schematic flowchart illustrating a data processing method for heterogeneous computing applied to a target processing unit, provided in an embodiment of this disclosure.
[0081] like Figure 3 As shown, the method includes steps 201-203.
[0082] Step 201: Receive scheduling instructions sent by the host processor; wherein the scheduling instructions are generated by the host processor based on the computing resource mapping relationship and the data storage mapping relationship; the local storage space of each processing unit, the storage space of the host processor, and the storage space of each cache expansion device are all mapped to the global logical address space.
[0083] In some embodiments, the target processing unit receives a scheduling instruction sent by the host processor. This scheduling instruction is generated by the host processor after determining, based on the computing resource mapping relationship and the data storage mapping relationship, the target processing unit to which the target computing module corresponding to the data to be processed belongs, and the storage location of the data to be processed in the global logical address space. The scheduling instruction carries or implicitly indicates the address information of the data to be processed in the global logical address space, as well as the identification information of the target computing module to be invoked.
[0084] Step 202: In response to the scheduling instruction, read the data to be processed based on the global logical address space.
[0085] In some embodiments, in response to a received scheduling instruction, the target processing unit reads the data to be processed from the global logical address space via a high-speed interconnect protocol, based on the address information carried or implicitly indicated in the scheduling instruction. Since the local storage spaces of each processing unit, the host processor's storage space, and the storage spaces of each cache expansion device are all mapped to the global logical address space, when initiating a read operation, the target processing unit only needs to provide the address of the data to be processed in the global logical address space; it does not need to know which physical storage device the data to be processed is actually stored in. The actual storage location of the data to be processed may be the target processing unit's own local storage space, the local storage space of other processing units, the storage space of the cache expansion device, or the host processor's storage space. The address resolution sublayer in the high-speed interconnect protocol resolves the global logical address in the read request, determines the storage range corresponding to the address, and selects the corresponding data read path based on the storage range: when the storage range is the local storage space of the target processing unit itself, it reads directly locally; when the storage range is the local storage space of another processing unit, the read request is routed to the corresponding processing unit and the data is returned; when the storage range is the storage space of the cache extension device, the data is read and forwarded through the cache access sub-protocol; when the storage range is the storage space of the host processor, the data is read and forwarded through the memory access sub-protocol.
[0086] Step 203: Call the target calculation module to process the data to be processed and obtain the data processing result.
[0087] In some embodiments, after reading the data to be processed, the target processing unit calls the corresponding target computing module loaded locally, according to the target computing module identifier indicated in the scheduling instruction, to perform calculations on the data to be processed and obtain the data processing result. The calculation parameters of the target computing module may be local to the target processing unit or in other storage locations. When the calculation parameters are not local to the target processing unit, the target processing unit also reads the target calculation parameters based on the global logical address space, and the reading process is the same as the process of reading the data to be processed. After obtaining the data to be processed and the target calculation parameters, the target processing unit calls the target computing module to perform calculations and obtain the data processing result.
[0088] By using the above method, cross-memory data reading is completed through the global logical address space, reducing intermediate steps in data transfer across processing units and lowering data processing latency.
[0089] Corresponding to the data processing method for heterogeneous computing described above, this invention also proposes a data processing apparatus for heterogeneous computing. Since the apparatus embodiments of this invention correspond to the method embodiments described above, details not disclosed in the apparatus embodiments can be referred to in the method embodiments described above, and will not be repeated here.
[0090] Figure 4 This is a schematic diagram of the structure of a data processing device for heterogeneous computing configured on a host processor, as provided in an embodiment of this disclosure. Figure 4 As shown, it includes: The determining unit 41 is used to determine the target processing unit to which the target computing module corresponding to the data to be processed belongs, and the storage location of the data to be processed in the global logical address space, based on the computing resource mapping relationship and the data storage mapping relationship; wherein, the local storage space of each processing unit, the storage space of the host processor and the storage space of each cache expansion device are all mapped to the global logical address space. The generation unit 42 is configured to generate a scheduling instruction based on the relationship between the storage location of the data to be processed in the global logical address space and the local storage space of the target processing unit, and send the scheduling instruction to the target processing unit so that the target processing unit responds to the scheduling instruction, reads the data to be processed based on the global logical address space, and calls the target computing module to process the data to be processed.
[0091] The heterogeneous computing data processing device provided in this embodiment can determine the target processing unit to which the target computing module belongs and the storage location of the data to be processed in the global logical address space by the host processor according to the computing resource mapping relationship and the data storage mapping relationship, and generate scheduling instructions so that the target processing unit reads the data to be processed based on the global logical address space and calls the target computing module for processing, thereby reducing cross-processing unit data transmission caused by the inconsistency between the data to be processed and the processing unit where the target computing module is located, and reducing data processing latency and system communication overhead.
[0092] Figure 5 This is a schematic diagram of the structure of a heterogeneous computing data processing device configured in a target processing unit, as provided in an embodiment of this disclosure. Figure 5 As shown, it includes: The receiving unit 51 is used to receive scheduling instructions sent by the host processor; wherein the scheduling instructions are generated by the host processor based on the computing resource mapping relationship and the data storage mapping relationship; the local storage space of each processing unit, the storage space of the host processor and the storage space of each cache expansion device are all mapped to the global logical address space; Reading unit 52 is used to read data to be processed based on the global logical address space in response to the scheduling instruction; The processing unit 53 is used to call the target computing module to process the data to be processed and obtain the data processing result.
[0093] It should be noted that the foregoing explanation of the method embodiments also applies to the apparatus of the embodiments of this disclosure, and the principle is the same. Therefore, the embodiments of this disclosure are not limited thereto.
[0094] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0095] Figure 6 A schematic block diagram of an example electronic device 900 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0096] like Figure 6 As shown, the electronic device 900 includes a computing unit 901, which can perform various appropriate actions and processes based on a computer program stored in ROM (Read-Only Memory) 902 or a computer program loaded from storage unit 908 into RAM (Random Access Memory) 903. The RAM 903 can also store various programs and data required for the operation of the electronic device 900. The computing unit 901, ROM 902, and RAM 903 are interconnected via bus 904. An I / O (Input / Output) interface 905 is also connected to bus 904.
[0097] Multiple components in electronic device 900 are connected to I / O interface 905, including: input unit 906, such as keyboard, mouse, etc.; output unit 907, such as various types of displays, speakers, etc.; storage unit 908, such as disk, optical disk, etc.; and communication unit 909, such as network card, modem, wireless transceiver, etc. Communication unit 909 allows electronic device 900 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0098] The computing unit 901 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, CPUs (Central Processing Units), GPUs (Graphics Processing Units), various special-purpose AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, DSPs (Digital Signal Processors), and any suitable processor, controller, microcontroller, etc. The computing unit 901 performs the various methods and processes described above, such as heterogeneous computing data processing methods. For example, in some embodiments, heterogeneous computing data processing methods can be implemented as computer software programs tangibly contained in a machine-readable medium, such as storage unit 908. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 900 via ROM 902 and / or communication unit 909. When the computer program is loaded into RAM 903 and executed by the computing unit 901, one or more steps of the methods described above can be performed. Alternatively, in other embodiments, computing unit 901 may be configured to perform the aforementioned heterogeneous computing data processing method by any other suitable means (e.g., by means of firmware).
[0099] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application-Specific Standard Products), SOCs (System-on-Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0100] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0101] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, RAM, ROM, EPROM (Electrically Programmable Read-Only Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0102] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0103] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include LANs (Local Area Networks), WANs (Wide Area Networks), the Internet, and blockchain networks.
[0104] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service system that addresses the shortcomings of traditional physical hosts and VPS (Virtual Private Server) services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers incorporating blockchain technology.
[0105] It's important to note that artificial intelligence (AI) is the study of enabling computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing. AI software technologies primarily include computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graph technologies.
[0106] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this application can be achieved, and this is not limited herein.
[0107] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A heterogeneous computing data processing system, characterized in that, include: The system includes a host processor, at least two processing units, and at least one cache expansion device, wherein the local storage space of each processing unit, the storage space of the host processor, and the storage space of each cache expansion device are all mapped to a global logical address space. The host processor is configured to determine the target processing unit to which the target computing module corresponding to the data to be processed belongs, and the storage location of the data to be processed in the global logical address space, based on the computing resource mapping relationship and the data storage mapping relationship, and generate a scheduling instruction; and send the scheduling instruction to the target processing unit. The target processing unit is configured to respond to the scheduling instruction, read the data to be processed based on the global logical address space, call the target computing module to process the data to be processed, and obtain the data processing result.
2. The system according to claim 1, characterized in that, The host processor is used for: The target computing module is determined according to the type of the data to be processed. The target processing unit to which the target computing module belongs is determined based on the computing resource mapping relationship; Based on the data storage mapping relationship, the storage location of the data to be processed in the global logical address space and the storage location of the target calculation parameters of the target calculation module in the global logical address space are determined respectively. The scheduling instruction is generated based on the correspondence between the storage location of the data to be processed and the local storage space of the target processing unit, and the correspondence between the storage location of the target calculation parameters and the local storage space of the target processing unit.
3. The system according to claim 2, characterized in that, The step of generating the scheduling instruction based on the correspondence between the storage location of the data to be processed and the local storage space of the target processing unit, and the correspondence between the storage location of the target calculation parameters and the local storage space of the target processing unit, includes: When both the data to be processed and the target calculation parameters are stored in the local storage space of the target processing unit, a local calculation scheduling instruction is generated. When the data to be processed and / or the target calculation parameters are not stored in the local storage space of the target processing unit, a cross-storage scheduling instruction is generated.
4. The system according to claim 3, characterized in that, The target processing unit is further configured to, in response to the local computing scheduling instruction or the cross-storage scheduling instruction, initiate a read request to read the data to be processed and / or the target computing parameters through a high-speed interconnect protocol.
5. The system according to claim 4, characterized in that, The high-speed interconnection protocol includes an address resolution sublayer, a cache access sublayer, and a memory access sublayer, wherein... The address resolution sublayer is used to parse the global logical address of the data to be processed and / or the target calculation parameters carried in the read request, and determine the storage range to which the global logical address belongs; when the storage range is the local storage space of the target processing unit, the target processing unit is controlled to read the data to be processed and / or the target calculation parameters locally; when the storage range is the local storage space of other processing units besides the target processing unit, the data to be processed and / or the target calculation parameters are routed to the target processing unit. The cache access sub-protocol is used to read the data to be processed and / or the target calculation parameters and forward them to the target processing unit when the storage range is the storage space of the cache extension device. The memory access sub-protocol is used to read the data to be processed and / or the target calculation parameters and forward them to the target processing unit when the storage range is the storage space of the host processor.
6. The system according to any one of claims 1-5, characterized in that, The host processor is also used for: The load status of each processing unit is obtained, and the computing modules in the processing units with load status higher than a first preset threshold are migrated to the processing units with load status lower than a second preset threshold, and the computing resource mapping relationship is updated; wherein, the first preset threshold is greater than the second preset threshold. The access frequency of each calculation parameter is obtained, and calculation parameters whose access frequency is higher than a third preset threshold are migrated to the local storage space of the corresponding processing unit; calculation parameters whose access frequency is lower than the third preset threshold but higher than a fourth preset threshold are migrated to the storage space of the cache expansion device; calculation parameters whose access frequency is lower than the fourth preset threshold are migrated to the storage space of the host processor; and the data storage mapping relationship is updated based on the migration results of each calculation parameter.
7. A data processing method for heterogeneous computing, characterized in that, The method is applied to a host processor and includes: Based on the mapping relationship between computing resources and data storage, the target processing unit to which the target computing module corresponding to the data to be processed belongs, and the storage location of the data to be processed in the global logical address space are determined; wherein, the local storage space of each processing unit, the storage space of the host processor, and the storage space of each cache expansion device are all mapped to the global logical address space; Based on the relationship between the storage location of the data to be processed in the global logical address space and the local storage space of the target processing unit, a scheduling instruction is generated and sent to the target processing unit so that the target processing unit responds to the scheduling instruction, reads the data to be processed based on the global logical address space, and calls the target computing module to process the data to be processed.
8. A data processing method for heterogeneous computing, characterized in that, The method is applied to a target processing unit, including: The system receives scheduling instructions sent by the host processor; wherein the scheduling instructions are generated by the host processor based on the mapping relationship between computing resources and data storage; the local storage space of each processing unit, the storage space of the host processor, and the storage space of each cache expansion device are all mapped to the global logical address space. In response to the scheduling instruction, the data to be processed is read based on the global logical address space; The target calculation module is invoked to process the data to be processed, and the data processing result is obtained.
9. An electronic device, characterized in that, include: At least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method of any one of claims 7 or 8.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method of any one of claims 7 or 8.
