Research paper: Exploring the suitability of the Cerebras Wafer Scale Engine for stencil-based computation codes

30 November 2023

EPCC's Justs Zarins explains the background to this paper, which examines the use of the Cerebras CS-1 for stencil computation, a common HPC workload. 

The Cerebras CS-1 is a wafer scale engine (WSE) with 400,000 compute cores, each of which has a small amount of memory available. The cores are connected in a 2D grid network with very fast connections. These features require increased consideration of data distribution and movement when designing algorithms for the WSE. 

Three-part diagram showing CS-1 WSE architecture.

Figure 1: CS-1 WSE architecture. Image taken from https://www.cerebras.net/blog/beyond-ai-for-wafer-scale-compute-setting…

Comparing architectures

At the time of conducting this project, users could only program for the CS-1 using a subset of TensorFlow. This is quite limiting for doing general purpose computing, but with a bit of creativity it was possible to express Jacobi iterations using linear algebra operations and convolution. A benefit of this approach is that the same code could be used to compare performance with other hardware architectures. It was found that a single CS-1 delivered 2.5 times greater performance than four V100 GPUs, and 114 times greater performance than two Intel Xeon CPUs. 

These results show that the accelerator can yield significant speedups for HPC workloads and that it is worth pursuing the technology further.

Cerebras SDK

Since the completion of this project, a new programming interface, Cerebras SDK, has been made available. This new interface allows direct programming of the CS-1, thus making it possible to really optimise for a given workload. EPCC has been testing and evaluating the SDK and is working on ways to make it easier for users to harness the power of the Cerebras WSE.

The local availability of cutting-edge hardware at EPCC makes it easier to carry out research like this. EPCC currently hosts two CS-2 machines, successors to the CS-1, thus opening up even more possibilities for future research.

Paper: Exploring the Suitability of the Cerebras Wafer Scale Engine for Stencil-Based Computation Codes.

 

EPCC now offers access to a Cerebras CS-2 as part of the Edinburgh International Data Facility.

Author

Dr Justs Zarins
Justs Zarins