Its hard to believe, but our ArrayFire accelerated computing library was open-sourced a year ago! While we were packing up our booth to head to SuperComputing 2015 my colleagues started reminiscing on how much our company and library have changed over the last year.
ArrayFire the library
In terms of raw statistics, the ArrayFire library is a really active project given that GPU computing is still seen as a niche field. Since its inception, ArrayFire has received 3285 commits from 31 developers (11 of which are our employees) and produced nine (public) releases. At present we have 84 watchers, 1141 stars, and 160 forks of our code. In the last year we have had a total of 1105 opened issues. Of these, 427 are closed, 577 are closed pull requests, and 90 remain open.
Using the popular SLOCCount program, we can get a lot of interesting statistical information about the ArrayFire library including the number of lines of code per source type and approximate cost of development:
* Note: SLOCCount thinks our OpenCL kernels (.cl) are lisp files.
Also, SLOCCount estimates that the labor costs for ArrayFire v3.2 based on line count alone to be $3,168,838, probably using heuristics based on the number of lines of code. We found that estimate amusingly low because building a high-performance parallel computing library is much harder per line of code than most other software development projects.
In the last year we have added so many new functions, including:
- Computer vision: FAST, ORB, Nearest Neighbor, Harris, SUSAN, SIFT, Difference of Gaussians, Homography, and GLOH
- Image processing: Convolution, DFT, template matching, SOBEL, colorspace conversion, erosion, wrapping, unwrapping, summed area of tables, load/save raw images, and in-place FFTs
- Linear algebra: Matrix multiplcication, in-place factorization, solving routines, single value decomposition.
- Installers: new packaging for Windows, Linux, and OSX installers.
- Language wrappers (discussed below)
- Graphics: Created an integrated our new graphics library, Forge, into ArrayFire.
- Datatypes: Support for 16- and 64-bit integers.
And a wealth of other functionality including support for 16-bit integers, graphics, a unified backend, and convenience debugging/printing functions.
I have previously written about several large contributions to ArrayFire, but a one-year review is a prime opportunity to reiterate our appreciation for these developers.
Although we now recommend using our installers for Windows, Linux and OSX due to their integration of Intel Math Kernel Library to accelerate linear algebra functions, we are still grateful for early packaging and distribution work provided by a few key developers.
- Debian: Ghislain Antony Vaillant created Debian packages for ArrayFire and its OpenCL dependencies and submitted these to Debian upstream.
- Homebrew / OSX: Gaëtan Lehmann and Hugues Malphettes (independently) created a Homebrew formulae for installing ArrayFire on OSX. Ghislain's formula was accepted into the official homebrew-science repository.
- Gentoo: Marius Brehler created Gentoo packages for ArrayFire and its OpenCL dependencies.
- Arch: Sven-Hendrik Haase.
Although ArrayFire is principally a C/C++ library, we ensured the C API was sufficiently complete to create wrappers for other languages. To highlight the most active repositories:
|Rust||ArrayFire developer Pradeep Garigipati with substantial contributions from Jason Ramapuram|
|.NET||Was recently created by Steven Burns|
|GO||Rob Baruch (this project just started; it's a great place to get jump in)|
|Java||ArrayFire developers Pradeep Garigipati and Pavan Yalamanchili|
|R||ArrayFire developer Pavan Yalamanchili|
|Fortran||ArrayFire developer Pavan Yalamanchili|
Check out ArrayFire's full list of repositories for other wrappers.
Leading up to one year ago, we had much debate among our team as to whether or not we should open source ArrayFire. The immediate business impact was quite clear: we would lose considerable short-term revenue by giving our software away for free and the long-term revenue return was not at all evident. It could have been economic disaster for our company. However, we trusted on the goodness of the open source business model, which John has blogged about on numerous occasions, and we diversified our revenue-generating activity while still devoting tremendous resources into maintaining the open source repository.
Due to this diversification, the initial financial impact of going open source was, amusingly, "no impact at all." We had several long-term clients and a handful of grants which kept us strong. For the first few months the most noticeable impact we saw was a significant uptick in website traffic, support forum posts, and downloads due to prominent articles on social media. In fact, at one point ArrayFire was #2 on HackerNews, being ousted from the #1 spot only by ESA's Rosetta-Philae spacecraft (which just made history by successfully harpooning a comet).
I don't recall the precise date when it happened, but when we received our first client that specifically said that they contacted us "because of your open-source ArrayFire library." We were ecstatic. Since then business due to open-source has grown appreciably. At first many of our customers were academics or small startups which were interested in short-term engagements. Now we see a fairly good mix of short and long-term engagements from a variety of businesses and government institutions.
For example, many small companies ask us to review their code to see what could be accelerated under our 1-day Starter Package. Often these customers come back and ask us to implement the suggestions we put forth. Meanwhile larger companies often seek fixed-fee engagements for well-defined deliverables. Many clients hire us on retainers so our engineers can immediately begin work on new projects and become a working part of their teams.
Overall, making ArrayFire open-source has been beneficial for our company. A year ago, we weathered what could have been a sudden drop in sales revenue and adapted our business model to provide services, support, and training wrapped around our open source offering. Today we stand stronger than ever and excited about continuing our business in the dynamic and community-focused approach of our open source business model.