8 research outputs found
Towards a Software Transactional Memory for heterogeneous CPU-GPU processors
The heterogeneous Accelerated Processing Units (APUs) integrate a multi-core CPU and a GPU within the same chip. Modern APUs provide the programmer with platform atomics, used to communicate the CPU cores with the GPU using simple atomic datatypes. However, ensuring consistency for complex data types is a task delegated to programmers, who have to implement a mutual exclusion mechanism. Transactional Memory (TM) is an optimistic approach to implement mutual exclusion. With TM, shared data can be accessed by multiple computing threads speculatively, but changes are only visible if a transaction ends with no conflict with others in its memory accesses. TM has been studied and implemented in software and hardware for both CPU and GPU platforms, but an integrated solution has not been provided for APU processors.
In this paper we present APUTM, a software TM designed to work on heterogeneous APU processors. The design of APUTM focuses on minimizing the access to shared metadata in order to reduce the communication overhead via expensive platform atomics. The main objective of APUTM is to help us understand the tradeoffs of implementing a sofware TM on an heterogeneous CPU-GPU platform and to identify the key aspects to be considered in each device. In our experiments, we compare the adaptability of APUTM to execute in one of the devices (CPU or GPU) or in both of them simultaneously. These experiments show that APUTM is able to outperform sequential execution of the applications.This work has been supported by projects TIN2013-42253-P and TIN2016-80920-R, from the Spanish Government, P11-TIC8144 and P12- TIC1470, from Junta de Andalucía, and Universidad de Málaga. Campus de Excelencia Internacional Andalucía Tech
HeTM: Transactional Memory for Heterogeneous Systems
Modern heterogeneous computing architectures, which couple multi-core CPUs
with discrete many-core GPUs (or other specialized hardware accelerators),
enable unprecedented peak performance and energy efficiency levels.
Unfortunately, though, developing applications that can take full advantage of
the potential of heterogeneous systems is a notoriously hard task. This work
takes a step towards reducing the complexity of programming heterogeneous
systems by introducing the abstraction of Heterogeneous Transactional Memory
(HeTM). HeTM provides programmers with the illusion of a single memory region,
shared among the CPUs and the (discrete) GPU(s) of a heterogeneous system, with
support for atomic transactions. Besides introducing the abstract semantics and
programming model of HeTM, we present the design and evaluation of a concrete
implementation of the proposed abstraction, which we named Speculative HeTM
(SHeTM). SHeTM makes use of a novel design that leverages on speculative
techniques and aims at hiding the inherently large communication latency
between CPUs and discrete GPUs and at minimizing inter-device synchronization
overhead. SHeTM is based on a modular and extensible design that allows for
easily integrating alternative TM implementations on the CPU's and GPU's sides,
which allows the flexibility to adopt, on either side, the TM implementation
(e.g., in hardware or software) that best fits the applications' workload and
the architectural characteristics of the processing unit. We demonstrate the
efficiency of the SHeTM via an extensive quantitative study based both on
synthetic benchmarks and on a porting of a popular object caching system.Comment: The current work was accepted in the 28th International Conference on
Parallel Architectures and Compilation Techniques (PACT'19
Improvements in Hardware Transactional Memory for GPU Architectures
In the multi-core CPU world, transactional memory (TM)has emerged as an alternative to lock-based programming for thread synchronization. Recent research proposes the use of TM in GPU architectures, where a high number of computing threads, organized in SIMT fashion, requires an effective synchronization method. In contrast to CPUs, GPUs offer two memory spaces: global memory and local memory. The local memory space serves as a shared scratch-pad for a subset of the computing threads, and it is used by programmers to speed-up their applications thanks to its low latency. Prior work from the authors proposed a lightweight hardware TM (HTM) support based in the local memory, modifying the SIMT execution model and adding a conflict detection mechanism. An efficient implementation of these features is key in order to provide an effective synchronization mechanism at the local memory level.
After a quick description of the main features of our HTM design for GPU local memory, in this work we gather together a number of proposals designed with the aim of improving those mechanisms with high impact on performance. Firstly, the SIMT execution model is modified to increase the parallelism of the application when transactions must be serialized in order to make forward progress. Secondly, the conflict detection mechanism is optimized depending on application characteristics, such us the read/write sets, the probability of conflict between transactions and the existence of read-only transactions. As these features can be present in hardware simultaneously, it is a task of the compiler and runtime to determine which ones are more important for a given application. This work includes a discussion on the analysis to be done in order to choose the best configuration solution.Universidad de Málaga. Campus de Excelencia Internacional Andalucía Tech
BifurKTM: Approximately Consistent Distributed Transactional Memory for GPUs
We present BifurKTM, the first read-optimized Distributed Transactional Memory system for GPU clusters. The BifurKTM design includes: GPU KoSTM, a new software transactional memory conflict detection scheme that exploits relaxed consistency to increase throughput; and KoDTM, a Distributed Transactional Memory model that combines the Data- and Control- flow models to greatly reduce communication overheads.
Despite the allure of huge speedups, GPUs are limited in use due to their programmability and extreme sensitivity to workload characteristics. These become daunting concerns when considering a distributed GPU cluster, wherein a programmer must design algorithms to hide communication latency by exploiting data regularity, high compute intensity, etc. The BifurKTM design allows GPU programmers to exploit a new workload characteristic: the percentage of the workload that is Read-Only (e.g. reads but does not modify shared memory), even when this percentage is not known in advance. Programmers designate transactions that are suitable for Approximate Consistency, in which transactions "appear" to execute at the most convenient time for preventing conflicts. By leveraging Approximate Consistency for Read-Only transactions, the BifurKTM runtime system offers improved performance, application flexibility, and programmability without introducing any errors into shared memory.
Our experiments show that Approximate Consistency can improve BkTM performance by up to 34x in applications with moderate network communication utilization and a read-intensive workload. Using Approximate Consistency, BkTM can reduce GPU-to-GPU network communication by 99%, reduce the number of aborts by up to 100%, and achieve an average speedup of 18x over a similarly sized CPU cluster while requiring minimal effort from the programmer
Transactional memory on heterogeneous architectures
Tesis Leida el 9 de Marzo de 2018.Si observamos las necesidades computacionales de hoy, y tratamos de predecir
las necesidades del mañana, podemos concluir que el procesamiento heterogéneo
estará presente en muchos dispositivos y aplicaciones.
El motivo es lógico: algoritmos diferentes y datos de naturaleza diferente encajan mejor
en unos dispositivos de cómputo que en otros. Pongamos como ejemplo una
tecnología de vanguardia como son los vehículos inteligentes. En este tipo de
aplicaciones la computación heterogénea no es una opción, sino un requisito.
En este tipo de vehículos se recolectan y analizan imágenes, tarea para la cual
los procesadores gráficos (GPUs) son muy eficientes.
Muchos de estos vehículos utilizan algoritmos sencillos,
pero con grandes requerimientos de tiempo real, que deben
implementarse directamente en hardware utilizando FPGAs.
Y, por supuesto, los procesadores multinúcleo tienen un
papel fundamental en estos sistemas, tanto organizando el trabajo de otros coprocesadores
como ejecutando tareas en las que ningún otro procesador
es más eficiente. No obstante, los procesadores tampoco siguen siendo dispositivos
homogéneos. Los diferentes núcleos de un procesador pueden
ofrecer diferentes características en términos de potencia y consumo
energético que se adapten a las necesidades de cómputo de la aplicación.
Programar este conjunto de dispositivos es una tarea compleja, especialmente
en su sincronización.
Habitualmente, esta sincronización se basa en operaciones atómicas, ejecución y
terminación de kernels, barreras y señales. Con estas primitivas de sincronización
básicas se pueden construir otras estructuras más complejas.
Sin embargo, la programación de estos
mecanismos es tediosa y propensa a fallos. La memoria transaccional
(TM por sus siglas en inglés) se ha propuesto como un mecanismo
avanzado a la vez que simple para garantizar la exclusión mutua
Efficient Transactional-Memory-based Implementation of Morph Algorithms on GPU
General Purpose GPUs (GPGPUs) are ideal platforms for parallel execution of applications with regular shared memory access patterns. However, majority of real world multithreaded applications require access to shared memory with irregular patterns. The morph algorithms, which arise in many real world applications, change their graph data structures in unpredictable ways, thus, leading to irregular access patterns to shared data. Such irregularity makes morph algorithms more challenging to be implemented on GPUs which favor regularity. The Borouvka’s algorithm for calculating Minimum Spanning Forest (MSF), and multilevel graph partitioning are two examples of morph algorithms with varied levels of expressed parallelism. In this work we show that a transactional-memory-based design and implementation of the morph algorithms on GPUs can handle some of the challenges arising due to irregularities such as complexity of code and overhead of synchronization. First, we identify the major phases of the algorithm which requires synchronization of the shared data. If the algorithm exhibits certain algebraic properties (e.g., monotonicity, idempotency, associativity), we can use lock-free synchronizations for performance; otherwise we utilize a Software Transactional Memory (STM) based synchronization method. Experimental results show that our GPU-based implementation of Borouvka’s algorithm outperforms both the fastest sequential implementation and the existing STM-based implementation on multicore CPUs when tested on large-scale graphs with diverse densities. Moreover, to show the applicability of our approach to other morph algorithms, we do a pen-and-paper implementation and complexity analysis of multilevel graph partitioning
A semantically aware transactional concurrency control for GPGPU computing
PhD ThesisThe increased parallel nature of the GPU a ords an opportunity for
the exploration of multi-thread computing. With the availability of
GPU has recently expanded into the area of general purpose program-
ming, a concurrency control is required to exploit parallelism as well
as maintaining the correctness of program. Transactional memory,
which is a generalised solution for concurrent con
ict, meanwhile allow
application programmers to develop concurrent code in a more intu-
itive manner, is superior to pessimistic concurrency control for general
use. The most important component in any transactional memory
technique is the policy to solve con
icts on shared data, namely the
contention management policy.
The work presented in this thesis aims to develop a software trans-
actional memory model which can solve both concurrent con
ict and
semantic con
ict at the same time for the GPU. The technique di ers
from existing CPU approaches on account of the di erent essential ex-
ecution paths and hardware basis, plus much more parallel resources
are available on the GPU. We demonstrate that both concurrent con-
icts and semantic con
icts can be resolved in a particular contention
management policy for the GPU, with a di erent application of locks
and priorities from the CPU.
The basic problem and a software transactional memory solution idea
is proposed rst. An implementation is then presented based on the
execution mode of this model. After that, we extend this system to re-
solve semantic con
ict at the same time. Results are provided nally,
which compare the performance of our solution with an established
GPU software transactional memory and a famous CPU transactional
memory, at varying levels of concurrent and semantic con
icts