Hi there! I am proud to announce that I have been accepted as a GSoC mentee to work on developing a CuPy GPU backend for QuTiP. I would like to thank the GSoC organization, NumFOCUS and the QuTiP development team for this amazing opportunity.

Let’s unpack some abbreviations first.

What is GSoC ?

GSoC stands for Google Summer of Code. It is a program meant to bring more student developers into open source software development. …


In the last weeks I made progress on implementing using CuPy a number of functions found in QuTiP dev.major.

You can find a list of functions, the state they where found in in QuTiP and their currentstate in qutip-cupy here.

Testing

For most functions to be specialized creating tests was easy enough, it meant inheriting from the testing classes in the QuTiP module test.data.mathematics_tests, creating a random CuPyDense array generator ( line 10), registering it (line 17)and passing around the new specialization and its expected input and output class/types (line 24).

In some cases tests had to be built from…


In the last weeks we have made substancial advancements in the tooling for our project.

We have included flake8 as a linter and black as a fromatter check, this leaves our copde in a pretty nice code, and by doing this checks ater every push but before sending the code to run tests on a GPU instance, we are potentially saving lots of GPU compute.

I have included a simple readme for those who would want to venture out and try the functionality already developed, you can check it out in the repo.

There has also been progress on the…


This is my 3rd entry of my CuPy backend QuTiP project. There have been some developments since the last entry, some paths have bifurcated, others pruned and most of them have lengthened as the general project gathers pace.

CuPyDense class

There are currently 2 open PRs involving this class. The first one involves the base implementation of CuPyDense, which just means QuTiP’s Data class methods. The second one corresponds to the methods inherent to the Dense class and to some handy constructors (zeros matrix, diagonal matrix, etc).

Precision

After doing some minor benchmarking, as well as some reading , calculation precision seems to…


I spent the past week mostly reading about how to effectively program CUDA enabled devices, and looking at CuPy’s documentation and at how QuTiP’s data layer works.

One does not simply optimize GPU code

Even though I will not be working on low level CUDA code, at least in the coming weeks, as I will be leveraging CuPy and its use of high level APIs like: CuBLAS and CuSPARSE; I think it is interesting to delve into what makes programming a GPU special and where I think we stand to make gains. I will mostly rely in what I learned reading “ Programming Massively Parallel Procesors” by…

Felipe bivort haiek

Physicist, data scientist.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store