Hybrid Hardware-Software Coherent Framework

A hybrid hardware-software coherent framework addresses the limitations of traditional I/O models by enabling accelerators to cache memory locally, reducing latency and bandwidth issues, and improving system performance through shared coherency with the host.

JP7568657B2Active Publication Date: 2024-10-16XILINX INC
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2021570287
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-05-29
Filing Date
2020-05-08
Publication Date
2024-10-16
Estimated Expiration
2040-05-08

AI Technical Summary

Technical Problem

Traditional I/O models for accelerator-memory interactions in host computing systems suffer from high latency, bandwidth limitations, and protocol messaging overhead due to hardware-enforced coherency, where all interactions must pass through the main CPU-memory complex, and accelerators cannot cache memory.

Method used

A hybrid hardware-software coherent framework is implemented, allowing accelerators to share the same coherent domain as the host, enabling data ownership transfer and management within the accelerator device using software coherency, reducing overhead and enabling efficient cache usage.

Benefits of technology

This framework reduces computational memory bottlenecks by allowing accelerators to cache memory locally, minimizing latency and bandwidth issues while maintaining coherency, thus enhancing overall system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007568657000001
    Figure 0007568657000001
  • Figure 0007568657000002
    Figure 0007568657000002
  • Figure 0007568657000003
    Figure 0007568657000003
Patent Text Reader

Abstract

The accelerator device (140) shares the same coherence domain as hardware elements within the host computing device (105). The mixed hardware and software coherency reduces the overhead of managing data when large amounts of data are moved from the host to the accelerator device. An accelerator application (125) running on the host identifies a data set (130) that it wishes to transfer to the accelerator device for processing. The accelerator application transfers ownership from a home agent (135) within the host to the accelerator device. A slave agent (155) can then take ownership of the data. This allows any memory operation request received from a request agent (145) within the accelerator device to access the data set in local memory (160) via the slave agent without the slave agent needing permission from the home agent within the host.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] Technical Field Examples of this disclosure generally relate to accelerators that use a cooperative hardware-software coherent framework to transfer data between a host and an accelerator device. [Background technology]

[0002] Background technology In a traditional I / O model, a host computing system interfaces with a peripheral I / O device (e.g., an accelerator) when executing an accelerator task or function using a custom I / O device driver specific to the peripheral I / O device. A drawback of this model is that all accelerator-memory interactions must go through a home agent node in the main CPU-memory complex, sometimes called the server host. Because this model uses hardware-enforced coherency, all accelerator-memory interactions are handled and tracked by the home agent node, regardless of whether the accelerator-memory data footprint is orders of magnitude larger than a cache line (MB, GB, or even TB), even if the processor (producer) on the server host ultimately only has access to a portion of the data footprint on which the accelerator performed its computation. Another drawback is that all memory accessed and cached by the accelerator is remote, server host-attached memory. A further drawback of this model is that PCIe I / O-based accelerators cannot cache memory. Accelerator memory interaction occurs solely in server host-attached memory and the drawbacks of that approach are the latency, bandwidth, and protocol messaging overhead.

[0003] On the other hand, the hardware cache coherent shared memory multiprocessor paradigm leverages a common instruction set architecture (ISA) independent model of interfacing in executing tasks or functions on the multiprocessor CPU. The common ISA independent (e.g., C code) model of interfacing coordinates both the number of processing units and the amount of shared memory available to those processing units. Traditionally, peripheral I / O devices have not been able to benefit from the coherent paradigm used by CPUs executing on a host computing system. Summary of the Invention [Means for solving the problem]

[0004] Summary of the Invention Techniques for transferring ownership of a data set to an accelerator device are described. One example is a computing system including a host with a processing unit, a home agent (HA), and an accelerator application, and an accelerator device communicatively coupled to the host, the accelerator device including a request agent (RA) configured to perform at least one accelerator function, a slave agent (SA), and a local memory, the local memory being part of the same coherent domain as the processing unit in the host. The accelerator application is configured to transfer ownership of the data set from the HA to the accelerator device, and the accelerator device is configured to store an up-to-date copy of the data set in the local memory, process memory requests from the RA using the SA, and return ownership of the data set to the HA.

[0005] In some embodiments, the accelerator application is configured to identify a data set, where the data set is a subportion of a memory block or a memory page.

[0006] In some embodiments, after transferring ownership of the data set from the HA to the accelerator device, the remainder of the memory block or memory page continues to be homed by the HA.

[0007] In some embodiments, processing of memory requests from a RA using a SA is performed without receiving permission from a HA.

[0008] In some embodiments, the processing unit comprises a cache, the cache storing modified versions of the dataset.

[0009] In some embodiments, the accelerator device is configured to send a flush command to the HA instructing the processing unit to flush its cache so that modified versions of the dataset are moved to local memory after ownership of the dataset is transferred to the accelerator device.

[0010] In some embodiments, the processing unit is configured to, in response to the flush command, invalidate modified versions of the data set in the cache or to retain a cached clean copy of the modified version of the data set for future low-latency re-reference.

[0011] In some embodiments, the accelerator application is configured to send a flush command to the HA instructing the processing unit to flush its cache so that modified versions of the dataset are moved to local memory before ownership of the dataset is transferred to the accelerator device.

[0012] In some embodiments, the accelerator application is configured to send an invalidation command to the HA instructing the processing unit to invalidate the cache before ownership of the data set is transferred to the accelerator device.

[0013] One example described herein is an accelerator device including an RA with a computation engine configured to perform at least one accelerator function, an SA with a memory controller, and a memory. The RA is configured to receive ownership of a data set from a HA in a host coupled to the accelerator device to the SA, the ownership being transferred by a software application. The memory controller is configured to process requests sent by the computation engine to access the data set stored in the memory once the ownership is transferred to the SA. The RA is configured to return ownership from the SA to the HA.

[0014] In some embodiments, the data set is a sub-portion of a memory block or memory page, and after transferring ownership of the data set from the HA to the SA, the remainder of the memory block or memory page continues to be homed by the HA and processing of the request is performed without receiving permission from the HA.

[0015] In some embodiments, the accelerator device is configured to communicate with the host using a coherent interconnect protocol to extend the host's coherent domain to include memory and SAs within the accelerator device.

[0016] One example described in this specification is a method that includes steps of transferring ownership of a data set from a HA in a host to an accelerator device, where the accelerator device is communicatively coupled to the host and the coherent domain of the host is extended to the accelerator device, moving the data set to a local memory in the accelerator device, processing a memory request from an RA in the accelerator device using an SA in the accelerator device, and returning ownership from the accelerator device to the HA.

[0017] In some embodiments, the method includes identifying a dataset using an accelerator application running on the host, the dataset being a sub-portion of a memory block or memory page, and after transferring ownership of the dataset from the HA to the accelerator device, a remainder of the memory block or memory page continues to be homed by the HA.

[0018] In some embodiments, the method includes invalidating the modified data set in the cache after transferring ownership to the accelerator device in response to a cache maintenance operation (CMO) issued by the accelerator device.

[0019] BRIEF DESCRIPTION OF THE DRAWINGS So that the above features may be understood in detail, a more particular description than that briefly summarized above can be had by reference to exemplary implementations, some of which are illustrated in the accompanying drawings. It should be noted, however, that the accompanying drawings depict only typical exemplary implementations and therefore should not be considered as limiting the scope thereof. [Brief description of the drawings]

[0020] [Figure 1] 1 is a block diagram of a host coupled to an accelerator device according to an example. [Diagram 2] 1 is a block diagram of a host coupled to an accelerator device according to an example. [Diagram 3] 1 is a flow chart for using a collaborative hardware-software coherent framework, according to an example. [Figure 4] 1 is a flow chart for using a collaborative hardware-software coherent framework, according to an example. [Diagram 5] 1 illustrates a field programmable gate array implementation of a programmable IC according to an example. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0021] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Various features are described below with reference to the drawings. It should be noted that the drawings may or may not be drawn to scale, and elements of similar structure or function are represented by similar reference numbers throughout the drawings. It should be noted that the drawings are intended only to facilitate the description of features. They are not intended as an exhaustive description of the description or as a limitation on the scope of the claims. Furthermore, the illustrated example need not have all aspects or advantages shown. An aspect or advantage described in connection with a particular example is not necessarily limited to that example, and may be implemented in any other example, even if not so shown or explicitly described.

[0022] Examples herein describe accelerator devices (e.g., peripheral I / O devices or accelerator-attached memory) that share the same coherent domain as hardware elements in a host computing device. As a result, computational resources within the accelerator device's coherent domain can communicate with the host in a manner similar to CPU-to-CPU communication within the host. This means that computational resources can take advantage of coherency-type features such as direct communication (without address translation), more efficient memory usage, and non-uniform memory access (NUMA) awareness. Coherent memory relies on fine-grained memory management, where the home agent node manages memory at the cache line level.

[0023] However, accelerator tasks typically deal with large amounts of memory, which may be better managed using software coherency rather than hardware coherency, where a home agent in the host manages the data processed by the accelerator device. For example, a drawback of the hardware coherency model is that all accelerator-memory interactions still go through the server host first. This model uses coherency enforced by hardware, regardless of whether the accelerator-memory data footprint is orders of magnitude larger than a cache line (MB, GB, or even TB), and regardless of whether the memory is attached to the accelerator, even if the processor (producer) only has access to a portion of the data footprint on which the accelerator performed the computation, all accelerator-memory interactions are still first handled and tracked by the host. In contrast, software coherency is where the accelerator device manages the data stored in its memory, similar to the traditional host-I / O model, where the host transfers the large amount of data to the I / O device, the device processes the data, and the I / O device notifies the host when the processed data is ready. Meanwhile, the software coherency model ensures that the host does not access the data until the data processed by the I / O accelerator is ready.

[0024] Embodiments herein describe a blend of hardware and software coherency to create a hybrid hardware-software framework that reduces the overhead of managing data as large volumes of data are moved from the host to the accelerator device when the host and accelerator are in the same coherent domain. In one embodiment, an accelerator application running on the host identifies a data set that it wishes to transfer to the accelerator device for processing. The accelerator application notifies the accelerator device via software coherent methods by modifying metadata about the data or by modifying control data structures accessed by the accelerator device. In response, the accelerator device uses hardware coherent techniques to send a request to the host requesting the latest version of the data set and that no cached copies of the data set remain in the host. The host then uses hardware coherent techniques to ensure that the latest version of the data is stored in memory in the accelerator device and invalidates all copies of the data set in the CPU cache. A requesting agent in the accelerator device begins processing the data set in local memory via a slave agent in accordance with the accelerator application. In one embodiment, the request agent may cache a subset of the local memory and process the cached copy. Software coherency ensures that any memory operation request received from the request agent in the accelerator device can access the data set in the local memory through the slave agent without the slave agent having to obtain permission from the host. For example, the slave agent does not need to check with the home agent to see if it has the latest version of the data set or if it still has a cached copy of the data to be processed by the accelerator device.When the accelerator device completes processing of the data set, it flushes the cached subset, updates its local memory, and returns ownership to the home agent in the host via software coherent methods, e.g., by the accelerator device modifying metadata or control data structures accessed by the host processor. This re-establishes the host as the enforcer of hardware coherency between the data set and the rest of the system, just as when a task is completed in a traditional host I / O model where the accelerator device is in a different domain than the host. Thus, by being in the same coherency domain and relying on hardware coherency enforcement, the accelerator device and the host avoid the high overhead that occurs in transferring ownership of large amounts of data to the local memory in the accelerator device via software methods. By being in the same coherency domain, the accelerator device and the host can also avoid the high overhead of returning processed data from the local memory in the accelerator device to the host.

[0025] FIG. 1 is a block diagram of a computing system 100 including a host 105 coupled to an accelerator device 140, according to an example. The accelerator device 140 can be any device (e.g., a peripheral I / O device) that executes tasks issued by the host 105. In one embodiment, the host 105 is communicatively coupled to the accelerator device 140 using a PCIe connection. In another embodiment, the accelerator device 140 is not a separate I / O device, but is part of a host-attached memory. The host 105 can represent a single computer (e.g., a server) or multiple interconnected physical computing systems. In either case, the host 105 comprises multiple CPUs 110, memory 115, and a home agent 135.

[0026] Memory 115 includes an operating system (OS) 120, which may be any OS capable of performing the functions described herein. In one embodiment, OS 120 (or hypervisor or kernel) establishes a cache coherent shared memory multiprocessor paradigm for CPU 110 and memory 115. In one embodiment, CPU 110 and memory 115 are OS-managed (or kernel / hypervisor-managed) to form a coherent domain that follows the cache coherent shared memory multiprocessor paradigm.

[0027] In embodiments herein, the shared memory multiprocessor paradigm, along with all the performance advantages, software flexibility, and reduced overhead of that paradigm, is available to accelerator device 140. Furthermore, adding the computational resources in accelerator device 140 to the same coherent domain as CPU 110 and memory 115 enables a general purpose, ISA-independent development environment.

[0028] In one embodiment, accelerator device 140 and host 105 use a coherent interconnect protocol to extend the coherent domain of host 105 to accelerator device 140. For example, accelerator device 140 can use Cache Coherent Interconnect for Accelerators (CCIX) to extend the coherent domain within device 140. CCIX is a high-performance inter-chip interconnect architecture that provides a cache coherent framework for heterogeneous system architectures. CCIX brings kernel management semantics to accelerator device 140. Cache coherency is automatically maintained between CPU 110 on host 105 and various other accelerators in the system, which may be located on any number of peripheral I / O devices.

[0029] However, other coherent interconnect protocols other than CCIX, such as Quick Path Interconnect (QPI), Omni-Path, Infinity Fabric, NVLink, or OpenCAPI, may be used to extend the coherent domain in host 105 to include the computational resources in accelerator device 140. That is, accelerator device 140 may be customized to support any type of coherent interconnect protocol that facilitates the formation of a coherent domain that includes the computational resources in accelerator device 140.

[0030] In one embodiment, HA 135 performs coherency operations for memory in system 100, both memory 115 in host 105 and memory 160 in accelerator device 140. In a coherent system, memory address ranges are homed by a designated HA, which provides the advantage of fast coherency resolution for cache lines accessed by CPU 110 in host 105 and request agent 145 in accelerator device 140. HA 135 ensures that the latest version of data, which may be stored simultaneously in different locations (or caches), is retrieved when a request to read or modify that data is received. These requests may originate from a request agent (e.g., request agent 145) in CPU 110 or attached accelerator device 140. Although one HA 135 is shown, computing system 100 may have any number of HAs, with each HA serving as home to a different memory address range.

[0031] Accelerator device 140 can be many different types of peripheral devices, such as a pluggable card (plugged into an expansion slot of host 105), a system-on-chip (SoC), a graphics processing unit (GPU), a field programmable gate array (FPGA), etc. For example, accelerator device 140 can include programmable logic (e.g., a programmable logic array) or may not include programmable logic, but instead include only hardened circuitry (which may be software programmable).

[0032] Accelerator device 140 includes a request agent (RA) 145, a slave agent (SA) 155, and memory 160 (also referred to as local memory). In one embodiment, RA 145 is a computation engine optimized to perform specialized computations. In one embodiment, RA 145 is hardware, firmware, or a combination thereof. For example, RA 145 may be one or more computation engines implemented in programmable logic. In another example, RA 145 may be a computation engine formed from hardened circuitry (e.g., a core of a GPU or other ASIC). In either case, RA 145 executes accelerator functions 150 for the accelerator device. These functions 150 may be part of a machine learning accelerator, a cryptography accelerator, a graphics accelerator, a search accelerator, a decompression / compression accelerator, etc. In one embodiment, accelerator functions 150 are implemented in programmable logic (e.g., a programmable logic array) within accelerator device 140. In another embodiment, the accelerator functionality 150 is implemented in hardened logic (which may be software configurable), such as a processing core or engine.

[0033] Generally, the computational engine(s) in RA 145 execute accelerator functions 150 faster or more efficiently than if those same functions were executed using one or more of CPUs 110 in host 105. Although one accelerator function 150 is shown and one accelerator application 125 is shown, computing system 100 may have any number of accelerator functions, with each accelerator function processing a different data set in memory.

[0034] In one embodiment, SA 155 is a memory controller (which may be a hardware circuit) that processes requests to read or write data from memory 160. RA 145 ensures that coherency is maintained when a data memory operation is performed from RA 145 to memory 160. For example, if RA 145 wants to read data from memory 160, RA 145 may first send a request to HA 135 to determine whether a more recent version of the data is available elsewhere in system 100. Additionally, although memory 160 is shown within accelerator device 140, in another embodiment, memory 160 may be on a separate chip (e.g., attached memory) from the integrated circuit that forms accelerator device 140.

[0035] As described in more detail below, SA 155 has different functions depending on the current stage or configuration of system 100. In one stage, HA 135 is the sole agent of the data stored in memory 160, and SA 155 functions like a typical memory controller in a coherent system. However, in another stage, software coherency has given SA 155 ownership of the data stored in local memory 160, and RA 145 does not need to ask HA 135 for permission when processing the data stored in memory 160. For example, if RA 145 wants to read data from memory 160 to perform accelerator function 150, in the second stage, SA 155 can provide the data without RA 145 first checking with HA 135 to see if there is a more recent version of the data elsewhere in system 100 (e.g., stored in memory 115, or in an on-chip cache of one of CPUs 110).

[0036] Although RA 145 is shown as separate from memory 160, in one embodiment RA 145 may be a computation engine embedded within memory 160 and performing in-memory computations. In that case, rather than accelerator device 140 having physically separate RA 145 and SA 155 as shown in FIG. 1, the location of the accelerator may be logically separate and in memory with RA 145 and SA 155 performing in-memory computations.

[0037] 2 is a block diagram of a host 105 coupled to an accelerator device 140, according to an example. Unlike a traditional I / O model, memory 160 and processing elements (e.g., RA 145 and SA 155) in accelerator device 140 are in the same coherent domain as CPU 110 and memory in host 105. In this way, HA 135 in host 105 ensures that data stored in host 105 and accelerator device 140 is stored coherently, such that a request for a memory operation receives the latest version of the data, regardless of whether it originates from host 105 or accelerator device 140, regardless of whether the data is stored in memory in host 105 or accelerator device 140.

[0038] In some applications, the bottleneck in processing data comes not from the time it takes to process that data, but from moving the data to the computational unit that processes it. In other words, instead of the processor or computational engine being the bottleneck, moving the data to and from the processor or computational engine limits the speed at which an operation can be performed. This situation often occurs when accelerators are used because accelerators have specialized computational engines (e.g., accelerator engines) that can perform certain types of functions very quickly. In many cases, it is not the computational engine that limits the efficiency of using the accelerator, but the system's ability to move data to the accelerator for processing. The situation in which moving data to the computational engine limits the time required to complete a task is called a computational memory bottleneck. Moving the computational engine closer to the data can help alleviate this problem.

[0039] In the first embodiment, a traditional I / O data sharing model can be used, where large amounts of data are moved from the host 105 to the accelerator device 140. However, the host 105 and the accelerator device 140 are no longer in the same coherency domain. As a result, the I / O-based accelerator device cannot cache memory, which further isolates the computation engine (e.g., RA 145) from the data to be processed. Instead of using hardware coherency, software coherency is used, where a software application (e.g., accelerator application 125) establishes with HA 135 the data it wants to manage and transfers to the accelerator device 140 (e.g., data set 130). When the accelerator device 140 completes processing the data, the accelerator application 125 can regain ownership of the data and maintain (or re-establish) hardware coherency for that data with HA 135.

[0040] In a second embodiment, the host 105 and the accelerator device 140 can share the same coherent domain, so that data can be cached in the accelerator device 140 to help alleviate computational memory bottlenecks. For example, memory can be attached to the host 105 (e.g., host-attached memory) and data can be stored in a cache in the RA 145. However, a drawback of this model is that all accelerator-memory interactions go through the HA 135 in the main CPU-memory complex in the host 105. This embodiment also uses hardware-enforced coherency, so regardless of whether the accelerator-memory data footprint is orders of magnitude larger than a cache line (MB, GB, or even TB), all accelerator-memory interactions are handled and tracked by the HA 135, even if the CPU 110 (the producer) ultimately only has access to a portion of the data footprint on which the accelerator device 140 performed computations. In other words, HA 135 must keep track of all data sent to cache in RA 145, even if CPU 110A may only access a small portion of that data. Another drawback is that all memory accessed and cached by accelerator device 140 is remote, host-attached memory.

[0041] In a third embodiment, the memory that stores the data processed by the accelerator device 140 is attached to (or within) the accelerator device 140 (e.g., memory 160) but is homed by the HA 135 in the host 105. In this embodiment, the shortcomings of the second embodiment also apply in that all accelerator-memory interactions still pass through the HA 135 in the host 105. However, unlike the previous embodiment, once ownership of a cache line is acquired by the accelerator device 140, updates to the data set 130 can be made local to the memory 160. This embodiment also uses hardware-enforced coherency, so that the other shortcomings of the second embodiment also apply in that all accelerator-memory interactions are still initially processed and tracked by the HA 135, regardless of whether the accelerator-memory data footprint is orders of magnitude larger than a cache line (MB, GB, or even TB), and regardless of whether the memory is attached to the accelerator, even if the CPU 110A only has access to a portion of the data set 130 that was ultimately processed by the accelerator device 140.

[0042] Instead of the above three embodiments, a cooperative framework can be used in which the advantages of the above first, second, and third embodiments are incorporated into the system while avoiding their disadvantages. In addition to the above advantages, the cooperative framework has further advantages. In one embodiment, the memory continues to be homed by the HA 135 in the host 105, and continues to provide the advantage of quick coherency resolution to cache lines accessed by the CPU 110 in the host 105. Also, as opposed to requiring that all accelerator accesses to memory be tracked by software coherency at a coarse level, as in the first embodiment, or that all accelerator accesses to memory have fine-grained tracking, as in the second and third embodiments, in the cooperative framework, only a fine-grained subset of accelerator-memory interactions first go through the HA 135 to claim ownership.

[0043] Regarding another advantage of the cooperative framework, unlike software coherency, where all memory pages or entire memory blocks may be flushed from a CPU cache (e.g., cache 210), for the subset of accelerator-memory interactions that go to HA 135, only the portions that are cached in the host CPU 110 are snooped from the CPU cache 210. Accelerator-memory interactions that do not touch the contents of the CPU cache 210 remain cached, and can provide low-latency access to that data to the CPU 110 (and their cores 205).

[0044] Another advantage of the cooperative framework is that unlike the second and third embodiments, in which accelerator-memory interactions occur only with host-attached memory, and the latency, bandwidth, and protocol messaging overhead drawbacks of that approach, in the cooperative framework, accelerator-memory interactions can occur on accelerator-attached memory 160, and the location of the accelerator is near-memory or in-memory, which provides a low-latency, high-bandwidth dedicated path and also minimizes protocol messaging overhead due to subsequent private accelerator-memory interactions between RA 145 and SA 155.

[0045] Another advantage of the cooperative framework is that, unlike the third embodiment where the accelerator location is near memory or in memory, interactions with the memory require home node ownership. In the cooperative framework, once the accelerator device 140 claims ownership of the dataset 130 on which the computation is performed, all subsequent computation-memory operations are performed without interaction with the HA 135 until ownership is returned to the HA 135.

[0046] The following embodiments describe different techniques for using the collaborative framework to achieve the above advantages. However, the collaborative framework is not limited to these advantages. Some implementations of the framework may have fewer advantages than those listed above, while other implementations may have different advantages that are not listed.

[0047] 3 is a flow chart of a method 300 for using a collaborative hardware-software coherent framework, according to an example. At block 305, an accelerator application identifies a data set to send to the accelerator for processing. In one embodiment, the accelerator application is a software application that performs a task that can benefit from an accelerator device. For example, the accelerator application may be a machine learning application where the accelerator device includes one or more machine learning engines, a video application where the accelerator device performs graphics processing, a search engine where the accelerator device searches for a particular word or phrase, or a security application where the accelerator device performs encryption / decryption algorithms on data.

[0048] In either case, the accelerator device may be aware of a cooperative framework that enables ownership of data to be transferred from a HA on the host to a SA on the accelerator device while the host and accelerator device share the same coherency domain. Thus, the accelerator device may identify a data set that it wishes to send to the accelerator device as part of the cooperative framework.

[0049] In block 310, the accelerator application (e.g., or some other software application) transfers ownership of the data set from the server host to the accelerator device. In one embodiment, the accelerator application updates metadata or a flag monitored by the accelerator device. This update transfers ownership of the data set from the HA to the accelerator device (e.g., an RA in the accelerator device). This transfer of ownership allows the hardware in the accelerator device to know that it can operate on the data set without worrying about the HA in the host (because the accelerator device now owns the data set).

[0050] In one embodiment, the accelerator application transfers ownership of only a subset of data on which computational memory operations are performed. That is, the accelerator application can only identify data that the accelerator device processes as part of its accelerator function. Thus, the accelerator application in the host can transfer ownership only for data that the accelerator device processes. This is an advantage over traditional I / O models and software coherency, where entire pages or memory blocks are flushed from the CPU cache, not just the required data set (which may be a sub-portion of those pages and memory blocks).

[0051] In block 315, the accelerator device (or more specifically, the RA) exercises ownership of the dataset by requesting a latest copy of the dataset from the server host. Doing so causes the dataset to be moved to local memory within the accelerator device. In one embodiment, the dataset may be guaranteed to be in local memory of the accelerator device as part of maintaining hardware coherency between the host and the accelerator device. In that case, the dataset identified in block 305 may already be stored in local memory within the accelerator before the accelerator application transfers ownership in block 310. However, in another embodiment, the RA (or accelerator device) may use flush and / or invalidate commands to ensure that the dataset is moved to local memory within the accelerator device and / or that no cached copies remain. Various techniques for ensuring that the local memory within the accelerator device contains the latest version of the dataset are described in more detail below in FIG. 4.

[0052] In block 320, the RA processes memory requests using the SA. When the SA processes memory requests in the accelerator device, the SA can process those requests without first checking with the HA, for example, whether the latest version of the data is available elsewhere in the system, i.e., the data set is currently homed by the accelerator device.

[0053] In one embodiment, the HA does not track any changes to the dataset while the dataset is homed by the accelerator device. This reduces system overhead because the RA can read and modify the dataset without the SA having to first get permission from the HA. As mentioned above, the HA tracks data on a cache line basis, which means that each cache line in the dataset needs to be checked by the HA before processing a memory operation. However, once the SA has homed the dataset, this function is performed solely by the SA without assistance from the HA in the host.

[0054] Furthermore, while the data set is being processed by the RA, and unless the RA indicates it is complete, software coherency ensures that the CPU in the host can only read, but not write, the data set. Software coherency also ensures that if a CPU attempts to read data that has not yet been updated, the CPU must not derive any semantics from reading an "old" value in performing that read. Only after the accelerator returns ownership to the software / HA can the CPU derive semantics from the values ​​in the updated data.

[0055] In block 325, the RA determines whether processing of the data set is complete. If the RA has not completed execution of its accelerator function on the data set, method 300 repeats 320, and the RA continues to send additional memory requests to the SA for portions of the data set. However, once the RA has completed processing the data set, method 300 proceeds to block 330, and the RA returns ownership of the data set to the HA. Thus, rather than software transferring ownership as performed in block 310, in block 330, it is hardware in the accelerator device that sets software-accessible metadata that indicates to the accelerator application that the accelerator device has completed processing the data set. In one embodiment, the RA updates the metadata for cases where the producer-consumer model requires the RA to notify the CPU when the RA has completed execution of the accelerator function on the data set. The HA can ensure that hardware coherency of the (changed) data is maintained (or re-established) with entities in the host, such as host-attached memory and caches in the CPU. In other words, the software (e.g., the accelerator application) uses the HA to implicitly exercise ownership of the data set. The accelerator application only sees the HA as a coherency enforcer.

[0056] In one embodiment, the transfer of ownership of a data set from the HA to the SA and back to the HA as shown in method 400 can be considered a type of software coherency, but differs from the software coherency used in traditional I / O models because a target data set is identified and no flushing / invalidation of caches (e.g., CPU caches) in the host is required.

[0057] 4 is a flow chart of a method 400 for using a cooperative hardware-software coherent scheme, according to an example. In general, the method 400 describes various techniques for moving data from various memory elements in the host to local memory in the accelerator device, such that the HA can transfer ownership of the data to the SA, as described in the method 300.

[0058] In block 405, the CPU caches at least a portion of the dataset. That is, the portion of the dataset may be stored in a cache in the CPU before the accelerator application transfers ownership of the dataset. In block 410, the CPU modifies the portion of the dataset stored in its cache. That is, the portion of the dataset may be stored in various caches and memories in the host before the accelerator application transfers ownership in block 310 of method 300. The dataset stored in the various caches may be duplicate copies of memories in the host or updates to the dataset as a result of software (e.g., the accelerator application) implicitly exerting ownership of the dataset using the HA. Thus, before transferring ownership of the dataset to the SA in the accelerator device, the system requires a technique to ensure that the latest version of the dataset is stored in the accelerator-attached memory, i.e., local memory.

[0059] At block 415, method 400 branches depending on whether software or hardware is used to send the modified data set to the accelerator device. That is, the task of ensuring that the accelerator device has the most up-to-date data set can be performed by either software (e.g., the accelerator application) or hardware within the accelerator device (e.g., an RA).

[0060] Assuming software has been assigned this task, method 400 proceeds to block 420, where the accelerator application in the host ensures that the modified data is sent to the accelerator device. In one embodiment, block 420 is performed before the accelerator device transfers ownership of the data set from the HA in the host to the accelerator device (e.g., before block 310 of method 300).

[0061] There are at least two different options for moving modified data in the server to the accelerator device, shown as alternative sub-blocks 425 and 430. In block 425, the HA receives only a flush command from the accelerator application. In one embodiment, this flush command is a persistent flush or flush to target to ensure that all modified data (e.g., modified data in the CPU cache) has been updated in persistent (i.e., non-volatile) memory or target memory in the accelerator device. In response to the flush command, the HA ensures that the modified data is flushed from various caches in the host and copied to local memory in the accelerator device.

[0062] The CPU in the host may invalidate the cache or keep a clean cached copy of the content corresponding to the data set for future low-latency re-reference. In this example, the HA may not receive an explicit invalidation command from the accelerator application, but the CPU may go ahead and invalidate the portions of those data sets stored in their cache. In another example, the CPU may keep its own local copy of the data set (which may be modified) while the data is homed by the SA in the accelerator device.

[0063] In an alternative embodiment, the HA receives flush and invalidate commands from the accelerator application in block 430. In response, the CPUs in the hosts flush and invalidate their caches.

[0064] In one embodiment, the flush and invalidate commands described in blocks 425 and 430 are cache maintenance operations (CMOs) that automatically ensure that the modified data set (e.g., the most recent data set) is stored in local memory. In one embodiment, there are two types of CMOs that the accelerator application can issue: one that ensures that the most recent data set is stored in local memory but allows the CPU to maintain a cached copy (e.g., only a flush command), and another that not only ensures that the most recent data set is stored in local memory but also ensures that no cached copy remains (e.g., a flush and invalidate command).

[0065] Returning to block 415, if the hardware in the accelerator device, rather than the software, is tasked with ensuring that the modified data set is received, the method proceeds to block 435, where the hardware waits until the accelerator application transfers ownership of the data set to the accelerator device (as described in block 310 of method 300). Once this transfer of ownership has occurred, the method 400 proceeds to block 435, where the hardware (e.g., RA) in the accelerator device issues one or more CMOs to ensure that the modified data is sent to the accelerator device. As with block 420, there are at least two different options for moving the modified data in the host to the accelerator device, shown as alternative sub-blocks 445 and 450. In block 445, the HA receives only a flush command from the RA. The operations that can be performed by the CPU in the host can be the same as those described in block 425, and are not repeated here.

[0066] Alternatively, the HA receives a flush and invalidate command from the RA in block 450. In response, the CPUs in the hosts flush and invalidate their caches, as described in block 430.

[0067] In one embodiment, the HA may have a last level cache. When transferring ownership, the HA may ensure that the latest data set is not pinned to the last level cache, but instead copied to the local memory of the accelerator device. The final state in the last level cache is the same as the final state of the CPU cache, and is consistent with the operations in the CPU cache resulting from either block 420 or block 440.

[0068] Some further non-limiting advantages of the techniques described in Figures 3 and 4 are that if memory continues to be homed by the HA in the host (when data is not homed by the SA on the accelerator), all cache and coherency operations by the CPU to memory are quickly resolved by the local HA, thus maintaining high performance CPU-memory access even when a cooperative framework exists in parallel. Furthermore, the cooperative framework can request ownership of only a subset of accelerator-memory interactions to exercise separate or combined CMO and ownership requests to the HA. By transferring ownership only for the relevant subset, the accelerator has a performance advantage by not having to claim ownership of the entire data set as would be required in a pure software coherency model in a traditional I / O model.

[0069] A further advantage is that the CPU-memory interaction can also obtain a performance advantage in that a subset that does not overlap with the accelerator-memory interaction continues to be processed by the local HA that maintains high-performance CPU-memory access. Furthermore, in one embodiment, only the data subset shared between the CPU and the accelerator is flushed from the CPU cache, and the content that is not shared with the accelerator can continue to be cached in the CPU, providing the CPU with low-latency access to that data. Also, the accelerator-memory interaction in the execution of the computational memory domain-specific architecture is performed on a low-latency, high-bandwidth dedicated path that is independent from the CPU-memory interaction. The software coherency subset of the cooperative framework can ensure that the metadata handoff between the host and the accelerator enables independent CPU-memory execution and accelerator-memory execution, thus improving the overall cross-sectional bandwidth, latency, and program execution performance of both the CPU and the accelerator device.

[0070] Furthermore, although the above embodiments illustrate a hybrid hardware-software coherency framework for computing memory bottlenecks, similar techniques can be applied to related CPU accelerator shared memory applications.

[0071] 5 shows an FPGA 500 implementation of accelerator device 140; more specifically, the FPGA has a PL array that includes a number of different programmable tiles, including transceivers 37, CLBs 33, BRAMs 34, input / output blocks ("IOBs") 36, configuration and clocking logic ("CONFIG / CLOCKS") 42, DSP blocks 35, dedicated input / output blocks ("IOs") 41 (e.g., configuration and clock ports), and other programmable logic 39, such as digital clock managers, analog-to-digital converters, system monitoring logic, etc. The FPGA may also include a PCIe interface 40, an analog-to-digital converter (ADC) 38, etc.

[0072] In some FPGAs, each programmable tile may include at least one programmable interconnect element ("INT") 43 having connections to input and output terminals 48 of programmable logic elements within the same tile, as shown by the example included at the top of FIG. 5. Each programmable interconnect element 43 may also include connections for interconnecting segments 49 of adjacent programmable interconnect elements within the same tile or other tiles. Each programmable interconnect element 43 may also include connections for interconnecting segments 50 of general-purpose routing resources between logic blocks (not shown). The general-purpose routing resources may include routing channels between logic blocks (not shown) that comprise tracks of interconnect segments (e.g., interconnect segments 50) and switch blocks (not shown) for connecting the interconnect segments. The interconnect segments of the general-purpose routing resources (e.g., interconnect segments 50) may span one or more logic blocks. The programmable interconnect elements 43 together with the general-purpose routing resources implement a programmable interconnect structure ("programmable interconnect") for the illustrated FPGA.

[0073] In an exemplary implementation, the CLB 33 may include a configurable logic element ("CLE") 44 that can be programmed to implement a single programmable interconnect element ("INT") 43 in addition to user logic. The BRAM 34 may include a BRAM logic element ("BRL") 45 in addition to one or more programmable interconnect elements. Typically, the number of interconnect elements included in a tile depends on the height of the tile. In the illustrated example, the BRAM tile has the same height as five CLBs, although other numbers (e.g., four) may be used. The DSP block 35 may include a DSP logic element ("DSPL") 46 in addition to any suitable number of programmable interconnect elements. The IOB 36 may include, for example, two instances of an input / output logic element ("IOL") 47 in addition to one instance of a programmable interconnect element 43. As will be apparent to one skilled in the art, the actual IO pads connected to, for example, the IO logic element 47 are typically not limited to the area of ​​the input / output logic element 47.

[0074] In the illustrated example, a horizontal region near the center of the die (as shown in FIG. 5) is used for configuration, clocks, and other control logic. Vertical columns 51 extending from this horizontal region or column are used to distribute clock and configuration signals across the width of the FPGA.

[0075] Some FPGAs utilizing the architecture shown in Figure 5 include additional logic blocks that break up the regular columnar structure that makes up most of the FPGA. The additional logic blocks can be programmable blocks and / or dedicated logic.

[0076] It should be noted that Figure 5 is intended to depict merely an exemplary FPGA architecture. For example, the number of logic blocks in a row, the relative width of the rows, the number and order of the rows, the types of logic blocks included in the rows, the relative sizes of the logic blocks, and the interconnect / logic implementations included in the upper portion of Figure 5 are purely exemplary. For example, in an actual FPGA, multiple adjacent CLB rows will typically be included where a CLB appears to facilitate efficient implementation of user logic, although the number of adjacent CLB rows will vary depending on the overall size of the FPGA.

[0077] In the above, reference is made to the embodiments presented in the present disclosure. However, the scope of the present disclosure is not limited to the specific described embodiments. Instead, any combination of the described features and elements is envisioned to implement and perform the envisioned embodiments, whether related to different embodiments or not. Furthermore, the embodiments disclosed herein may achieve other possible solutions or advantages over the prior art, but whether or not a particular advantage is achieved by a given embodiment does not limit the scope of the present disclosure. Thus, the aforementioned aspects, features, embodiments and advantages are merely exemplary and are not considered elements or limitations of the appended claims unless expressly recited in the claims.

[0078] As will be appreciated by those skilled in the art, the embodiments disclosed herein may be embodied as a system, method, or computer program product. Thus, aspects may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, microcode, etc.), or an embodiment combining software and hardware aspects, all of which may be generally referred to herein as a "circuit," "module," or "system." Additionally, aspects may take the form of a computer program product embodied in one or more computer readable medium(s) having computer readable program code embodied therein.

[0079] Any combination of one or more computer readable media may be utilized. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination thereof. More specific examples (non-exhaustive list) of computer readable storage media include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the context of this specification, a computer readable storage medium is any tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device.

[0080] A computer-readable signal medium may include a propagated data signal having computer-readable program code embodied therein, for example in baseband or as part of a carrier wave. Such a propagated signal may take any of a variety of forms, including but not limited to electromagnetic, optical, or any suitable combination thereof. A computer-readable signal medium is not a computer-readable storage medium, but may be any computer-readable medium that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.

[0081] The program code embodied on the computer readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, fiber optic cable, RF, etc., or any suitable combination thereof.

[0082] Computer program code for carrying out operations for aspects of the present disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as the "C" programming language or similar programming languages. The program code can run entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer, partially on a remote computer, or entirely on a remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet Service Provider).

[0083] Aspects of the present disclosure are described below with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments presented in this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, executing via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions / acts specified in one or more blocks of the flowchart illustrations and / or block diagrams.

[0084] These computer program instructions may also be stored on a computer-readable medium that can direct a computer, other programmable data processing apparatus, or other device to function in a particular manner, such that the instructions stored on the computer-readable medium produce an article of manufacture including instructions that implement the functions / acts specified in one or more blocks of the flowcharts and / or block diagrams.

[0085] The computer program instructions may also be loaded into a computer, other programmable data processing apparatus, or other device to cause the computer, other programmable apparatus, or other device to execute a series of operational steps to generate a computer-implemented process, such that the instructions executing on the computer or other programmable apparatus provide a process for implementing the functions / operations specified in one or more blocks of the flowcharts and / or block diagrams.

[0086] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various examples of the present invention. In this regard, each block in the flowcharts or block diagrams may represent a module, segment, or part of instructions that includes one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions described in the blocks may be performed in an order different from the order described in the figures. For example, two blocks shown in succession may in fact be executed substantially simultaneously, or the blocks may sometimes be executed in the reverse order, depending on the functionality involved. It should also be noted that each block of the block diagrams and / or flowchart diagrams, as well as combinations of blocks in the block diagrams and / or flowchart diagrams, may be implemented by a dedicated hardware-based system that executes the specified functions or operations or executes a combination of dedicated hardware and computer instructions.

[0087] While the above is directed to particular examples, other and further examples may be devised without departing from the basic scope thereof, which is determined by the claims that follow.

Claims

1. 1. A computing system comprising: a host including a processing unit, a home agent (HA) and an accelerator application; an accelerator device communicatively coupled to the host, the accelerator device comprising: a request agent (RA) configured to execute at least one accelerator function; a slave agent (SA); and a local memory, the local memory being part of the same coherent domain as the processing unit in the host; The accelerator application is configured to transfer ownership of a data set from the HA to the accelerator device; The accelerator device storing an up-to-date copy of the data set in the local memory; Using the SA to process memory requests from the RA; The computing system is configured to return ownership of the data set to the HA.

2. The computing system of claim 1 , wherein the accelerator application is configured to identify the data set, the data set being a subportion of a memory block or a memory page.

3. 3. The computing system of claim 2, wherein after transferring ownership of the data set from the HA to the accelerator device, remaining portions of the memory blocks or memory pages continue to be homed by the HA.

4. The computing system of claim 1 , wherein processing of the memory request from the RA using the SA is performed without receiving authorization from the HA.

5. The computing system of claim 1 , wherein the processing unit comprises a cache, the cache storing modified versions of the data set.

6. The accelerator device 6. The computing system of claim 5, further configured to: after ownership of the dataset is transferred to the accelerator device, send a flush command to the HA instructing the processing unit to flush the cache such that the modified version of the dataset is moved to the local memory.

7. The processing unit, in response to the flush command, invalidating the modified version of the data set in the cache; and and retaining a cached clean copy of the modified version of the data set for future low-latency re-reference.

8. The accelerator application 6. The computing system of claim 5, further configured to send a flush command to the HA instructing the processing unit to flush the cache such that the modified version of the dataset is moved to the local memory before ownership of the dataset is transferred to the accelerator device.

9. The accelerator application 10. The computing system of claim 8, further configured to send an invalidation command to the HA instructing the processing unit to invalidate the cache before ownership of the data set is transferred to the accelerator device.

10. 1. An accelerator device, comprising: a request agent (RA) comprising a computation engine configured to execute at least one accelerator function; a slave agent (SA) having a memory controller; A memory, The RA is configured to receive ownership of a data set from a home agent (HA) in a host coupled to the accelerator device to the SA, the ownership being transferred by a software application; the memory controller is configured to process requests sent by the computation engine to access the data set stored in the memory once ownership has been transferred to the SA; The accelerator device, wherein the RA is configured to return ownership from the SA to the HA.

11. 11. The accelerator device of claim 10, wherein the data set is a sub-portion of a memory block or memory page, and after transferring ownership of the data set from the HA to the SA, a remaining portion of the memory block or memory page continues to be homed by the HA, and processing of the request is performed without receiving permission from the HA.

12. 11. The accelerator device of claim 10, wherein the accelerator device is configured to communicate with the host using a coherent interconnect protocol to extend a coherent domain of the host to include the memory and the SA within the accelerator device.

13. 1. A method comprising: transferring ownership of a data set from a home agent (HA) in a host to an accelerator device, the accelerator device being communicatively coupled to the host and extending a coherent domain of the host to the accelerator device; moving the data set to a local memory within the accelerator device; using a slave agent (SA) in the accelerator device to process memory requests from a request agent (RA) in the accelerator device; transferring ownership back from the accelerator device to the HA.

14. further comprising identifying a data set using an accelerator application running on the host; 14. The method of claim 13, wherein the data set is a sub-portion of a memory block or memory page, and after transferring ownership of the data set from the HA to the accelerator device, a remaining portion of the memory block or memory page continues to be homed by the HA.

15. and after transferring ownership to the accelerator device, invalidating the modified data set in the cache in response to a cache maintenance operation (CMO) issued by the accelerator device. The method of claim 13.

Citation Information

Patent Citations

  • Management of coherent links and multi-level memory

    US20190042425A1

  • Accelerator fabric

    US20190102311A1

  • Memory access method and information processing apparatus

    WO2010038301A1

  • Cache coherence for processing in memory

    WO2017209883A1

  • Contended lock request elision scheme

    WO2017223346A1