Method and apparatus for handling memory accesses for a TCF-enabled processor
The flexible latency processing unit optimizes shared memory access in TCF-enabled processors by dynamically managing latency, enhancing performance and simplifying programming through efficient resource utilization.
Patent Information
- Application Number
- JP2021536026
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2018-12-21
- Filing Date
- 2019-12-20
- Publication Date
- 2024-09-18
- Estimated Expiration
- 2039-12-20
AI Technical Summary
Current processor architectures face inefficiencies in handling parallel threads due to resource wastage, fixed thread numbers, and high synchronization costs in shared memory systems, leading to performance bottlenecks and increased complexity in programming.
Implementing a flexible latency processing unit (FLCU) that dynamically manages shared memory access requests, allowing instructions to continue execution based on actual latency rather than fixed delays, using a FIFO buffer to maintain fiber order and optimize resource utilization.
Improves performance and simplifies programming by reducing wait times for memory responses, enabling faster execution and lower energy consumption, particularly in low activity and location-optimized access patterns.
Smart Images

Figure 0007551996000006 
Figure 0007551996000005 
Figure 0007551996000007
Abstract
Description
[Technical field]
[0001] The present invention relates generally to computer technology, and more particularly to processor memory access. [Background technology]
[0002] In the context of software involving multi-threaded computation, organizing efficient cooperation among many parallel threads has been a fundamental problem due to limitations of current models. The concept of parallel thick control flows (TCF) was first proposed at the 2011 International Conference on Parallel and Distributed Processing Techniques A solution was introduced in "Thick Control Flows: Introduction and Prospects" by V. Leppanen, M. Forsell, and JM. Makela, in Proceedings of the 2011 Conference on Programming and Applications (PDPTA'11), Las Vegas, USA, pages 540-546, 2011. When a thick control flow (similar to a thread, in terms of the number of fibers) executes a program statement or expression, all of the fibers can be considered to execute the same program element synchronously in parallel. The concept of thick control flow allows the programmer to focus on coordinating a small number of parallel thick control flows, rather than a huge number of parallel threads.
[0003] While the TCF concept can be advantageously utilized by programmers, we additionally propose that a concept that replaces the traditional thread concept, with at least some implementation choices for TCF, may be useful for processor cores, since it supports flexibility in the theoretical model, eliminates redundancy in both software and hardware, and simplifies the instruction memory system.
[0004] An architecture for executing programs written for the TCF model, the Thick Control Flow Processor Architecture (TPA), is presented in,Outline,by M. Forsell, J. Roivainen, and V. Leppanen,,in,2016 International Symposium on Computer Architecture and High Performance Computing,Workshops(SBAC-PADW),, Los Angeles, CA,,2016, pp. 1–6. This has been previously proposed in "A Novel Architecture for Parallel Computing," in "Parallel Computing of a Thick Control Flow Architecture."
[0005] Typically, most processor architectures utilize a multiple instruction multiple data (MIMD) model, where P instructions from separate instruction flows are executed on P processing elements. This can be resource-wasting for codes that contain self-similarities. A more optimal solution for this type of code would be to use single instruction multiple data (SIMD), where the same instruction on P data elements is executed on P processing units. SIMD is cost-effective, easy to program, and its implementation features low power consumption, but it does not efficiently execute codes with controlled parallelism and heterogeneity between threads. Another problematic aspect is caused by the fact that in the implementation of MIMD and SIMD architectures, the number of hardware threads is fixed, which introduces overhead when the number of software threads exceeds the supported number.
[0006] To be able to adapt and efficiently execute homogeneous and heterogeneous code parts with different characteristics with respect to the number of threads, homogeneous threads (or "fibers" as they may be called in the context of TCF to distinguish them from "threads" which are more unrelated to regular parallel programming) proceeding through the same control path are organized into an entity called TCF, introducing the possibility to take advantage of SIMD type optimizations, preserving the possibility of having multiple streams of the MIMD model if necessary. The TCF model does not provide a fixed number of threads, but multiple control flows with a given thickness that can vary according to the needs of the application.
[0007] Another set of issues affecting parallel computing concerns the arrangement of overall communication. In shared memory architectures (SMAs), data and program partitioning is usually performed by placing data that requires processing by multiple threads into a shared memory and partitioning the program by processors independently, making programming easier compared to message passing (MPA) architectures where processing always happens locally and the programmer is responsible for reordering the data accordingly. Most SMAs use a distributed shared memory architecture consisting of multiple interconnected processor cache pairs, which makes maintaining cache consistency (and therefore latency tolerance) and synchronicity very expensive. This can even destroy their performance in communication intensive problems.
[0008] For example, to address the above problems, emulated shared memory (ESM), or shared memory emulation architectures have been introduced. They incorporate a set of multi-threaded processors connected via a high-throughput intercommunication network to a uniformly common and synchronously accessible shared memory. The memory system latency is hidden by overlapping ongoing memory references, and a special low-cost synchronization mechanism is established to guarantee synchronicity at the machine instruction level. ESM systems give the user the perception of an ideal shared memory, even when the actual hardware architecture comprises physically distributed memory. From a theoretical standpoint, these architectures attempt to emulate an abstract parallel random access machine (PRAM), which, due to its simplicity and expressiveness, is commonly used as a model to describe and analyze the inherent parallelism of computational problems as well as the performance and cost of executing parallel algorithms. The PRAM model generally refers to a set of processors operating under the same clock and a uniformly single-step accessible shared memory connected to the set of processors.
[0009] Thus, ESM is a practical technique to address the programmability and performance scalability concerns of chip multiprocessors (CMPs) since it produces implicit synchronization in machine instruction execution, efficient latency hiding, and sufficient bandwidth to route all memory references even for highly random and concurrent access workloads. While synchronous implementation is considered to make programming easier since the programmer does not have to explicitly synchronize execution threads after each global memory access, but can rely on the hardware to handle it automatically, for example, MPA programmers are responsible for explicitly defining communication, synchronizing subtasks, and programming data writes and partitioning between threads making MPAs difficult to program. The latency hiding provided by shared memory emulation takes advantage of high throughput computation schemes, and other threads execute while the thread references the global shared memory. Because the throughput computation scheme uses parallelism slack extracted from available thread-level parallelism, it is considered to provide enhanced scalability in contrast to traditional symmetric multiprocessors and non-uniform memory access (NUMA) that rely on snooping or directory-based cache coherence mechanisms and therefore suffer from limited bandwidth or directory access latencies and large amounts of coherence maintenance traffic.
[0010] The TCF model may be linked to an ESM and an implementing processor architecture, i.e., a TCF-enabled processor, e.g., TPA. The required solutions for this are outlined at a high level in the prior art, but the low level details of the implementation are not described.
[0011] For shared memory latency compensation, the prior art features memory response waiting pipeline segments. This solution has a fixed segment length for all types of workloads. The segment length is selected at design time according to the proximity of the worst case situation. This type of solution slows down execution especially in low memory activity, partitioned or place-optimized patterns. Summary of the Invention
[0012] It is an object of the present invention to alleviate at least some of the problems associated with the known prior art. The object of the present invention may be achieved by means of the features of the independent claims. An embodiment of the present invention provides a method for handling shared data memory accesses for a TCF-aware processor. Device to provide. Device comprises at least a flexible latency processing unit comprising a local memory and associated control logic, the local memory being provided for storing data related to shared data memory accesses. Device is configured to receive at least one TCF comprising at least one instruction, the at least one instruction associated with the at least one fiber, and the flexible latency processing unit is configured to determine whether a shared data memory access is requested by the at least one instruction, and if a shared data memory access is requested, send the shared data memory access request through the flexible latency processing unit and monitor essentially continuously, and if a response to the shared data memory access request is received, pause continued execution of the instructions until the response is received, and continue execution of the instructions after receiving the response such that a delay associated with the shared data memory access is dynamically determined by an actual requested shared data memory access latency.
[0013] A method is also provided according to independent claim 14.
[0014] Considering the usefulness of various embodiments of the present invention, a TCF-enabled processor's response to a shared memory access (e.g., a memory read operation) Device The method and apparatus can provide a useful portion of a TCF-enabled processor that can provide better performance, easier programmability, and more cost-effectiveness compared to current alternatives.
[0015] A flexible latency processing unit may be considered a functional entity comprising a local memory and a control logic, which may be implemented as separate physical entities that may reside in separate locations or may be implemented as a common physical entity.
[0016] The local memory of the flexible latency processing unit may comprise a data memory that may be at least logically utilized by the flexible latency processing unit, the local memory being capable of storing data relating to multiple instructions. The local memory may be a dedicated memory or may be embedded in hardware, e.g., some other element such as a chip, that may be used to execute control logic.
[0017] At least one instruction is according to an embodiment of the present invention. Device and determining whether shared data memory access is requested may be performed by recognition via one or more identifiers, operands, instruction words, and / or opcodes, or any other suitable method that may be familiar to one of ordinary skill in the art.
[0018] The flexible latency processing unit may be referred to herein as a flexible latency compensation unit (FLCU). The term TCF-enabled processor refers to all processors that implement the TCF model and special cases thereof (including but not limited to ESM, configurable ESM (CESM) and vector / SIMD) as described in the paper "An Extended PRAM-NUMA Model of Computation for TCF Programming" by M. Forsell and V. Leppanen in International Journal of Networking and Computing 3, 1 (2013), 98-115, which use similar latency compensation mechanisms. Thus, in other words, the present invention can provide a method for handling memory accesses for, for example, ESM, configurable ESM, and vector / SIMD processors that are encompassed by the term TCF-enabled processor.
[0019] In some embodiments, the FLCU may be implemented as comprising a first-in-first-out (FIFO) type local memory controlled by pipeline logic. Here, FIFO type buffering may be utilized to potentially provide advantages (compared to other buffering techniques), such as being easier to implement and / or having smaller requirements on silicon surface area, while still achieving high performance. With other buffering techniques, such as those where memory reference results may be read in any order, the buffering may be more complex, perhaps requiring, for example, the use of an address table with two layers to be used in order to be able to find the correct buffer data. More complex logic must also be implemented with other buffering types that take into account that all unlisted rules have been sent at the time, due to which received memory references may or may not be executed in a different order than the corresponding memory reference requests. In another aspect, FIFO buffering may be naturally advantageous, since it can maintain the order of fibers during the rest of the pipeline.
[0020] In some other embodiments, using the case scenario, some other buffering technique other than FIFO may be used. In alternative embodiments, a non-FIFO type buffer may provide some advantages, such as achieving higher performance through faster execution.
[0021] Many advantages may be achieved by reading from the FLCU local memory (wherein the local memory is also referred to as a buffer) according to the latency of the completed memory reference. If the instruction does not include a shared memory read sub-instruction, execution may continue to the next stage of the pipeline by essentially continuously reading the FLCU local memory, preferably every clock cycle, without having to wait for the completed shared memory reference. As a result, overall performance may be improved.
[0022] In an embodiment of the present invention, when an instruction reaches the memory unit / FLCU, possible references can be sent to the shared data memory system. After this, the instruction (data defining the instruction) and associated data, such as possible completed shared data memory references, may be written to the FLCU local memory (which may be called the FLCU buffer or, in the case of FIFO type buffering, the FLCU, FIFO buffer). On the other side of the FLCU local memory, the best available instruction and data from the FLCU local memory may be read in two cases: 1. A requested response has arrived from the shared data memory system. 2. No response is required from the shared data memory system.
[0023] Compared to existing fixed memory response wait pipeline segments, the present invention may allow continuation of execution as soon as the above-mentioned conditions allow, without the specific need to wait for a defined delay.
[0024] In relation to the above, Device An embodiment of the may include a flexible latency processing unit (FLCU) that includes a local memory that stores data related to shared data memory accesses. Device may be configured to store data relating to the at least one received instruction in the local memory. The stored data relating to the at least one instruction may comprise data defining the instruction and / or data referenced by the instruction to possibly be fetched via a shared data memory access.
[0025] In one embodiment, Devicemay be configured to store the fibers in local memory. As previously disclosed, data defining the instructions may be stored in local memory (written to "FLCU local memory") after sending possible references to the shared data memory system, while they may also be stored at the same time as or before sending the memory references. Completed memory references may be stored in local memory at the same time as the data defining the instructions are stored, or at a different time.
[0026] Throughout the embodiments of the present invention, steps (related to the execution of instructions, preferably related to multiple fibers) may be performed with dynamically varying lengths.
[0027] Through its ability to maintain low latency for low activity and location-optimized access patterns, the present invention potentially improves performance and simplifies the partitioning of processors into sub-machines.
[0028] In cases where partitioning may be an issue, the sub-machines may be smaller, adding to the flexibility.
[0029] Compared to existing fixed memory response wait pipeline segments, the present invention allows continuation of execution as soon as conditions allow, without a specific need to wait for a defined delay.
[0030] The memory access method enabled through the present invention and Device Throughout the embodiments, memory units with flexible / varying waits or delays may be provided, but the ordering of instructions is not changed.
[0031] Through embodiments of the present invention, fiber execution instructions can essentially proceed down the pipeline as soon as a memory reference is received, or at least the next clock cycle after the memory reference is received. The latency or delay for waiting for a memory reference to arrive may also be substantially non-existent if no references that form shared memory are required.
[0032] Thus, the present invention can result in faster execution and possibly reduced energy usage.
[0033] In one embodiment, Device may be configured with a flexible latency processing unit, while in other embodiments Device may also comprise other entities, for example Device may include one or more processors, processor cores, caches, scratch pads, pipelined architectures, and / or ALUs (arithmetic logic units), and may be logically located before or after the flexible latency processing unit.
[0034] In one embodiment, Device may be implemented as a memory unit that may be included within a processor or may be implemented as a separate unit. For example, in some cases Device may be organized on the same integrated chip as the processor.
[0035] The exemplary embodiments presented in this document are not to be construed as presenting limitations to the application of the appended claims. The verb "to comprise" is used in this document as an open-ended verb that does not exclude the presence of unrecited features. Features recited in the dependent claims can be freely combined with each other unless otherwise indicated.
[0036] The novel features which are believed to be characteristic of the invention are set forth with particularity in the appended claims, but the invention itself, both as to its construction and its method of operation, together with additional objects and advantages thereof, will best be understood from the following description of certain illustrative embodiments when read in connection with the accompanying drawings.
[0037] Books DeviceThe discussion presented above regarding the various embodiments of may be flexibly applied to the embodiments of the present method, mutatis mutandis, and vice versa, as will be appreciated by those skilled in the art.
[0038] The invention will now be described in more detail with reference to exemplary embodiments according to the accompanying drawings. [Brief description of the drawings]
[0039] [Figure 1] We present a viable, scalable architecture for emulating shared memory on a silicon platform. [Diagram 2] An executable ESM architecture, essentially a CMP, is another way of expressing an ESM architecture. [Diagram 3] 1 shows an example of performing a function with TCF. [Figure 4] The overall structure of TPA is shown. [Diagram 5] This shows how to get data from memory. [Figure 6] 4 illustrates a preferred method of retrieving data from a memory according to one embodiment of the present invention. [Figure 7] 4 shows another exemplary diagram of a method for retrieving data from a memory according to an embodiment of the present invention; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0040] First, the ESM architecture is outlined. In Fig. 1, a high-level illustration of a scalable architecture for emulating a shared memory on a silicon platform is shown. It comprises a set of processors (cores) P1, P2, P3, ..., Pp 102 connected to a physically scalable high-bandwidth interconnection network 108 to a physically distributed but logically shared (data) memory M1, M2, M3, ..., Mp 112. An active memory unit 110 connected to the data memory 112 may be considered as a memory control logic unit utilized to process memory references. For example, the active memory unit 110 is arranged to manage the calculations related to the case where multiple memory references are directed to the same memory location, for example during a multi-(prefix) operation. Instruction memory modules I1, I2, I3, ..., Ip 104 are configured to carry program code to each processor 102. To efficiently emulate shared memory with a distributed memory-based implementation, the processor 102 is multithreaded using a periodic, interleaved inter-thread pipeline of Tp stages (Tp≧average network latency). The PRAM model is linked to the architecture such that a complete cycle in the pipeline typically corresponds to a single PRAM step. During a step of multithreaded execution (relating to the overall pipeline, i.e., all pipeline stages including the actual execution stage), each thread of each processor of the CMP executes one instruction that contains at most one shared memory-referencing subinstruction. Thus, a step lasts multiple times, at least Tp+1 clock cycles.
[0041] In the illustrated architecture, the step caches are generally associative memory buffers whose data are valid only until the end of a successive step of the multi-threaded execution. The main contribution of the step caches to concurrent access is that they progressively filter out all but the first reference of each reference memory location. This reduces the number of requests per location from Tp down to P, allowing them to be processed sequentially by a single-ported memory module assuming Tp≧P. The scratch pad is an addressable memory buffer that stores memory access data and maintains the associativity of the step cache limited to multi-operation implementation with the help of the step cache as well as minimal on-core and off-core ALUs (Arithmetic Logic Units) that handle the actual internal and inter-processor calculations of the multi-operation. The scratch pad may be coupled to the step cache to establish so-called scratch pad step cache units S1, S2, S3, ..., Sp106.
[0042] One basic idea of the outlined solution is in fact to allocate each processor core 102 with a set of threads that are executed efficiently in an interleaved manner, hiding the network latency. When a thread makes a memory reference, the executed thread is swapped and the next thread can make its memory request, and so on. No memory delay occurs if the response of the thread's memory reference arrives at the processor core before the thread is put back into execution. This requires that the network bandwidth is high enough so that hot spots can be avoided in the pipelined memory access traffic. For example, synchronicity between successive instructions can be guaranteed using elastic synchronization waves between steps.
[0043] FIG. 2 illustrates at 200 an example of an ESM, CMP architecture incorporating, for example, the above-mentioned active memory unit 112B (with ALU and fetcher) and scratch pad 206B connected to the data memory module 112. The network 108 may be a mesh-like interconnection network that functions as a high-bandwidth pipelined memory system with a switch 108B. Memory access latency is hidden by one thread executing another thread while referencing a uniformly accessible distributed shared memory over the network 108. Communicating references and hotspot congestion can be avoided with an efficient deadlock-free intercommunication architecture featuring high bandwidth (bipartition BW≧P / 4) and randomized hashing of memory locations across the distributed memory modules. Instruction execution occurs in steps corresponding to a single PRAM step, during which each thread executes a single instruction.
[0044] Moving next to the concept of TCF, the TCF model allows for packing computational elements that share similarity together to expose the natural synchronicity of parallel execution, and provides a simple and unambiguous mechanism for dynamically adjusting the number of elements executing in parallel.
[0045] The TCF model is a programming model that combines homogeneous computations with the same control flow into data-parallel entities that are managed by a single controller, rather than maintaining separate controls for each computation. The resulting entity is called a TCF and its components are called fibers. The number of fibers in a TCF is called its thickness.
[0046] When a thick control flow (in terms of number of fibers) executes program statements or expressions, all of the fibers are considered to execute the same program element in parallel. More precisely, some of the program variables are considered to be replicated fiber expressions, which conceptually means that there are instances of unique fiber-expression variables. Expressions based on using replicated variables are also conceptually replicated, meaning that each fiber needs to be evaluated individually. Similarly, statements may also be replicated. However, not all expressions or statements executed by a thick control flow need to be replicated, and such non-replicated (regular) program elements only need to be naturally evaluated / executed once by the thick flow, not fiber expressions. Thus, as the thick flow progresses through the program fragment, some of the expressions / statements are transformed into single instructions, while the replicated ones are transformed into sets of instructions.
[0047] Consider a method invocation: when a control flow with thickness t invokes a method, the method is not called separately with each fiber, but the control flow invokes only t fibers once. The call stack is not repeated for each fiber, but for each parallel control flow. Thus, the notion of fibers as threads is merely implicit here. The variables of a thick fiber expression are array-like constructs that hold the actual values of the fiber expressions. Executing a branch instruction may mean temporarily splitting a thick control flow into several other flows.
[0048] TCF execution is one instruction at a time. The time during which all fibers of a TCF execute one instruction is called a step. TCF execution is similar to SIMD execution, but there may be multiple TCFs executing simultaneously, and their thickness may vary arbitrarily. The TCF model guarantees synchronization between successive instructions and strict memory consistency, so that all shared memory work started by a previously replicated instruction is guaranteed to be completed before the current operation occurs. This may reduce the synchronization cost for ESMs, since synchronization occurs at each step defined by software rather than hardware. When there are multiple TCFs, their mutual execution order is not strictly defined, but the programmer can instruct them to follow a certain order via explicit inter-TCF synchronization.
[0049] Because the thickness of the TCF can be defined by the programmer without bounds, it is easy to represent the inherent parallelism of a wide range of inherent computational problems without worrying about running out of threads or having to match the software parallelism with the hardware parallelism with loops or explicit threads. Besides reducing the number of loops, the model can also simplify programming by eliminating index calculations related to threads.
[0050] Traditionally, a program is considered to have a flow of one thickness, conceptually measured by the number of parallel implicit threads. A method may be considered to have a thickness related to the thickness of its calling flow. To dynamically change the thickness of a flow, there are thick block statements that set a new thickness for a block, or thickness statements that set the thickness for an executed statement. Thick block statements are thick nested, as indicated by normal block statements. A thick block Bouter of thickness Touter contains an inner thickness block Binner of thickness Tinner. Since nested blocks are executed with flow expressions rather than fiber expressions, a thick block inside an executed flow has thickness Tinner (not Touter x Tinner) when considering the thickness of a flow. In the case of statements that set the thickness of an executed statement, the thickness of each code segment is explicitly specified.
[0051] A control statement (if, switch...) may temporarily mean splitting a thick control flow into several other flows, as shown in Fig. 3. A first block 302 of thickness with two consecutive instructions may be followed by a second block 304 of consecutive instructions of thickness 23 and 8. The second block 304 may then be split into two parallel third and fourth blocks 306 and 308, and after three instructions the third block 306 with an inner block of thickness 15 with a branch instruction is then split into two other inner blocks, resulting in parallel branches with thickness 12 and 3. The parallel blocks may be recombined after splitting.
[0052] Potentially discontinuous fiber subgroups (discrete indexes of implicit threads) resulting from splitting a thick control flow may be considered quite costly to implement. Thus, each parallel branch may be considered as a nested thick block with a thickness determined by the branches that the multiple implicit threads "choose". The implicit threads surrounding the block do not continue in the block determined by the branch instruction. When the above equates to parallel execution of multiple paths with a given thickness, the entire flow may be required to select exactly one path through the control statements. If the programmer wants to execute multiple paths in parallel, he needs to give parallel statements that create multiple control flows accordingly and set their thickness. Besides splitting the current flow into multiple parallel flows, the parallel statements may also perform an implicit join of the flows back to the calling flow at the end of the statement. It can be seen that the fibers of all control flows progress synchronously through a common program code, similar to the dynamic SIMD model. Once a flow is split into separate flows, no assumptions may be made on the speed of progress of the split flows. That is, in this sense, the parallel flows are asynchronous with respect to each other. However, if the programming language designer desires, execution can be made synchronous at the machine instruction level.
[0053] Although the TCF model can be programmed in essentially the same way as other parallel programming models, the nature of the model opens up possibilities for new conventions that have implications for the representation, behavior, and / or interpretation of computations. These can include synchronous parallel programming, loop reduction for parallel statements, easier control of parallelism during execution, and shorter program code.
[0054] The ESM, CESM and vector / SIMD systems, which have been reviewed more extensively in prior art papers, may be considered as simple versions of TCF systems. In the ESM and composable ESM cases, the thickness of the TCF is one and may also be called a thread, while for the vector / SIMD case, the TCF may be called a fiber as a vector and an element of a vector.
[0055] A function using TCF can execute faster on a true TCF-enabled architecture than the same function on a SIMD architecture, assuming the TCF-enabled architecture supports the computational duplication of TCF.
[0056] 4 illustrates at 400 an overall exemplary structure of a thick control flow processor architecture (TPA), which is an architecture that natively implements the TCF programming model. An instruction memory (IM) 402, a processor front end (FE) 404, a local memory (LM) 406, a TCF buffer (TB) 408, a processor back end unit (BE) 410, a replicated registration block (RR) 412, and a shared memory module (SM) 416 are shown in the diagram. A TPA chip multiprocessor may include F (super)scalar processor front end 404 attached to the instruction memory module 402, local memory 406 and TCF buffer 408 organized as a conventional memory system for multi-core processors, and B parallel processor back end 410 and shared memory module 416 attached to the replicated registration block 412 via a communication network 418.
[0057] The processor front-end 404 may support fast switching between multiple TCFs, their management, control execution and other common parts of code. Structurally, they may resemble multi-threaded superscalar processors, but instead of threads, TCFs with their own set of registrations are kept in a TCF buffer. Mimicking the terminology used with multi-threaded processors, this may be referred to as multi-TCFing. The memory system of the front-end 404 may include an instruction memory 402 and a local data memory 406, optionally interconnected over a network utilizing symmetric multi-processor (SMP) or non-uniform memory access (NUMA) provisions with optional cache coherence maintenance. This suggests that current multi-core processors can be used as the front-end 404 with relatively little modification.
[0058] The processor backend 410 supports a streamlined shared memory system with fibered data and can execute homogeneously parallel parts of code. Its structure may be similar to that of an emulated shared memory (ESM) pipeline with dynamic fiber execution capabilities. Like ESM processors, they can provide high performance in parallel execution using scalable latency hiding via multi-buffering, reduced basic synchronization costs via wave synchronization, and improved low-level parallelism via chaining of fundamental units (FUs), such as arithmetic logic units (ALUs).
[0059] Sending information from the front end 404 to the back end 410 and vice versa can be handled by the work spread network and return channel 420. The work spread network 420 can attach the front end 404 of a TCF-enabled processor to the back end 410. Its main purpose is to pass opcodes to the back end functional units along with selected data / operands. The return channel 420 can handle sending data of selected back end controlling back end units 410 to the front end 404. Since there are usually multiple back end units 410 controlled by a single front end 406, the return channel 420 can pass multiple data values or alternatively reduce to obtain a single value.
[0060] The idea in multi-fiber rings is to execute a fiber's reference while another fiber is progressing in the memory system. If the number of fibers is high enough and the overall communication network is not dense, the response can arrive before the fiber needs it. The first synchronization method exploits the fact that fibers are independent within a step of execution and can perform the synchronization operation only once per step. The second synchronization method may be able to overlap the synchronization with the memory reference. Together, these define a low-cost synchronization wave mechanism where the amortized cost incurred by synchronization falls to 1 / thickness. The idea of exploiting low-level parallelism is to connect FUs as a chain so that a unit can use its previous result as an operand rather than connecting the units in parallel, requiring independent operations. This allows the utilization of FUs to be increased by allowing the pipeline to execute dependent sub-instructions.
[0061] Interaction between the front-end 404 and the back-end 410 may occur by allocating TCFs to a single front-end 404 and to multiple front-ends 404 in an overlapping manner. This type of single-mode dual-purpose operation can avoid the dual-mode operation and switching overhead between them that exists in the ESM architecture. Support for unbounded thickness may be implemented by dynamically spawning fibers (or replicating instructions) on the pipeline and storing fibered data in a special replica registry block that spills its contents to an external memory system as needed.
[0062] Instruction execution in TPA architectures differs somewhat from that of NUMA or ESM architectures: an Fn-FU NUMA core executes at most Fn independent (sub)instructions in parallel, an Fe-FU ESM executes instructions up to Fe sub-instructions for a fixed number of threads per step in an interleaved manner, and a TPA can execute a sequence of front-end instructions and parallel back-end instructions for a variable number of TCFs with non-constant thickness in an interleaved manner. More specifically, the execution of a single TCF assigned to a front-end and multiple back-end units in a TPA can be performed as follows: - The front end 404, responsible for managing the TCFs, may switch the next TCF from its TCF buffer to become the current one if requested by the previous instruction; otherwise, the current TCF continues to be used. The front end 404 may then execute the sequence of scalar instructions defined by the program counter and instruction memory. When filling an instruction that contains a back-end operation, it may attempt to send the operation together with its operands to the associated back-end unit 410 via the work deployment network 420. If the network is busy, the front end 404 may wait until a TCF is free and then continue until there is an explicit TCF switch request. Execution on each associated back-end unit 410 may begin by checking if the unit is free. In the positive case, parallel operations, operands, and necessary TCF information on the head element of the work spread network 420 may be fetched for execution to all associated back-end units 410. In the negative case, the instructions of the work spread network 420 wait for a parallel unit to become free. The TCFs may then be split as equally as possible between the relevant backend units 410, and the backends start generating and processing fibers in parallel until they run out. During fiber generation, each fiber can obtain the operands, fiber identifiers and instructions for the FU from the data sent by the front end, while the fiber intermediate results are fetched from the replicated registration block 412. The fiber may then be propagated through the pipeline and may execute the sub-instruction in a back-end functional unit.
[0063] More specifically, it may be specified that a TPA instruction may be executed in three front-end phases and three back-end phases. For each active front-end 404, the phase is: F1. Selecting the next TCF from the TCF buffer 408 if required by a previous instruction; F2. Fetching the (sub)instruction(s) indicated by the PC of the current TCF of the NUMA memory system; and F3. Execute the sub-instruction of the functional unit specified by the (sub)instruction(s). Memory sub-instructions are typically directed to an SMP / NUMA memory system. If the instruction includes a back-end portion, select the operands and send them via work deployment network 420 along with the portion to the back-end 410 assigned to the front-end 404. Store the data of the current TCF in TCF buffer 408 if required by the corresponding sub-instruction and switch to the next TCF.
[0064] For each backend 410, the phase is: B1. If the backend 410 is no longer executing the previous instruction, fetch the next instruction from the work deployment network 420 to determine the fiber to be executed in the backend. Otherwise, continue executing the previous instruction. B2. Generate fibers for the pipelined TCF according to the allocation determined in B1. B3. For each fiber, the following may be done: B3.1 Select operands from the received front-end data and the replicated registration block 412. B3.2 Execute the back-end sub-instruction. The memory sub-instruction is directed to the shared memory system. B3.3 Write back to the replicated registration block and send any response data back to the frontend 404 via a return channel built into the working deployment network 420.
[0065] After all active TCFs for the front-end 404 have been executed for a single instruction, the TPA may issue special synchronization TCFs, one deep per back-end, that send and receive synchronization to and from the shared memory system.
[0066] FIG. 5 shows a method for obtaining data from a shared memory that can be implemented in a back-end unit in a TCF architecture, the method essentially corresponding to that already implemented in prior art solutions. For example, an ESM memory unit has been presented before and a response waiting queue is used. The vertical lines may indicate separate fibers that can be executed in a processor pipeline, with pipeline segment 1 representing the part of the pipeline before the memory access operation and pipeline segment 2 representing the part of the pipeline that is at least logically located after the memory access operation, the memory access operation referring to the memory access stage where the shared memory unit is accessed. The send logic 502 sends a request to the shared memory unit if a response is required from the shared memory unit. The memory access operation can enter a latency compensation registered transfer line (LCRTL) in that operation, which has L waiting stages LCR1...LCRL, which essentially correspond to the response waiting queues of known ESM systems.
[0067] The LCRTL has an L-stage latency compensation, where L may be a fixed segment length. For example, the segment length L for all types of workloads is fixed, corresponding to the response waiting queue of the ESM memory unit. The length of the segment may be selected according to a scenario close to the worst case during the design time of the MU. For example, if it is concluded that it may take at most a certain number of clock cycles to receive a response, a number of clock cycles slightly less than this may be selected as the fixed response waiting time / segment length. Thus, all types of memory references wait the same predetermined time, possibly unnecessarily, since some memory references will complete before this time. If the shared memory is busy, the entire back-end pipeline freezes until the memory access command pipeline can be restarted. The memory references proceed through the pipeline nine, and a minimum of L stages is the delay required for all workloads. The receive logic 504 monitors whether a possible response is received by the LCRL, and freezes the pipeline if not.
[0068] 6 provides a preferred method of retrieving data from a shared memory that may be implemented in a TCF architecture according to an embodiment of the present invention in which a flexible latency compensation unit (FLCU) 601 may comprise a local memory 602, referred to herein as an L-element FLCU buffer 602 and control logic, where L refers to the depth of the local memory buffer 602, i.e., how many memory reference requests it can hold. L may be chosen arbitrarily, but in practice it may be advantageous to determine L to be greater than the maximum latency for a memory read request, preferably for a situation where there is no traffic for communication.
[0069] The control logic may comprise transmitting logic 604 functionally located before the local memory 602 and receiving logic 606 functionally located after the local memory 602 .
[0070] When at least one fiber is executed (TCF thickness ≧1), the TCF model advantageously allows for synchronous operation of steps, such that shared memory references generated in a previous step are completed before the current step begins. In one embodiment, FLCU 601 may be able to make the results of shared memory references available to all fibers of the TCF during the current step.
[0071] The length of an instruction step and / or execution may be dynamically varied according to the latency of the actual requested shared memory reference.
[0072] At least with respect to fibers, shared memory accesses may in one embodiment be implemented using a first-in, first-out principle, i.e., completed shared memory references may be utilized in the order in which they are called by the sequence of instructions in the fiber.
[0073] The send logic 604 may monitor if the shared memory is busy, and if so, freeze the pipeline up to the send logic 604. If the FCLU buffer 602 is read while it is full (already holding an L request), new data may be written to the free space via a read operation in the same clock cycle. The pipeline may also be frozen up to the send logic if the send logic monitors that the FCLU buffer 602 is full, and if the FLCU read unit is not frozen. It should be noted that if data cannot be written and read for a single clock cycle, the buffers may be used as a multi-buffer collective where one of the buffers is written and another is read.
[0074] In particular, when FIFO-type buffering is used, a memory reference may be accessed in the FLCU memory unit 602, and the receive logic 606 may advantageously monitor every clock cycle whether the memory reference is completed. If a possible response is not received, the FLCU buffer read may be frozen / stopped until a response is received. This stall time may also be referred to as latency or delay, and thus may be flexible, i.e., varying depending on how long it takes to receive the requested memory reference. The latency may also be essentially zero if the memory reference is not requested.
[0075] Through embodiments of the present invention, the delay associated with a shared data memory access may be dynamically determined by the actual required shared data memory access latency, which may be advantageous over, for example, a memory response wait pipeline segment or a predetermined latency registered transfer line, such as, for example, the LCRTL of FIG.
[0076] 7 shows another exemplary diagram of one of the methods of retrieving data from memory in accordance with the present invention, comprising FIFO-type buffering (and thus an FLCU 601 including a local memory, referred to herein as an FLCU FIFO buffer 602) and exemplary components of a pipeline segment. When the TCF executes, the operand selection logic 702 may retrieve the requested operands associated with each fiber from the replicated registration block 412. One or more pre-memory ALUs 704 may be logically located before the memory access stage, although an ALU 706 located after the memory access may also be added. The write-back logic 708 may write to the replicated registration block 412.
[0077] In the embodiment of FIG. 7, the sending logic 604 is The FIFO buffer 602 may be monitored for fullness, freezing the pipeline until the transmit logic 604 in either case.
[0078] The memory reference may be accessed in the FLCU FIFO buffer 602, and the receive logic 606 may advantageously monitor every clock cycle whether the memory reference is completed. If a possible response is not received, the FLCU FIFO buffer read may be frozen / stopped until a response is received.
[0079] In an embodiment of the invention, the TCF can provide memory units, even in simpler implementations connecting, for example, to an ESM, CESM or vector / SIMD, with flexible, i.e. dynamic, latency in at least cases where the receiving unit of the memory processes at least some functions independently, e.g. without relying on a fixed, predetermined latency registered transfer line / memory response waiting pipeline segment.
[0080] In some embodiments, the present invention may be utilized in non-TCF processors where memory references are queued and otherwise registered transfer lines with fixed delays are utilized.
[0081] The present invention has been described above with reference to the above-mentioned embodiments, and some advantages of the present invention have been demonstrated. It is clear that the present invention is not limited to only these embodiments, but includes all possible embodiments within the spirit and scope of the present invention through the following claims.
[0082] The features recited in the dependent claims may be freely combined with one another, unless otherwise indicated.
Claims
1. An apparatus for processing shared data memory accesses for a TCF enabled processor, the apparatus comprising at least a flexible latency processing unit (601) with a local memory (602) and associated control logic, the local memory being provided for storing shared data memory access related data, the apparatus being configured to receive at least one TCF including at least one instruction, the at least one instruction being associated with at least one fiber, the flexible latency processing unit performing the following steps: determining whether a shared data memory access is requested by the at least one instruction; if a shared data memory access is required, transmitting a shared data memory access request; monitoring, via a flexible latency processing unit, once per clock cycle whether a response to said shared data memory access request is received; pausing continued execution of said instructions until a response is received; continuing execution of the instruction after receiving the response such that a clock cycle delay associated with the shared data memory access is dynamically determined by an actual requested shared data memory access latency and corresponds to at least one clock cycle; An apparatus configured to:
2. The apparatus of claim 1 , wherein the shared data memory access is implemented using a first-in, first-out principle.
3. 3. The apparatus of claim 2, configured to store data relating to a plurality of instructions in said local memory and, after receiving said response, if any, continue execution of each instruction, the instructions being executed on a first-in, first-out basis taking into account the order of receipt of said instructions.
4. 4. The apparatus of claim 1, further configured to store data relating to the at least one instruction in the local memory, the data relating to the at least one instruction comprising data defining the instruction and / or data referenced by the instruction fetched through a shared data memory access.
5. 5. The apparatus of claim 1, wherein the TCF comprises a plurality of fibers, each fiber including a plurality of instructions, and wherein shared data memory access requests are sent through the flexible latency processing unit, and execution of a sequence of instructions pauses all fibers executing a similar sequence until all shared data memory references relating to all fibers for a respective instruction have been received.
6. The apparatus of any one of claims 1 to 5, wherein the control logic comprises a sending logic (604) functionally arranged in front of the local memory, the sending logic configured to pause at least a portion of a processor pipeline if a shared data memory is busy and / or the local memory is full.
7. The apparatus of claim 6 , wherein the processor pipeline is further suspended, even the sending logic.
8. The apparatus of any one of claims 1 to 7, wherein the control logic comprises a receiving logic (606) operatively arranged after the local memory, the receiving logic configured to pause at least a portion of a processor pipeline until the response is received.
9. The apparatus of claim 8 , wherein the processor pipeline following a read unit and / or the receive logic associated with the flexible latency processing unit is paused.
10. The apparatus of any preceding claim, wherein the apparatus is configured to receive data from one or more arithmetic logic units (ALUs) logically arranged in front of the flexible latency processing unit.
11. The apparatus of any one of claims 1 to 10, wherein the apparatus is configured to transmit data to one or more arithmetic logic units (ALUs) logically arranged after the flexible latency processing unit.
12. 12. Apparatus as claimed in claim 10 or 11, wherein two or more ALUs are chained to pass data between them.
13. A method for processing shared data memory accesses in a TCF-enabled processor, comprising: receiving at least one instruction, the at least one instruction associated with at least one fiber; and determining whether a shared data memory access is required by the at least one instruction; if a shared data memory access is required, transmitting a shared data memory access request; monitoring, via a flexible latency processing unit (601), once per clock cycle whether a response to said shared data memory access request is received; pausing continued execution of said instructions until a response is received; continuing execution of the instruction after receiving the response such that a clock cycle delay associated with the shared data memory access is dynamically determined by an actual requested shared data memory access latency and corresponds to at least one clock cycle; A method comprising:
Citation Information
Patent Citations
Memory unit for emulated shared memory architectures
EP2806361A1
Floating point support pipeline for emulated shared memory architecture
JP2016534433A
Floating-point supportive pipeline for emulated shared memory architectures
WO2015059362A1
