Software

Selected current and past software contributions and projects.

RISC-V (2016 onwards)

A lot of my work at Embecosm focused around RISC-V – I worked with GCC, Binutils, GDB, Newlib, custom ISA extensions, simulation of Verilog models with Verilator, to name a few. Some specific items:

RISC-V work is presently a free-time project, aiming towards support for RISC-V in Numba and llvmlite, which I’m working on using a StarFive VisionFive 2. Some notes towards this goal:

Numba and llvmlite (2014 onwards)

Numba is an open source Python JIT Compiler, designed to compile numerical Python code to give speeds close to that of C or Fortran, and is used by many scientists and engineers to accelerate their simulation code. I worked on various improvements to Numba, the most interesting being the CUDA Simulator, which enables CUDA Python code to be debugged with any Python debugger. This simulator grew out of a prototype developed for a consulting project that evolved into a relatively complete implementation of the CUDA Python language.

I developed a tutorial to help scientists and engineers get started with using Numba, presented at PyData London 2015 and PyCon UK 2015.

As a personal project at Embecosm, I adapted Numba to run on PyPy, getting 91.5% of tests passing – this covers most use cases. It is possible to improve on this and work on upstreaming the port, but this would need to be driven by external demand.

Android for Lenovo tablets (2012-13)

Bugs and a general sluggishness in the stock firmware of the Lenovo A1 tablet motivated me to port Clockworkmod Recovery and Cyanogenmod 7 to it. This started as an experiment to see how far I could get, and gained enough popularity to be installed by several thousand A1 owners (as recorded in Cyanogenmod Stats).

Once the A1 was a bit old, Lenovo kindly sent me an A2109, so I began a Lenovo A2109 port of Cyanogenmod 10, setting up the device tree and successfully booting to the home screen. This work was used as a base for continued by development by others, leading to a fully functional ROM.

ClearSpeed CSX600 Driver update (2010)

Changes in the API for the management of scatterlists in kernel 2.6.24 (see this page for details) prevent the ClearSpeed drivers from compiling with these kernel versions. I have modified the driver to reflect these changes so it can be used with 2.6.24.

Modified driver on Github.

CUDA Conjugate Gradient Solver (2009)

Understanding the Conjugate Gradient (CG) method usually involves a lot of pain. As does learning to program CUDA (though not as much as some other parallel programming models). Trying to do both at the same time is unpleasant, so I created a CUDA CG solver that quite closely follows the description of the method as presented in most texts. It’s not the fastest CUDA Conjugate Gradient solver, but it is relatively easy to drop in place of an existing CG solver in a C or Fortran application, and is as straightforward to understand and adapt as possible.

CUDA CG Solver on Github.