A memory interaction method, system, medium and computing device
By dividing the calculator's memory access requests into non-interactive and interactive conflict groups, and dispatching them in parallel, combined with the one-hot encoding bitmap and token mechanism, the problem of clock cycle loss and slow interaction speed when multiple calculators access the memory module at the same time is solved. problem, improving interaction efficiency.
Patent Information
- Application Number
- CN202410453870.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-16
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-04-16
AI Technical Summary
In the field of computer communications, when multiple calculators access memory modules at the same time, the existing technology often uses atomic transmission, polling transmission or arbitration transmission, resulting in clock cycle loss and slow interaction speed.
This paper proposes a memory interaction method. By obtaining the memory access requests of each target calculator, it divides them into non-interactive conflict groups and interactive conflict groups, and selects memory access requests to form dispatch groups according to preset conditions to achieve parallel dispatch. Utilize One-hot encoded bitmaps determine data return routes, and buffer status is managed through a token mechanism to avoid congestion.
Maximize the number of memory access requests in each dispatch group without increasing conflicts, reduce the waste of memory pool clock cycles, and improve the interaction speed.
Smart Images

Figure CN118331534B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer communications, and in particular to a memory interaction method, system, medium and computing device. Background Art
[0002] In the field of computer communication, the calculator and memory module in the computer often need to interact, such as when the calculator requests to access the memory module, and the memory module feeds back the requested data to the calculator. At present, in the prior art, when multiple calculators access the memory module at the same time, atomic sending, round-robin sending or arbitration sending are often used. In the round-robin sending, access requests are sent one by one in the order in which the multiple calculators send access requests. Atomic sending is to wait for the data requested by the access request that has been sent to return before sending the next access request. Arbitration sending is to send the access requests of each calculator in order according to the priority of each calculator. In the prior art, when multiple calculators access the memory module at the same time, whether it is atomic sending, round-robin sending or arbitration sending, clock cycles are lost and the interaction speed is slow. Summary of the invention
[0003] The main purpose of this application is to propose a memory interaction method, system, medium and computing device, which aims to solve the problem of clock cycle loss and slow interaction speed when a calculator and a memory module interact in the background technology.
[0004] To achieve the above purpose, the present application proposes a memory interaction method, comprising:
[0005] Obtaining memory access requests of each target calculator, the target calculator comprising each calculator having memory access requirements in the same clock cycle;
[0006] Divide each memory access request to obtain at least one non-interaction conflict group and / or an interaction conflict group, wherein any memory access request in the non-interaction conflict group does not have an interaction conflict with other memory access requests for accessing the same memory pool, and each memory access request in the same interaction conflict group has an interaction conflict for accessing the same memory pool;
[0007] Memory access requests are selected from at least one non-interactive conflict group and / or interactive conflict group according to preset conditions to form each dispatch group; the preset conditions include: selecting all memory access requests in the non-interactive conflict group, and selecting one memory access request from each interactive conflict group to form a dispatch group; and selecting one undispatched memory access request from each interactive conflict group in other dispatch groups each time, until all memory access requests in each interactive conflict group are selected; wherein, in each dispatch group, the memory access requests selected from each interactive conflict group are different from each other;
[0008] Based on each of the dispatch groups, all access requests in a dispatch group are selected each time and dispatched to the memory module in parallel.
[0009] In an embodiment of the present application, each of the memory access requests includes a memory pool code to which it requests access, and the memory access requests are divided to obtain at least one non-interaction conflict group and / or an interaction conflict group, including:
[0010] Classify memory access requests with the same memory pool code into the same interactive conflict group;
[0011] Memory access requests that do not have the same memory pool encoding as other memory access requests are grouped into non-interaction conflict groups.
[0012] In the embodiment of the present application, when the interaction request is dispatched to the memory module, the memory interaction method further includes:
[0013] A one-hot encoding bitmap is generated for each memory pool requested to be accessed by each target computer, and each one-hot encoding bitmap can indicate a memory pool code requested to be accessed by the target computer.
[0014] In an embodiment of the present application, the memory interaction method further includes:
[0015] Receiving request data returned by each of the memory pools;
[0016] Determine a target calculator corresponding to the request data received from each memory pool based on the one-hot encoding bitmap corresponding to each of the memory pools;
[0017] The request data received from each memory pool is dispatched to the corresponding target computer.
[0018] In the embodiment of the present application, before dispatching the request data received from each memory pool to the corresponding target computer, the memory interaction method further includes:
[0019] Determining the number of one-hot encoded bitmaps corresponding to the target calculator;
[0020] Determining whether requested data of each memory pool requested to be accessed by the target calculator is complete based on the number of one-hot encoded bitmaps;
[0021] If complete, they are all sent to the target computer; if incomplete, they are all sent to the target computer after the request data of each memory pool requested to be accessed by the target computer are complete.
[0022] In the embodiment of the present application, before dispatching the interaction request to the memory module, the memory interaction method further includes:
[0023] determining whether a first token is present;
[0024] If so, a memory access request is dispatched; if not, the memory access request is dispatched when a first token is available; wherein the first token is obtained based on the buffer status of the memory module.
[0025] In the embodiment of the present application, before receiving the request data returned by each of the memory pools, the memory interaction method further includes:
[0026] determining whether a second token is present;
[0027] If so, the memory module is allowed to send the request data; if not, the memory module is allowed to send the request data when a second token is available; wherein the second token is obtained based on the buffer status of the request data receiving end.
[0028] The present application also proposes a memory interaction system, comprising:
[0029] A first distribution module, the first distribution module comprising an acquisition unit and a first processing unit;
[0030] The acquisition unit is used to acquire the memory access request of each target calculator, and the target calculator includes each calculator having the memory access demand in the same clock cycle;
[0031] The first processing unit is used to divide the memory access requests to obtain at least one non-interaction conflict group and / or an interaction conflict group, wherein any memory access request in the non-interaction conflict group does not have an interaction conflict with other memory access requests for accessing the same memory pool, and each memory access request in the same interaction conflict group has an interaction conflict for accessing the same memory pool;
[0032] Select memory access requests from at least one of the non-interactive conflict groups and / or the interactive conflict groups to form respective dispatch groups according to preset conditions, and dispatch access requests to the memory module based on the respective dispatch groups; wherein the preset conditions include: selecting all memory access requests in the non-interactive conflict groups, and selecting one memory access request from each interactive conflict group to form a dispatch group, and selecting one unassigned memory access request from each interactive conflict group in other dispatch groups each time, until all memory access requests in each interactive conflict group are selected; wherein in each dispatch group, the memory access requests selected from each interactive conflict group are different from each other;
[0033] Based on each of the dispatch groups, all access requests in a dispatch group are selected each time and dispatched to the memory module in parallel.
[0034] In the embodiment of the present application, each of the memory access requests includes a memory pool code to which it requests access, and the first processing unit is further configured to:
[0035] Classify memory access requests with the same memory pool code into the same interactive conflict group;
[0036] Memory access requests that do not have the same memory pool encoding as other memory access requests are grouped into non-interaction conflict groups.
[0037] In the embodiment of the present application, the first processing unit is further configured to:
[0038] A one-hot encoding bitmap is generated for each memory pool requested to be accessed by each target computer, and each one-hot encoding bitmap can indicate a memory pool code requested to be accessed by the target computer.
[0039] In the embodiment of the present application, the memory interaction system further includes a second dispatching module, and the second dispatching module includes a receiving unit and a second processing unit:
[0040] The receiving unit is used to receive the request data returned by each of the memory pools, and receive the one-hot encoding bitmap corresponding to each target calculator sent by the first dispatching module;
[0041] The second processing unit is further used to determine the target calculator corresponding to the request data received from each memory pool based on the one-hot encoding bitmap corresponding to each memory pool;
[0042] The request data received from each memory pool is dispatched to the corresponding target computer.
[0043] In the embodiment of the present application, the second processing unit is further configured to:
[0044] Determining the number of one-hot encoded bitmaps corresponding to the target calculator;
[0045] Based on the number of the one-hot encoding bitmaps, determine whether the request data of each memory pool requested to be accessed by the target computer is complete; if complete, distribute them to the target computer together; if incomplete, wait until the request data of each memory pool requested to be accessed by the target computer is complete before distributing them to the target computer together.
[0046] In the embodiment of the present application, the first processing unit is further used to: receive a first token issued by the memory module based on its own buffer state;
[0047] Before dispatching the access request, the first processing unit is further configured to:
[0048] Determine whether there is a first token; if so, issue a memory access request; if not, wait until the first token is available before issuing the memory access request.
[0049] In the embodiment of the present application, the second processing unit is further used to: issue a second token to the memory module based on its own buffer state;
[0050] Before sending the request data to the receiving unit, the memory module is further configured to:
[0051] Determine whether the second token is present; if so, send the request data; if not, wait until the second token is present before sending the request data.
[0052] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements any of the above-described methods when executed by a processor.
[0053] An embodiment of the present application further provides a computing device, the computing device comprising a processor, the processor being configured to implement any of the above-described methods when executing a computer program stored in a memory.
[0054] In an embodiment of the present application, each memory access request in the same clock cycle is divided into an interactive conflict group and / or a non-interactive conflict group. Before dispatching, memory access requests are first selected from each interactive conflict group and / or non-interactive conflict group according to preset conditions to form a dispatch group, and then access requests are sent to the memory module in parallel based on each dispatch group. Among them, when dividing the dispatch group, all memory access requests are selected from the non-interactive conflict group and a different memory access request is selected from each interactive conflict group to form a dispatch group, and in other dispatch groups, a different memory access request is selected from each interactive conflict group each time until all memory access requests in each interactive conflict group are selected. This memory interaction method can maximize the number of memory access requests in each dispatch group without conflict when dividing the dispatch group. Then, each time the dispatch is performed in parallel based on a dispatch group, the waste of memory pool clock cycles can be minimized to the greatest extent, thereby improving the interaction speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.
[0056] Figure 1A step diagram of a memory interaction method in an embodiment of the present application;
[0057] Figure 2 is a flow chart of a memory interaction method in an embodiment of the present application;
[0058] Figure 3 is a module diagram of a memory interaction system in an embodiment of the present application;
[0059] Figure 4 A module diagram of a computer-readable storage medium in an embodiment of the present application;
[0060] Figure 5 A module diagram of a computing device in one embodiment of the present application.
[0061] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0062] The principles and spirit of the present application will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present application, and are not intended to limit the scope of the present application in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0063] Those skilled in the art know that the embodiments of the present application can be implemented as a system, device, method or computer program product. Therefore, the present disclosure can be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0064] According to the implementation manner of the present application, a memory interaction method, system, medium and computing device are proposed.
[0065] It should be understood herein that any number of elements in the drawings is for illustration rather than limitation, and any naming is only for distinction rather than having any limiting meaning.
[0066] The principles and spirit of the present application are explained in detail below with reference to several representative implementations of the present application.
[0067] Exemplary Methods
[0068] like Figure 1 As shown, in an embodiment of the present application, a memory interaction method is proposed, and the memory interaction method includes the following steps S100-S400:
[0069] Step S100: Obtaining memory access requests of each target calculator, where the target calculators include each calculator having memory access requirements in the same clock cycle.
[0070] like Figure 2 As shown, in the embodiment of the present application, the calculator is a unit or module with computing functions in a computer system, such as a CPU, GPU, etc. The calculator can be a core or a thread in a CPU or GPU, and the calculator can include multiple. The storage module can be a storage unit that can be read / written, such as a ROM, RAM, etc. A memory module can be planned into multiple memory pools according to fixed-size blocks, and each memory pool can be read / written by a calculator within one clock cycle.
[0071] In the embodiment of the present application, the target calculator includes each calculator that issues an access request to the memory module in the same clock cycle, and the target calculator may be one or more.
[0072] In an embodiment of the present application, an access request is issued by a calculator. Each access request issued by a calculator includes the serial numbers of each memory pool accessed by the calculator. That is, based on the access request, it is possible to clearly know how many memory pools the calculator wants to access and the serial numbers of each memory pool.
[0073] like Figure 2 , Figure 3 As shown, in an embodiment of the present application, each calculator can send its own access request to the first dispatch module, and the first dispatch module includes an acquisition unit, which can receive the memory access request sent by each calculator. When each calculator has a memory access demand, it sends its own memory access request to the acquisition unit, and the acquisition unit determines the target calculator based on the clock cycle of the memory access request sent by each calculator. For example, in the current clock cycle, calculators A, B, and C all send memory access requests to the acquisition unit, then calculators A, B, and C are all target calculators.
[0074] Step S200: Divide each of the memory access requests to obtain at least one group without interactive conflict and / or a group with interactive conflict, wherein any memory access request in the group without interactive conflict does not have an interactive conflict with other memory access requests for accessing the same memory pool, and each memory access request in the same group with interactive conflict has an interactive conflict for accessing the same memory pool.
[0075] Continue to refer to Figure 2 , Figure 3 In an embodiment of the present application, the first dispatch module also includes a first processing unit, which can be a finite state machine. After the acquisition unit receives the memory access requests of each target calculator, the first processing unit divides the access requests of each target calculator.
[0076] In the embodiment of the present application, the division can be performed through the following steps S210-S220:
[0077] Step S210: grouping memory access requests with the same memory pool code into the same interactive conflict group.
[0078] In the embodiment of the present application, it is assumed that the memory module includes 10 memory pools numbered ①, ②, ③, ..., ⑩, and the target computers include: A, B, C, D, E, F, G, and send memory access requests a, b, c, d, e, f, g respectively. The memory pool numbers requested to be accessed by each memory access request are as follows:
[0079] Memory access request a: ①, ②;
[0080] Memory access request b: ②, ③;
[0081] Memory access request c: ③, ④, ⑤;
[0082] Memory access request d: ④, ⑤, ⑥;
[0083] Memory access request e: ④, ⑤, ⑦;
[0084] Memory access request f:⑧;
[0085] Memory access request g:⑨.
[0086] Then, in step S210, it can be seen that both memory access requests a and b request to access memory pool ②, and a memory pool can only be accessed (read / written once) by one computer in one clock cycle, that is, memory access requests a and b have a conflict in accessing the same memory pool ②, so memory access requests a and b can be divided into a group with interactive conflict. Similarly, memory b and c have an interactive conflict in accessing the same memory pool ③, and memory access requests b and c can be divided into a group with memory interactive conflict; memory access requests c, d, and e have a conflict in accessing the same memory pool ④ and ⑤, and memory access requests c, d, and e can be divided into a group with interactive conflict.
[0087] Step S220: grouping memory access requests that do not have the same memory pool code as other memory access requests into a non-interaction conflict group.
[0088] From the memory pool numbers of the above memory access requests, it can be seen that memory access request f requests access to memory pool ⑧, and any other memory access request except memory access request f does not request access to memory pool ⑧, that is, there is no access conflict between memory access request f and any other memory access request. Similarly, there is no access conflict between memory access request g and any other memory access request. Therefore, memory access requests f and g can be divided into a non-interaction conflict group.
[0089] Thus, after the above steps S210-220, the following interactive conflict groups 1, 2, 3 and non-interactive conflict group can be obtained:
[0090] There is interactive conflict group 1: memory access request a, memory access request b;
[0091] There is interactive conflict group 2: memory access request b, memory access request c;
[0092] There is interactive conflict group 3: memory access request c, memory access request d, memory access request e;
[0093] Non-interaction conflict group: memory access request f, memory access request g.
[0094] In addition, it should be noted that in the embodiment of the present application, the interactive conflict groups 1, 2, 3 and the non-interactive conflict group are divided. In other embodiments, all memory access requests may have no interactive conflict, that is, there is no interactive conflict group. Of course, in other embodiments, all memory access requests may have interactive conflicts, that is, there is no non-interactive conflict group.
[0095] Step S300: Select memory access requests from at least one of the non-interactive conflict groups and / or the interactive conflict groups to form each dispatch group according to preset conditions; the preset conditions include: selecting all memory access requests in the non-interactive conflict groups, and selecting one memory access request from each interactive conflict group to form a dispatch group; and selecting one undispatched memory access request from each interactive conflict group in other dispatch groups each time until all memory access requests in each interactive conflict group are selected; wherein, in each dispatch group, the memory access requests selected from each interactive conflict group are different from each other.
[0096] In step S200, interactive conflict groups 1, 2, 3 and non-interactive conflict groups are determined, wherein each memory access request in the non-interactive conflict group has no access conflict with any other access request, so all of them can be formed into a dispatch group for parallel dispatch. Each memory access request in each interactive conflict group has a memory access conflict, so one memory access request can be selected from each interactive conflict group to form a dispatch group together with all the memory access requests in the non-interactive conflict group for parallel dispatch. It should be noted that the memory access requests selected from each interactive conflict group need to be different from each other. For example, for memory access request b, it is included in both interactive conflict group 1 and interactive conflict group 2. Therefore, if memory access request b is selected in interactive conflict group 1, memory access request c can only be selected in interactive conflict group 2.
[0097] The specific distribution groups are as follows:
[0098] The first dispatch group includes the following memory access requests: a, c, d, f, g.
[0099] After dividing the first dispatch group, there is a remaining memory access request b in the interactive conflict group 1, a remaining memory access request b in the interactive conflict group 2, and a remaining memory access request c and e in the interactive conflict group 3. Then the second dispatch group can select the memory access request b in the first interactive conflict group. There is only a memory access request b left in the interactive conflict group 2, but it has been selected from the interactive conflict group 1, so there is no need to select it. The access request c in the interactive conflict group 3 has been selected in the first dispatch, so e can be selected. That is, the second dispatch group includes the following memory access requests: b, e.
[0100] Step S400: Based on each of the dispatch groups, all access requests in a dispatch group are selected each time and dispatched to the memory module in parallel.
[0101] In step S300, a first dispatch group and a second dispatch group are obtained. In step S400, each memory access request in the first dispatch group can be dispatched in parallel, and each memory access request in the second dispatch group can be dispatched in parallel. It should be noted that the technical solution of the present application does not limit whether each memory access request in the first dispatch group is preferentially dispatched, or each access request in the second dispatch group is preferentially dispatched.
[0102] In an embodiment of the present application, each memory access request in the same clock cycle is divided into an interactive conflict group and / or a non-interactive conflict group. Before dispatching, memory access requests are first selected from each interactive conflict group and / or non-interactive conflict group according to preset conditions to form a dispatch group, and then access requests are sent to the memory module in parallel based on each dispatch group. Among them, when dividing the dispatch group, all memory access requests are selected from the non-interactive conflict group, and a different memory access request is selected from each interactive conflict group to form a dispatch group, and in other dispatch groups, a different memory access request is selected from each interactive conflict group each time until all memory access requests in each interactive conflict group are selected. This memory interaction method can maximize the number of memory access requests in each dispatch group without conflict when dividing the dispatch group. Then, each time the dispatch is performed in parallel based on a dispatch group, the waste of memory pool clock cycles can be minimized to the greatest extent, thereby improving the interaction speed.
[0103] In an embodiment of the present application, when an interaction request is dispatched to the memory module, the memory interaction method further includes: generating a one-hot encoding bitmap for each memory pool requested to be accessed by each target calculator, each one-hot encoding bitmap being able to indicate a memory pool code requested to be accessed by the target calculator.
[0104] Among them, when the first processing unit dispatches a memory access request, a unique hot coding bitmap is generated for each memory pool corresponding to each calculator. For example, the memory access request a of calculator A requests to access memory pools ① and ②, then the first processing unit generates two unique hot coding bitmaps for calculator A accordingly, and the two unique hot coding bitmaps light up the two memory pool codes to be accessed by the calculator respectively, and do not light up the other memory pool codes, that is, each unique hot coding bitmap has a unique corresponding relationship with the calculator and the memory pool code it accesses. Then, before dispatching the memory access request, a unique hot coding bitmap is generated for each memory pool requested to be accessed by each target calculator, so that the return route of the subsequent request data returned from each memory pool can be easily determined. For example, the memory access request a of calculator A requests to access memory pools ① and ②, then a unique hot coding bitmap is generated for memory pools ① and ② respectively, and the unique hot coding bitmap corresponding to memory pool ① is: 10000000000; the unique hot coding bitmap corresponding to memory pool ② is: 01000000000. Among them, the one-hot encoding bitmap is a number composed of only 0 and 1. The first bit in "10000000000" is "1", and the others are "0", which means that the memory pool numbered "①" is to be accessed. The second bit in "01000000000" is "1", and the others are "0", which means that the memory pool numbered "②" is to be accessed. For calculator A, its corresponding one-hot encoding bitmap includes "10000000000" and "01000000000". When the request data returned by memory pool ① or ② is received, the calculator corresponding to the request data can be determined to be calculator A according to the one-hot encoding bitmap corresponding to memory pool ① and ②.
[0105] like Figure 2 , Figure 3 As shown, in an embodiment of the present application, a second dispatch module can also be set, and the second dispatch module includes a receiving unit and a second processing unit, wherein the receiving unit can receive the request data returned from each memory pool of the memory module, and when any memory pool returns a request data, the second processing unit can determine the number of the memory pool. In addition, the first dispatch module can send the unique hot coding bitmap corresponding to each calculator to the second dispatch module, so that when the receiving unit receives the request data of each memory pool, based on the matching of the memory pool number and the unique hot coding bitmap, it can be determined that the request data returned by the memory pool corresponds to which calculator is requested. In an embodiment of the present application, a unique hot coding bitmap is generated for each memory pool requested by the calculator, and a corresponding relationship between the calculator, the memory pool, and the unique hot coding bitmap is formed, so that when the request data of each memory pool is received, the calculator corresponding to each request data can be determined based on the unique hot coding bitmap corresponding to each memory pool, and then the request data of each memory pool can be diverted and dispatched to the corresponding calculator.
[0106] It should be noted that when the second processing unit dispatches request data, it can directly dispatch it to the corresponding calculator after receiving the request data sent by each memory pool, such as directly dispatching it to calculator A after receiving the request data returned by memory pool ①; it can also dispatch the complete request data to a certain calculator separately after the request data corresponding to the calculator is complete, such as dispatching them to calculator A after receiving the request data of memory pools ① and ②; it can also dispatch to each calculator after receiving all the request data in the current clock cycle, such as dispatching to each calculator after receiving the request data corresponding to each calculator in the first dispatch group. Among them, dispatching based on a certain memory pool alone can improve the interaction speed, while dispatching based on a certain calculator, or dispatching together after receiving all the request data in the current clock cycle can reduce the error rate.
[0107] For example, in the embodiment of the present application, before dispatching the request data received from each memory pool to the corresponding target computer, the following steps are also included:
[0108] Determining the number of one-hot encoded bitmaps corresponding to the target calculator;
[0109] Based on the number of the one-hot encoding bitmaps, it is determined whether the request data of each memory pool requested to be accessed by the target computer is complete; if complete, the request data are distributed to the target computer together; if incomplete, the request data of each memory pool requested to be accessed by the target computer are distributed to the target computer together after they are complete.
[0110] For example, for calculator A, its memory access request a requests access to memory pools ① and ②, then the first processing unit generates two one-hot encoding bitmaps "10000000000" and "01000000000" for calculator A accordingly, that is, the number of one-hot encoding bitmaps corresponding to calculator A is two. The receiving unit of the second dispatching module can receive the request data of the two memory pools ① and ② corresponding to calculator A. When only the request data of one of the memory pools ① and ② is received, the second processing unit can determine that the request data of the two memory pools requested by calculator A are not all returned. After receiving the request data of both memory pools ① and ②, the second processing unit can determine that the request data of the two memory pools requested by calculator A are all returned, and when all are returned, they are dispatched to calculator A together, thereby avoiding transmission errors caused by incomplete request data.
[0111] In the embodiment of the present application, before dispatching the interaction request to the memory module, the memory interaction method further includes:
[0112] Determine whether there is a first token; if so, dispatch a memory access request; if not, wait until the first token is present before dispatching the memory access request; wherein the first token is obtained based on the buffer status of the memory module.
[0113] Specifically, when the first dispatching module dispatches a memory access request to the memory module, each memory access request is sent to the memory module based on the first-in first-out (FIFO) memory of the memory module. When the buffer state of the FIFO memory of the memory module is full, if the memory access request continues to be sent to the memory module, it will cause congestion of each memory access request. Therefore, the memory module can send a first token to the first dispatching module based on the buffer state of its FIFO memory. For example, when the buffer state of the FIFO memory of the memory module is empty, it means that the memory access request can continue to be received. At this time, the first token is sent to the first dispatching module. Before sending the memory access request, the first dispatching module queries whether it has the first token. When it has the first token, it means that the current memory module can continue to receive the memory access request, and the access request can be sent to the memory access module. When there is no first token, it means that the current memory module is heavily loaded and cannot continue to receive the memory access request, so it continues to wait until the FIFO memory of the memory module can continue to receive the memory access request, and then send the first token to it, and then dispatch. This token-based distribution mechanism can effectively avoid line congestion caused by distributing too many memory access requests.
[0114] In the embodiment of the present application, before receiving the request data returned by each of the memory pools, the memory interaction method further includes:
[0115] Determine whether there is a second token; if so, allow the memory module to send the request data; if not, wait until the second token is available to allow the memory module to send the request data; wherein the second token is obtained based on the buffer status of the request data receiving end.
[0116] Specifically, when the memory module sends the request data corresponding to each memory access request to the second dispatch module, each request data is sent to the second dispatch module based on the FIFO memory of the second dispatch module. When the buffer state of the FIFO memory of the second dispatch module is full, if the request data continues to be sent to the second dispatch module, it will cause congestion of each request data. Therefore, the second dispatch module can send the second token to the memory module based on the buffer state of its FIFO memory. For example, when the buffer state of the FIFO memory of the second dispatch module is empty, it means that the request data can continue to be received at present. At this time, the second token is sent to the memory module. The memory module queries whether it has the second token before sending the request data. When it has the second token, it means that the current second dispatch module can continue to receive the request data, and the request data can be sent to the second dispatch module. When there is no second token, it means that the current second dispatch module is overloaded and cannot continue to receive the request data, so it continues to wait until the FIFO memory of the second dispatch module can continue to receive the request data, and then send the second token to it, and then distribute it. This token-based distribution mechanism can effectively avoid line congestion caused by distributing too much request data.
[0117] In an embodiment of the present application, each memory access request in the same clock cycle is divided into an interactive conflict group and / or a non-interactive conflict group. Before dispatching, memory access requests are first selected from each interactive conflict group and / or non-interactive conflict group according to preset conditions to form a dispatch group, and then access requests are sent to the memory module in parallel based on each dispatch group. Among them, when dividing the dispatch group, all memory access requests are selected from the non-interactive conflict group, and a different memory access request is selected from each interactive conflict group to form a dispatch group, and in other dispatch groups, a different memory access request is selected from each interactive conflict group each time until all memory access requests in each interactive conflict group are selected. This memory interaction method can maximize the number of memory access requests in each dispatch group without conflict when dividing the dispatch group. Then, each time the dispatch is performed in parallel based on each dispatch group, the waste of memory pool clock cycles can be minimized to the greatest extent, thereby improving the interaction speed.
[0118] Exemplary Devices
[0119] This exemplary embodiment provides a memory interaction system 100, such as Figure 3 As shown, the memory interaction system 100 includes: a first distribution module 110, wherein the first distribution module 110 includes an acquisition unit 111 and a first processing unit 112;
[0120] The acquisition unit 111 is used to acquire the memory access request of each target calculator, and the target calculator is each calculator having a memory access demand in the same clock cycle;
[0121] The first processing unit 112 is used to divide the memory access requests into groups without interactive conflicts and / or groups with interactive conflicts, wherein any memory access request in the group without interactive conflicts does not have interactive conflicts with other memory access requests for accessing the same memory pool, and each memory access request in the same group with interactive conflicts has interactive conflicts for accessing the same memory pool;
[0122] Select memory access requests from at least one of the non-interactive conflict groups and / or the interactive conflict groups to form respective dispatch groups according to preset conditions, and dispatch access requests to the memory module based on the respective dispatch groups; wherein the preset conditions include: selecting all memory access requests in the non-interactive conflict groups, and selecting one memory access request from each interactive conflict group to form a dispatch group, and selecting one unassigned memory access request from each interactive conflict group in other dispatch groups each time, until all memory access requests in each interactive conflict group are selected; wherein in each dispatch group, the memory access requests selected from each interactive conflict group are different from each other;
[0123] Based on each of the dispatch groups, all access requests in a dispatch group are selected each time and dispatched to the memory module in parallel.
[0124] In the embodiment of the present application, each of the memory access requests includes a code of the memory pool to which it requests access, and the first processing unit 112 is further configured to:
[0125] Classify memory access requests with the same memory pool code into the same interactive conflict group;
[0126] Memory access requests that do not have the same memory pool encoding as other memory access requests are grouped into non-interaction conflict groups.
[0127] In the embodiment of the present application, the first processing unit 112 is further configured to:
[0128] A one-hot encoding bitmap is generated for each memory pool requested to be accessed by each target computer, and each one-hot encoding bitmap can indicate a memory pool code requested to be accessed by the target computer.
[0129] In the embodiment of the present application, the memory interaction system further includes a second dispatching module 120, and the second dispatching module 120 includes a receiving unit 121 and a second processing unit 122:
[0130] The receiving unit is used to receive the request data returned by each of the memory pools, and receive the one-hot encoding bitmap corresponding to each target calculator sent by the first dispatching module 110;
[0131] The second processing unit 122 is further configured to determine a target calculator corresponding to the request data received from each memory pool based on the one-hot encoding bitmap corresponding to each memory pool;
[0132] The request data received from each memory pool is dispatched to the corresponding target computer.
[0133] In the embodiment of the present application, the second processing unit 122 is further configured to:
[0134] Determining the number of one-hot encoded bitmaps corresponding to the target calculator;
[0135] Based on the number of the one-hot encoding bitmaps, determine whether the request data of each memory pool requested to be accessed by the target computer is complete; if complete, distribute them to the target computer together; if incomplete, wait until the request data of each memory pool requested to be accessed by the target computer is complete before distributing them to the target computer together.
[0136] In the embodiment of the present application, the first processing unit 112 is further used to: receive a first token issued by the memory module based on its own buffer state;
[0137] Before sending the access request, the first processing unit 112 is further configured to:
[0138] Determine whether there is a first token; if so, issue a memory access request; if not, wait until the first token is available before issuing the memory access request.
[0139] In the embodiment of the present application, the second processing unit 122 is further used to: issue a second token to the memory module based on its own buffer state;
[0140] Before sending the request data to the receiving unit, the memory module is further configured to:
[0141] Determine whether the second token is present; if so, send the request data; if not, wait until the second token is present before sending the request data.
[0142] The specific interaction method of the memory interaction system in the above embodiment can be found in the various embodiments of the memory interaction method implementation method, which will not be described in detail here.
[0143] In the embodiment of the present application, each memory access request in the same clock cycle is divided into an interactive conflict group and a non-interactive conflict group by the first processing unit 112. Before dispatching, memory access requests are first selected from each interactive conflict group and / or non-interactive conflict group according to preset conditions to form a dispatch group, and then access requests are sent to the memory module in parallel based on each dispatch group. Among them, when dividing the dispatch group, all memory access requests are selected from the non-interactive conflict group and a different memory access request is selected from each interactive conflict group to form a dispatch group, and in other dispatch groups, a different memory access request is selected from each interactive conflict group each time until all memory access requests in each interactive conflict group are selected. This memory interaction method can maximize the number of memory access requests in each dispatch group without conflict when dividing the dispatch group. Then, each time the dispatch is performed in parallel based on a dispatch group, the waste of memory pool clock cycles can be minimized to the greatest extent, thereby improving the interaction speed.
[0144] Exemplary Media
[0145] After introducing the method, medium and system of the exemplary embodiments of the present application, next, reference is made to Figure 4 For a description of the computer-readable storage medium of the exemplary embodiment of the present application, please refer to Figure 4, the computer-readable storage medium shown is a CD 70, on which a computer program (i.e., a program product) is stored. When the computer program is executed by a processor, the steps recorded in the above method implementation are implemented, for example, obtaining memory access requests of each target computer, the target computer includes each computer having a memory access demand in the same clock cycle; dividing each memory access request to obtain at least one non-interaction conflict group and / or an interaction conflict group, any memory access request in the non-interaction conflict group does not have an interaction conflict with other memory access requests for accessing the same memory pool, and each memory access request in the same interaction conflict group has an interaction conflict with accessing the same memory pool; according to the pre- It is assumed that a condition is set to select memory access requests from at least one non-interactive conflict group and / or interactive conflict group to form each dispatch group; the preset condition includes: selecting all memory access requests in the non-interactive conflict group, and selecting one memory access request from each interactive conflict group to form a dispatch group; and selecting one undispatched memory access request from each interactive conflict group in other dispatch groups each time, until all memory access requests in each interactive conflict group are selected; wherein, in each dispatch group, the memory access requests selected from each interactive conflict group are different; based on each of the dispatch groups, all access requests in a dispatch group are selected each time and dispatched to the memory module in parallel. The specific implementation method of each step will not be repeated here. It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical or magnetic storage media, which are not listed here one by one.
[0146] Exemplary Computing Devices
[0147] After introducing the methods, systems, and media of the exemplary embodiments of the present application, reference is now made to Figure 5 A computing device according to an exemplary embodiment of the present application.
[0148] Figure 5 A block diagram of an exemplary computing device 80 suitable for implementing embodiments of the present application is shown. The computing device 80 may be a computer system or a server. Figure 5 The computing device 80 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0149] like Figure 5As shown, the components of the computing device 80 may include, but are not limited to: one or more processors or processing units 801, a system memory 802, and a bus 803 connecting different system components (including the system memory 802 and the processing unit 801).
[0150] The computing device 80 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computing device 80, including volatile and non-volatile media, removable and non-removable media.
[0151] The system storage 802 may include computer system readable media in the form of volatile storage, such as random access memory (RAM) 8021 and / or cache memory 8022. The computing device 70 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the ROM 8023 may be used to read and write non-removable, non-volatile magnetic media ( Figure 5 is not shown in the Figure 5 As shown in FIG. 8 , a disk drive for reading and writing a removable non-volatile disk (e.g., a “floppy disk”) and an optical disk drive for reading and writing a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) can be provided. In these cases, each drive can be connected to bus 803 via one or more data medium interfaces. System storage 802 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of each embodiment of the present application.
[0152] A program / utility 8025 having a set (at least one) of program modules 8024 may be stored, for example, in system memory 802, and such program modules 8024 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 8024 generally perform the functions and / or methods of the embodiments described herein.
[0153] The computing device 80 may also communicate with one or more external devices 804 (e.g., a keyboard, a pointing device, a display, etc.). Such communication may be performed via an input / output (I / O) interface. Furthermore, the computing device 80 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 806. Figure 5 As shown, the network adapter 806 communicates with other modules (such as the processing unit 801, etc.) of the computing device 80 via the bus 803. It should be understood that although Figure 5Not shown, other hardware and / or software modules may be used in conjunction with computing device 80 .
[0154] The processing unit 801 executes various functional applications and data processing by running the program stored in the system memory 802, for example, obtaining memory access requests of each target calculator, the target calculator includes each calculator having memory access requirements in the same clock cycle; dividing each memory access request to obtain at least one non-interaction conflict group and / or an interaction conflict group, any memory access request in the non-interaction conflict group does not have an interaction conflict with other memory access requests for accessing the same memory pool, and each memory access request in the same interaction conflict group has an interaction conflict for accessing the same memory pool; selecting the at least one non-interaction conflict group from the at least one non-interaction conflict group according to a preset condition The memory access requests are selected from the groups and / or the groups with interactive conflicts to form each dispatch group; the preset conditions include: selecting all memory access requests in the groups without interactive conflicts, and selecting one memory access request from each group with interactive conflicts to form a dispatch group; and selecting one undispatched memory access request from each group with interactive conflicts in other dispatch groups each time, until all memory access requests in each group with interactive conflicts are selected; wherein, in each dispatch group, the memory access requests selected from each group with interactive conflicts are different from each other; based on each of the dispatch groups, all access requests in a dispatch group are selected each time and dispatched to the memory module in parallel. The specific implementation method of each step will not be repeated here. It should be noted that although several units / modules or sub-units / sub-modules of the computing device are mentioned in the above detailed description, this division is only exemplary and not mandatory. In fact, according to the implementation of the present application, the features and functions of two or more units / modules described above can be concretized in one unit / module. On the contrary, the features and functions of one unit / module described above may be further divided into multiple units / modules to be embodied.
[0155] In the description of the present application, it should be noted that the terms "first", "second" and "third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0156] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0157] In the several embodiments provided in the present application, it should be understood that the disclosed systems, systems and methods can be implemented in other ways. The system embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the system or unit can be electrical, mechanical or other forms.
[0158] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0159] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0160] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that can be executed by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computing device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.
[0161] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
[0162] In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0163] Based on the above description, the present application embodiment proposes the following technical solutions, but is not limited thereto:
[0164] 1. A memory interaction method, comprising:
[0165] Obtaining memory access requests of each target calculator, the target calculator comprising each calculator having memory access requirements in the same clock cycle;
[0166] Divide each memory access request to obtain at least one non-interaction conflict group and / or an interaction conflict group, wherein any memory access request in the non-interaction conflict group does not have an interaction conflict with other memory access requests for accessing the same memory pool, and each memory access request in the same interaction conflict group has an interaction conflict for accessing the same memory pool;
[0167] Memory access requests are selected from at least one non-interactive conflict group and / or interactive conflict group according to preset conditions to form each dispatch group; the preset conditions include: selecting all memory access requests in the non-interactive conflict group, and selecting one memory access request from each interactive conflict group to form a dispatch group; and selecting one undispatched memory access request from each interactive conflict group in other dispatch groups each time, until all memory access requests in each interactive conflict group are selected; wherein, in each dispatch group, the memory access requests selected from each interactive conflict group are different from each other;
[0168] Based on each of the dispatch groups, all access requests in a dispatch group are selected each time and dispatched to the memory module in parallel.
[0169] 2. In the memory interaction method of technical solution 1, each of the memory access requests includes a memory pool code to which it requests access, and the memory access requests are divided to obtain at least one non-interaction conflict group and / or an interaction conflict group, including:
[0170] Classify memory access requests with the same memory pool code into the same interactive conflict group;
[0171] Memory access requests that do not have the same memory pool encoding as other memory access requests are grouped into non-interaction conflict groups.
[0172] 3. The memory interaction method according to technical solution 1 or 2, when dispatching an interaction request to the memory module, the memory interaction method further comprises:
[0173] A one-hot encoding bitmap is generated for each memory pool requested to be accessed by each target computer, and each one-hot encoding bitmap can indicate a memory pool code requested to be accessed by the target computer.
[0174] 4. The memory interaction method according to any one of technical solutions 1 to 3 further includes:
[0175] Receiving request data returned by each of the memory pools;
[0176] Determine a target calculator corresponding to the request data received from each memory pool based on the one-hot encoding bitmap corresponding to each of the memory pools;
[0177] The request data received from each memory pool is dispatched to the corresponding target computer.
[0178] 5. As described in any one of technical solutions 1 to 4, before dispatching the request data received from each memory pool to the corresponding target computer, the memory interaction method further includes:
[0179] Determining the number of one-hot encoded bitmaps corresponding to the target calculator;
[0180] Determining whether requested data of each memory pool requested to be accessed by the target calculator is complete based on the number of one-hot encoded bitmaps;
[0181] If complete, they are all sent to the target computer; if incomplete, they are all sent to the target computer after the request data of each memory pool requested to be accessed by the target computer are complete.
[0182] 6. The memory interaction method according to any one of technical solutions 1 to 5, before sending the interaction request to the memory module, the memory interaction method further comprises:
[0183] determining whether a first token is present;
[0184] If so, a memory access request is dispatched; if not, the memory access request is dispatched when a first token is available; wherein the first token is obtained based on the buffer status of the memory module.
[0185] 7. The memory interaction method according to any one of technical solutions 1 to 6, before receiving the request data returned by each of the memory pools, the memory interaction method further includes:
[0186] determining whether a second token is present;
[0187] If so, the memory module is allowed to send the request data; if not, the memory module is allowed to send the request data when a second token is available; wherein the second token is obtained based on the buffer status of the request data receiving end.
[0188] 8. A memory interaction system, comprising: a first dispatching module, the first dispatching module comprising an acquisition unit and a first processing unit;
[0189] The acquisition unit is used to acquire the memory access request of each target calculator, and the target calculator includes each calculator having the memory access demand in the same clock cycle;
[0190] The first processing unit is used to divide the memory access requests to obtain at least one non-interaction conflict group and / or an interaction conflict group, wherein any memory access request in the non-interaction conflict group does not have an interaction conflict with other memory access requests for accessing the same memory pool, and each memory access request in the same interaction conflict group has an interaction conflict for accessing the same memory pool;
[0191] Select memory access requests from at least one of the non-interactive conflict groups and / or the interactive conflict groups to form respective dispatch groups according to preset conditions, and dispatch access requests to the memory module based on the respective dispatch groups; wherein the preset conditions include: selecting all memory access requests in the non-interactive conflict groups, and selecting one memory access request from each interactive conflict group to form a dispatch group, and selecting one unassigned memory access request from each interactive conflict group in other dispatch groups each time, until all memory access requests in each interactive conflict group are selected; wherein in each dispatch group, the memory access requests selected from each interactive conflict group are different from each other;
[0192] Based on each of the dispatch groups, all access requests in a dispatch group are selected each time and dispatched to the memory module in parallel.
[0193] 9. In the memory interaction system of technical solution 8, each of the memory access requests includes a memory pool code to which it requests access, and the first processing unit is further configured to:
[0194] Classify memory access requests with the same memory pool code into the same interactive conflict group;
[0195] Memory access requests that do not have the same memory pool encoding as other memory access requests are grouped into non-interaction conflict groups.
[0196] 10. In the memory interaction system according to technical solution 8 or 9, the first processing unit is further used for:
[0197] A one-hot encoding bitmap is generated for each memory pool requested to be accessed by each target computer, and each one-hot encoding bitmap can indicate a memory pool code requested to be accessed by the target computer.
[0198] 11. The memory interaction system according to any one of technical solutions 8 to 10, further comprising a second dispatching module, wherein the second dispatching module comprises a receiving unit and a second processing unit:
[0199] The receiving unit is used to receive the request data returned by each of the memory pools, and receive the one-hot encoding bitmap corresponding to each target calculator sent by the first dispatching module;
[0200] The second processing unit is further used to determine the target calculator corresponding to the request data received from each memory pool based on the one-hot encoding bitmap corresponding to each memory pool;
[0201] The request data received from each memory pool is dispatched to the corresponding target computer.
[0202] 12. In the memory interaction system according to any one of technical solutions 8 to 11, the second processing unit is further configured to:
[0203] Determining the number of one-hot encoded bitmaps corresponding to the target calculator;
[0204] Based on the number of one-hot encoded bitmaps, determine whether the request data of each memory pool requested to be accessed by the target computer is complete; if complete, distribute them to the target computer together; if incomplete, wait until the request data of each memory pool requested to be accessed by the target computer is complete before distributing them to the target computer together.
[0205] 13. In the memory interaction system according to any one of technical solutions 8 to 12, the first processing unit is further used to: receive a first token issued by the memory module based on its own buffer state;
[0206] Before dispatching the access request, the first processing unit is further configured to:
[0207] Determine whether there is a first token; if so, issue a memory access request; if not, wait until the first token is available before issuing the memory access request.
[0208] 14. In the memory interaction system according to any one of technical solutions 8 to 13, the second processing unit is further used to: issue a second token to the memory module based on its own buffer state;
[0209] Before sending the request data to the receiving unit, the memory module is further configured to:
[0210] Determine whether the second token is present; if so, send the request data; if not, wait until the second token is present before sending the request data.
[0211] 15. A computer-readable storage medium comprising instructions which, when executed on a computer, enable the computer to execute the method described in any one of technical solutions 1 to 7.
[0212] 16. A computing device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements a method as described in any one of technical solutions 1-7 when executing the computer program.
Claims
1. A memory interaction method, comprising: Obtaining memory access requests of each target calculator, the target calculator comprising each calculator having memory access requirements in the same clock cycle; Divide each memory access request to obtain at least one non-interaction conflict group and / or an interaction conflict group, wherein any memory access request in the non-interaction conflict group does not have an interaction conflict with other memory access requests for accessing the same memory pool, and each memory access request in the same interaction conflict group has an interaction conflict for accessing the same memory pool; Selecting memory access requests from the at least one non-interaction conflict group and / or the interaction conflict group to form each dispatch group according to a preset condition; The preset conditions include: selecting all memory access requests in the non-interactive conflict group, and selecting one memory access request from each interactive conflict group to form a dispatch group; and selecting one undispatched memory access request from each interactive conflict group in other dispatch groups each time, until all memory access requests in each interactive conflict group are selected; wherein, in each dispatch group, the memory access requests selected from each interactive conflict group are different from each other; Based on each of the dispatch groups, all access requests in a dispatch group are selected each time and dispatched to the memory module in parallel.
2. The memory interaction method according to claim 1, wherein each of the memory access requests includes a memory pool code to be accessed by the memory access request, and wherein the memory access requests are divided to obtain at least one non-interaction conflict group and / or an interaction conflict group, comprising: Classify memory access requests with the same memory pool code into the same interactive conflict group; Memory access requests that do not have the same memory pool encoding as other memory access requests are grouped into non-interaction conflict groups.
3. The memory interaction method according to claim 1, when dispatching the interaction request to the memory module, the memory interaction method further comprises: A one-hot encoding bitmap is generated for each memory pool requested to be accessed by each target computer, and each one-hot encoding bitmap can indicate a memory pool code requested to be accessed by the target computer.
4. The memory interaction method according to claim 3, further comprising: Receiving request data returned by each of the memory pools; Determine a target calculator corresponding to the request data received from each memory pool based on the one-hot encoding bitmap corresponding to each of the memory pools; The request data received from each memory pool is dispatched to the corresponding target computer.
5. The memory interaction method according to claim 4, before dispatching the request data received from each memory pool to the corresponding target computer, the memory interaction method further comprises: Determining the number of one-hot encoded bitmaps corresponding to the target calculator; Determining whether requested data of each memory pool requested to be accessed by the target calculator is complete based on the number of one-hot encoded bitmaps; If complete, they are sent to the target computer; If it is incomplete, the requested data of each memory pool requested to be accessed by the target computer will be sent to the target computer together after the requested data are complete.
6. The memory interaction method according to claim 1, before dispatching the interaction request to the memory module, the memory interaction method further comprises: determining whether a first token is present; If so, a memory access request is dispatched; If not, wait until a first token is available before dispatching the memory access request; wherein the first token is obtained based on the buffer status of the memory module.
7. The memory interaction method according to claim 4, before receiving the request data returned by each of the memory pools, the memory interaction method further comprises: determining whether a second token is present; If yes, allowing the memory module to send the requested data; If not, then wait until there is a second token to allow the memory module to send the request data; wherein the second token is obtained based on the buffer status of the request data receiving end.
8. A memory interaction system, comprising: A first distribution module, the first distribution module comprising an acquisition unit and a first processing unit; The acquisition unit is used to acquire the memory access request of each target calculator, and the target calculator includes each calculator having the memory access demand in the same clock cycle; The first processing unit is used to divide the memory access requests to obtain at least one non-interaction conflict group and / or an interaction conflict group, wherein any memory access request in the non-interaction conflict group does not have an interaction conflict with other memory access requests for accessing the same memory pool, and each memory access request in the same interaction conflict group has an interaction conflict for accessing the same memory pool; Select memory access requests from at least one of the non-interactive conflict groups and / or the interactive conflict groups to form respective dispatch groups according to preset conditions, and dispatch access requests to the memory module based on the respective dispatch groups; wherein the preset conditions include: selecting all memory access requests in the non-interactive conflict groups, and selecting one memory access request from each interactive conflict group to form a dispatch group, and selecting one unassigned memory access request from each interactive conflict group in other dispatch groups each time, until all memory access requests in each interactive conflict group are selected; wherein in each dispatch group, the memory access requests selected from each interactive conflict group are different from each other; Based on each of the dispatch groups, all access requests in a dispatch group are selected each time and dispatched to the memory module in parallel.
9. The memory interaction system according to claim 8, wherein each of the memory access requests includes a memory pool code to which the memory access request is requested, and the first processing unit is further configured to: Classify memory access requests with the same memory pool code into the same interactive conflict group; Memory access requests that do not have the same memory pool encoding as other memory access requests are grouped into non-interaction conflict groups.
10. The memory interaction system according to claim 8, wherein the first processing unit is further configured to: A one-hot encoding bitmap is generated for each memory pool requested to be accessed by each target computer, and each one-hot encoding bitmap can indicate a memory pool code requested to be accessed by the target computer.
11. The memory interaction system according to claim 10, further comprising a second dispatching module, wherein the second dispatching module comprises a receiving unit and a second processing unit: The receiving unit is used to receive the request data returned by each of the memory pools, and receive the one-hot encoding bitmap corresponding to each target calculator sent by the first dispatching module; The second processing unit is further used to determine the target calculator corresponding to the request data received from each memory pool based on the one-hot encoding bitmap corresponding to each memory pool; The request data received from each memory pool is dispatched to the corresponding target computer.
12. The memory interaction system according to claim 11, wherein the second processing unit is further configured to: Determining the number of one-hot encoded bitmaps corresponding to the target calculator; Determining whether requested data of each memory pool requested to be accessed by the target computer is complete based on the number of one-hot encoded bitmaps; If complete, they are sent to the target computer; If it is incomplete, the requested data of each memory pool requested to be accessed by the target computer will be sent to the target computer together after the requested data are complete.
13. The memory interaction system according to claim 8, wherein the first processing unit is further used to: receive a first token issued by the memory module based on its own buffer state; Before dispatching the access request, the first processing unit is further configured to: Determine whether there is a first token; if so, issue a memory access request; if not, wait until the first token is available before issuing the memory access request.
14. The memory interaction system according to claim 11, wherein the second processing unit is further configured to: issue a second token to the memory module based on its own buffer status; Before sending the request data to the receiving unit, the memory module is further configured to: Determine whether the second token is present; if so, send the request data; if not, wait until the second token is present before sending the request data.
15. A computer-readable storage medium comprising instructions, which, when executed on a computer, enables the computer to execute the method according to any one of claims 1 to 7.
16. A computing device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
