Showing posts with label Python. Show all posts
Showing posts with label Python. Show all posts

Running Pipi on Cerebras using SDK

Mike's Notes

Pipi doesn't use vectors, which means no real need for GPUs. Pipi 9 is designed to run on CPUs. I wonder if part of it could also run on Cerebras Wafer-Scale Engine-3 (WSE-3) and maybe occasionally leased TPUs. 

Here are some initial working notes copied from the Cerebras SDK, along with a few questions.

Later, there will be initial experimental code written that Pipi could run via Python on 900,000 AI cores on a single wafer. 

  • Wafers are the size of dinner plates and are more power-efficient than GPUs because they store memory and processing together at each core.
  • GPUs use matrix multiplication, which is expensive because it moves vast amounts of data between different chips.

This is a long shot, would be very expensive to implement, and will need a lot of discovery and learning😎. But using GPUs at scale is also expensive.

All efforts are to reduce costs while improving function.

Resources

References

  • Reference

Repository

  • Home > Ajabbi Research > Library >
  • Home > Handbook > 

Last Updated

22/08/2026

Running Pipi on Cerebras using SDK

By: Mike Peters
On a Sandy Beach: 01/08/2026

Mike is the inventor and architect of Pipi and the founder of Ajabbi.

Big picture

  • Pipi runs very well on CPUs. 200 autonomous agents can run on a 16GB utility server. Without using vectors.
  • Running genetic algorithms in a fitness landscape would be better done on a Cerebras Wafer-Scale Engine. I need to test that assumption with some simple experiments.
  • Got CSL and Python code ready to test.
  • Can test on a local sandbox and then run further tests on a VM in the cloud using cheap spot compute.
  • Start with small arrays and scale up, trying different fitness algorithms.
  • Pipi could easily automatically run this deploy to GCP, run, get result, destroy cloud deployment.
  • Later, run directly on Cerebras (will require research grade, given using SDK to directly configure wafer cores).
  • Talk to Andrew at SemiAnalysis.

From Cerebras SDK

"

Cerebras SDK: A Conceptual View

Learn how the Wafer-Scale Engine architecture works, how processing elements communicate, and how the host and device interact.

The Cerebras Wafer-Scale Engine (WSE) is a wafer-parallel compute accelerator, containing hundreds of thousands of independent processing elements (PEs). The PEs are interconnected by communication links into a two-dimensional rectangular mesh on one single silicon wafer. Each PE has its own memory (used by it and no other) and its own program counter. It has its own executable code in its memory. 32-bit messages, called wavelets, can be sent to or received by neighboring PEs in a single clock cycle.

The PE also has dataflow control characteristics. An instruction can terminate the currently running thread (called a task), at which time, hardware selects a new task from among the set of tasks that constitute the PE’s code. It selects a runnable task, one that has been activated (and unblocked; we will describe this in more detail later). Incoming wavelets travel along a virtual channel, called a color. All colors transfer data on a single physical channel. The congestion of one color does not block the traffic of another color. For each color used for incoming wavelets, there may be a task that is activated by its arrival.

The Cerebras System (CS) is a self-contained rack-mounted system containing packaging, power supply, cooling and I/O for a single WSE. The CS communicates via parallel 100 Gigabit ethernet connections to a host CPU cluster. Throughout this documentation, the CS is referred to as the “device,” the host CPU cluster as the “host,” and the ethernet connections connecting the two as “host I/O”. The SDK provides mechanisms for using host I/O to move data between host and device or launch functions on the device.

The below figure gives a visual representation of the mesh of PEs that make up the WSE, and its connections to the outside world. Data is streamed onto the device via host I/O, and enters the WSE through a series of links along its edges. The programming model of the SDK abstracts away the details of these links, and allows the programmer to copy data from the host to arbitrary PEs on the device.

A Processing Element (PE)

A PE contains three key elements:

  1. A processor. Also referred as a compute engine (CE).
  2. A router. The router of a PE is directly connected via bidirectional links to its own CE and to the routers of the four nearest neighboring PEs in the mesh. The link to its own CE is called the RAMP, and the links to the four neighboring PEs are referred to by their cardinal directions. The router is the only communication device the PEs use to send and receive data.
  3. The local PE memory. All of the PE’s data and code are stored within this memory. Neither the CE nor the local memory of a PE is directly accessible by other PEs.


The Programming Model

To develop code for the WSE, you write device code in the Cerebras Software Language (CSL), and host code in Python. You then compile the device code, and run your program on either the Cerebras fabric simulator, or the actual network-attached device. The host code is responsible for copying data to and from the device, and launching discrete programs referred to as kernels.

... "

Cost guesstimates

These guesses are somewhere to start. Most probably wrong. Will start asking around. Corrections welcome, thanks.

  • WSE-3
    • Buy
      • Capex $20M USD from Cerebras
      • Power usage of 25KW works out at $6,500 NZD/month
    • Rent
      • Who?
      • Where?
      • How Much?

ReBaz + Carpentries + RSE Conference

Mike's Notes

Plenty of opportunities in NZ to share research and upskill. I need to learn Python, and this might be a way to do so. I previously used Python with ESRI GIS, but that was 15 years ago.

Pipi 10 will have a Python interface.

Resources

References

  • Reference

Repository

  • Home > Ajabbi Research > Library >
  • Home > Handbook > 

Last Updated

24/10/2025

ReBaz + Carpentries + RSE Conference

By: Mike Peters
On a Sandy Beach: 24/10/2025

Mike is the inventor and architect of Pipi and the founder of Ajabbi.

Research Bazaar

"The annual ResBaz (Research Bazaar) event – an amazing free series of online webinars and workshops that bring together researchers from around the country to develop skills in digital tools and research practices."

The next ResBaz Aotearoa 2026: 29 June - 3 July.

The Carpentries

" ..The Carpentries is a non-profit organisation that teaches foundational coding and data science skills to researchers worldwide. There are numerous courses freely available, including an introduction to Python for library and information workers."

HPC Carpentries

"HPC Carpentry teaches HPC-oriented coding, and data science skills to researchers. We want to work towards bringing High Performance Computing under the Carpentries umbrella."

New Zealand Research Software Engineering Conference

"Within the research sector, there is a growing number of people who combine expertise in programming with an intricate understanding of research. Although this combination of skills is extremely valuable, these people lack a formal place in the academic system. This means there is no easy way to recognise their contribution, to reward them, or to represent their views.  

A community-driven event 

In June 2020, NeSI decided to rebrand its successful Science Coding Conference to be named the NZ Research Software Engineers (RSE) Conference. Motivation for the change is two-fold:

  • to include people from all research communities who work on the cusp of technical and research domains, and
  •  to more fully align with the goals of the Australia / New Zealand RSE community. 

Initiated in the UK, the RSE movement is a global phenomenon with many associations now set up around the world. In line with that global trend, New Zealand’s community of research software users and developers has steadily grown, with more roles and numbers of people at the intersection of software and research." - NZRSE

Unofficial Windows Binaries for Python Extension Packages

Mike's Notes

I did some digging. I found a great list of Unofficial Windows Binaries for Python Extension Packages maintained by Christoph Gohlke, Laboratory for Fluorescence Dynamics, University of California, Irvine. There must be hundreds of binaries listed.

Sad news: Funding for the Laboratory for Fluorescence Dynamics has ceased. This service will be discontinued before July 2022. The referred page has gone.

The good news is that they are now available on his GitHub.

According to a post on Reddit;

Resources

References

  • Reference

Repository

  • Home > Ajabbi Research > Library >
  • Home > Handbook > 

Last Updated

11/05/2025

Unofficial Windows Binaries for Python Extension Packages

By: Christoph Gohike
Laboratory for Fluorescence Dynamics: 12/05/2019

He writes ...

"This page provides 32- and 64-bit Windows binaries of many scientific open-source extension packages for the official CPython distribution of the Python programming language. A few binaries are available for the PyPy distribution.

The files are unofficial (meaning: informal, unrecognized, personal, unsupported, no warranty, no liability, provided "as is") and made available for testing and evaluation purposes.

Most binaries are built from source code found on PyPI or in the projects public revision control systems. Source code changes, if any, have been submitted to the project maintainers or are included in the packages.

Refer to the documentation of the individual packages for license restrictions and dependencies.

If downloads fail, reload this page, enable JavaScript, disable download managers, disable proxies, clear cache, use Firefox, reduce number and frequency of downloads. Please only download files manually as needed.

Use pip version 9 or newer to install the downloaded .whl files. This page is not a pip package index.

Many binaries depend on numpy-1.15+mkl and the Microsoft Visual C++ 2008 (x64x86, and SP1 for Python 2.7) or the Visual C++ 2017 (x64 or x86 for Python 3.x) redistributable packages.

Install numpy+mkl before other packages that depend on it.

The binaries are compatible with the most recent official CPython distributions on Windows >=6.0. Chances are they do not work with custom Python distributions included with Blender, Maya, ArcGIS, OSGeo4W, ABAQUS, Cygwin, Pythonxy, Canopy, EPD, Anaconda, WinPython etc. Many binaries are not compatible with Windows XP or Wine.

The packages are ZIP or 7z files, which allows for manual or scripted installation or repackaging of the content.

The files are provided "as is" without warranty or support of any kind. The entire risk as to the quality and performance is with you.

The opinions or statements expressed on this page should not be taken as a position or endorsement of the Laboratory for Fluorescence Dynamics or the University of California."

Project Jupyter with Brian Granger

Mike's Notes

Project Jupyter looks great. I need to find out more.

Resources

References

  • Reference

Repository

  • Home > Ajabbi Research > Library > Subscriptions > ACM
  • Home > Handbook > 

Last Updated

11/05/2025

Project Jupyter: From Computational Notebooks to Large Scale Data Science with Sensitive Data with Brian Granger

By: Brian Granger
ACM: 07/09/2018

Project Jupyter: From Computational Notebooks to Large Scale Data Science with Sensitive Data with Brian Granger. ... from ACM July 2018.

Brian Granger is an Associate Physics and Data Science Professor at Cal Poly State University in San Luis Obispo, CA. USA.

"Project Jupyter is an open-source project that exists to develop software, open standards, and services for interactive and reproducible computing. The main application developed by the project is the Jupyter Notebook, a web-application that allows users to create documents that combine live code with narrative text, mathematical equations, and visualizations. Since its creation in 2011, the Jupyter Notebook has become a widely-used, open standard for developing, sharing, communicating, and reproducing computational work in scientific computing and data science.

In this talk I will give an overview of Project Jupyter and its open-source software and open standards for interactive and exploratory computing. Examples of its usage across a broad range of industries, disciplines and organizations will be used to illustrate the main ideas upon which Jupyter is founded. I will end by sketching our current work on JupyterLab, JupyterHub, and Binder and show how it is leading to 1) new challenges with large scale data science within complex organizations and 2) legal, ethical and technical questions regarding sensitive data."