• No results found

Efficient On-Chip Pipelined Streaming Computations on Scalable Manycore Architectures

N/A
N/A
Protected

Academic year: 2021

Share "Efficient On-Chip Pipelined Streaming Computations on Scalable Manycore Architectures"

Copied!
4
0
0

Loading.... (view fulltext now)

Full text

(1)

Efficient On-Chip

Pipelined Streaming

Computations on

Scalable Manycore

Architectures

Nicolas Melot

∗,1

, Christoph Kessler

∗,1

,

Jörg Keller

†,2

Linköpings Universitet, Dept. of Computer and Inf. Science, Linköping, SwedenFernUniversitat in Hagen, Fac. of Math. and Computer Science, Hagen, Germany

ABSTRACT

Performance of manycore processors is limited by programs’ use of off-chip main memory. Streaming computation organized in a pipeline limits accesses to main memory to tasks at boundaries of the pipeline to read or write to main memory. The Single Chip Cloud computer (SCC) offers 48 cores linked by a high-speed on-chip network, and allows the implementation of such on-chip pipelined technique. We assess the performance and constraints provided by the SCC and investigate on on-chip pipelined mergesort as a case study for streaming computations. We found that our on-chip pipelined mergesort yields significant speedup over classic parallel mergesort on SCC. The technique should bring improvement in power consumption and should be portable to other manycore, network-on-chip architectures such as Tilera’s processors.

1

Introduction

Scaling up the number of cores integrated in a single chip is made difficult by the mechanisms neces-sary to implement shared memory and keep high performance thanks to caches. In a shared memory system, all caches maintain a coherent view of a shared memory, which requires complex hardware that is hard to extend to serve many cores. The Single Chip Cloud computer (SCC) issued from In-tel’s Tera-scale research program eliminates the hardware overhead required to maintain a consistent view of shared memory. Instead, consistent view of shared memory in caches is maintained through software protocols with the help of a non-uniform, low-latency shared on-die memory accessible by all 48 cores through a high-speed on-chip network.

Multicore and manycore processors can reduce energy consumption while providing better com-putation power, but their parallel nature makes them very challenging to program efficiently. Many

1E-mail: {nicolas.melot, christoph.kessler}@liu.se 2E-mail: joerg.keller@FernUni-Hagen.de

(2)

contributions address automatic or compiler-assisted parallelization of sequential programs, schedul-ing or synchronization issues for example. Some other contributions extend or create programmschedul-ing languages and provide constructs to help programmers to express parallelism, for example OpenMP or Streamit [TKA02]. Streamit organizes computation in a succession of filters linked by channels from which filters can read input data and write the corresponding output. Depending on their char-acteristics, they can be mapped to different cores or accelerators in order to achieve task or pipeline parallelism [UGT09].

The heavy use of main memory impacts both speed and energy performance of multi and many-core processors [HKK10]. On-chip pipelining [HKK10] reorganizes computations into a task graph where tasks can be compared to Streamit filters. Tasks are mapped to cores and forward intermediate results to the next tasks in the graph through on-chip network and distributed memory, or via cores’ local memory if mapped to the same core. This reduces accesses to main memory strictly to nodes having to fetch input data or write final computation results, and thus frees intermediate communica-tions from costly latencies thanks to the high-speed on-chip network. Such property would benefit to software running on MPSoC, whose design is heavily constrained by energy consumption issues and that already makes heavy use of streaming computations; for instance to process image sequences or Fast Fourier Transform.

We use mergesort as a simple streaming computation case study to demonstrate the usefulness of the on-chip pipelined approach to parallel computation. We investigated performance and limitation of the SCC and we implemented a non-pipelined parallel version of mergesort as a comparison basis to the on-chip pipelined variant. We introduce an ILP (Integer Linear Programming) formulation to solve the task-to-processor mapping problem, taking into account the constraints measured in previous work. Finally, we implemented on-chip pipelined mergesort and compare its performance with non-pipelined parallel mergesort for SCC.

The rest of the paper is structured as follow: section 2 introduces the SCC architecture and the performance constraints we observed. Section 3 introduces the on-chip pipelining approach and its implementation on the SCC. Finally, section 4 concludes and introduces future work.

2

The Single Chip Cloud computer

The SCC provides 48 independent Intel x86 cores, organized in 24 tiles. Figure 1(a) provides a global schematic view of the chip. Tiles are linked together through a 6 × 4 mesh on-chip network. Each tile embeds two cores as well as a common message passing buffer (MPB) of 16KiB (8KiB for each core); the MPB supports direct core-to-core communication.

The cores are IA-32 x86 (P54C) cores which are provided with individual L1 and L2 caches of size 32KiB (16KiB code + 16KiB data) and 256KiB, respectively, but no SIMD instructions. Each link of the mesh network is 16 bytes wide and exhibits a 4 cycles crossing latency, including the routing activity.

Each core is attributed a private domain in main memory whose size depends on the total memory available (max 64 GiB). Six tiles (12 cores) share one of the four memory controllers to access cores’ private memory. Cores can access an off-chip shared memory whose size can vary up to several hundred megabytes. Note that private memory is cached on cores’ L2 cache but caching for shared memory is disabled or offers no coherency among cores’ caches. Intel provides the RCCE library which contains MPI-like routines to synchronize cores and allows them to communicate data to each other. RCCE also allows the management of voltage and frequency scaling.

(3)

main memory, compared to using private memory or the on-chip network [AMKK11]. It also indi-cates that the distance to the memory controller has an influence on round-trip time. Further tests indicate the difficulty to actually saturate the memory controllers using all cores to run read and write operations. We also see that there is more read that write memory bandwidth available to the cores [MAKK11]. Finally, we observe memory bandwidth drops with cache-unfriendly memory ac-cess patterns and even more drops with random acac-cess patterns [MAKK11].

(a) A schematic view of the SCC die.

RAM RAM 2 1 0 3 6 12 13 15 14 7 R AM 17 16 18 19 8 9 11 10 21 20 22 23 4 5

(b) A six-level merging tree mapped to 6 cores.

Figure 1: (left) A schematic representation of the SCC die. (right) An on-chip pipelined task graph.

3

On-chip pipelined mergesort

On-chip pipelined mergesort organizes mergesort’s merging tree in a pipeline, with all tasks running concurrently on an arbitrary number of cores (see Fig.1(b) for a 6 cores example). Producer and consumer tasks mapped to the same core communicate through its local memory; those mapped to different cores use the mesh network and distributed on-chip memory. The leaf tasks start the com-putation by reading data from memory and they forward their intermediate merging results towards their consumer tasks at the next level in the task graph. These tasks can then start the same process, and so on, until all the tasks in the pipeline are active. This schema restricts memory writes to the root node. As the merge operation is done blockwise, follow-up tasks can start as soon as leaf tasks have produced their first block of intermediate results.

On-chip pipelined mergesort implemented on SCC follows the same process. Because of the high amount of cores available (48), the chip is divided into 8 groups of 6 cores each, all of them using the same memory controller but located on a different tile. This restricts the task mapping problem to a 6-level merging tree placed on 6 cores, simplifying significantly the work of the ILP solver to compute an optimal task mapping [MKA+12]. The symmetry of the SCC allows 8 replicas of this merging tree with no or marginal performance losses. The mergesort implementation runs 8 pipelined mergesort and merges the 8 sorted subsequences using a classic parallel mergesort and shared memory [MKA+12].

The on-chip pipelined phase of our implementation yields a speedup between 1.6 and 1.7, de-pending on the adaptations of the classic parallel mergesort we compare to [MKA+12]. Furthermore, we observed a speedup of 143% from a previously implemented on-chip pipelined mergesort over CellSort for the Cell B.E. [HKK10].

(4)

4

Conclusion

Although multi and manycore processors improve computation power and energy consumption over sequential processors, their performance is limited by main memory’s latencies. Organizing compu-tation in a pipeline not only enables pipeline parallelism, but it can also reduce off-chip memory accesses, yielding better speedup. Our experiments, although still using suboptimal task mappings, show that this technique can provide good runtime improvements over classic parallel implementa-tions. We believe these results can be further improved with a refined implementation and the use of optimal, ILP-generated task mapping. On-going work includes porting the on-chip pipelining tech-nique to other calculations such as Fast Fourier Transform or other streamed computations. We expect the reduced usage of off-chip memory also yields better energy consumption. Furthermore, reduced and easy to control accesses to main memory yields determinism that enables the use of on-chip pipelining in high-performance real-time systems. The technique should be portable to other many-core, network-on-chip architectures such as Tilera’s processors or Adapteva’s Epiphany architecture.

Acknowledgments

The authors are thankful to Intel for providing the opportunity to experiment with the “concept-vehicle” many-core processor “Single-Chip Cloud Computer”.

This research is partly funded by the Swedish Research Council (Vetenskapsrådet), project Inte-grated Software Pipelining, and the CUGS graduate school at Linköping University.

References

[AMKK11] K. Avdic, N. Melot, C. Kessler, and J. Keller. Parallel sorting on Intel Single-Chip Cloud Computer. In Proc. A4MMC workshop on applications for multi- and many-core processors at ISCA-2011, 2011.

[HKK10] R. Hultén, J. Keller, and C. Kessler. Optimized on-chip-pipelined mergesort on the Cel-l/B.E. In Proceedings of Euro-Par 2010, volume 6272, pages 187–198, 2010.

[MAKK11] N. Melot, K. Avdic, C. Kessler, and J. Keller. Investigation of main memory bandwidth on Intel Single-Chip Cloud Computer. Intel MARC3 Symposium 2011, Ettlingen, 2011.

[MKA+12] N. Melot, C. Kessler, K. Avdic, P. Cichowski, and J. Keller. Engineering parallel sorting for the Intel SCC. In Proceedings of 4thWorkshop on using Emerging Parallel Architec-tures (WEPA 2012), 2012.

[TKA02] W. Thies, M. Karczmarek, and S. Amarasinghe. Streamit: A language for streaming applications. In Compiler Construction, volume 2304 of Lecture Notes in Computer Science, pages 49–84. 2002.

[UGT09] A. Udupa, R. Govindarajan, and M.J. Thazhuthaveetil. Synergistic execution of stream programs on multicores with accelerators. In Proceedings of ACM SIGPLAN/SIGBED 2009 Conference on Languages, Compilers, and Tools for Embedded Systems (LCTES 2009), pages 99–108, 2009.

References

Related documents

With this motivation, we extend the analysis and show how to connect the TaskInsight classification to changes in data reuse, changes in cache misses and changes in performance

This document contains an overview of the model associated with the thesis work of Fadi Hamade.. To download the actual Excel file, follow the

Bilden föreställer en person som håller i ett tankmunstycke. Handen och armen syns, liksom underdelen av kroppen, men varken ben, överkropp eller ansikte är synliga. Betraktaren

46 Konkreta exempel skulle kunna vara främjandeinsatser för affärsänglar/affärsängelnätverk, skapa arenor där aktörer från utbuds- och efterfrågesidan kan mötas eller

The increasing availability of data and attention to services has increased the understanding of the contribution of services to innovation and productivity in

I dag uppgår denna del av befolkningen till knappt 4 200 personer och år 2030 beräknas det finnas drygt 4 800 personer i Gällivare kommun som är 65 år eller äldre i

Technology trends show that global on-chip wire delays are growing significantly, increasing cross-chip communication latencies to several clock cycles and

Switching and routing algorithms needed to be chosen to suit the needs of LNoC but also to work good with LNoCs topology, especially the routing algorithm chosen depends a lot of