Guest post: celebrating Graphics and Compute Freedom Day

Featured image: Wesley Caribe | Unsplash (photo)

Hobbyists, activists, geeks, designers, engineers, etc have always tinkered with technologies for their own purposes (in early personal computing, for example). And social activists have long advocated the power of giving tools to people. An open hardware movement driven by these restless innovators is creating ingenious versions of all sorts of technologies, and freely sharing the know-how through the Internet and more recently through the social media. Open source software and more recently hardware is also encroaching upon centers of manufacturing and can empower serious business opportunities and projects.

The free software movement is cited as both an inspiration and a model for open hardware. Free software practices have transformed our culture by making it easier for people to become involved in producing things from magazines to music, movies to games, communities to services. With advances in digital fabrication making it easier to manipulate materials, some now anticipate an analogous opening up of manufacturing to mass participation.

It is important to keep sharp open hardware’s more transformational edges, on agendas such as dismantling intellectual property and releasing investment for alternative business models. Only through a mix of craft, politics, and the support of social movements, will open hardware fully realise its potential to democratise technology.

There are numerous organizations and initiatives voiced and supported by the Open Source Hardware Association and a vast thriving community of supporters and technological enthusiasts that are doing to advance this core value. The Open Source Hardware Association aims to be the voice of the open hardware community, ensuring that technological knowledge is accessible to everyone, and encouraging the collaborative development of technology that serves education, environmental sustainability, and human welfare.

Technology and culture ought to respect user freedom. A year ago, AMD made a giant leap towards a fully open source Linux graphics and compute stack driver stack. While still offering proprietary hardware running proprietary firmware, having the driver and the libraries as open source opens potential for modification and performance optimization. In addition, it gives other GPU manufacturers, including NVIDIA and Intel, a standard to aim for. Finally, it gives hope that there will be further openness in the future.

This is why we celebrate Graphics and Compute Freedom Day, GCFD. We want to take one day every year to remember all the open standards, open source software, and open hardware that have made it into the mainstream in the field of computer graphics and GPU computing. It has been exactly one year since AMD has unveiled GPUOpen on 15th December 2015; let’s celebrate GCFD and let’s hope that this year is just a start of many more successful years of graphics and compute freedom.

GCFD will be hosting a livestream starting at 14:30 in Central European Time. Join at www.gcfd.stream.

AMD and the open source community are writing history

Featured image: Maya Karmon | Unsplash (photo)

Over the last few years, AMD has slowly been walking the path towards having fully open source drivers on Linux. AMD did not walk alone, they got help from Red Hat, SUSE, and probably others. Phoronix also mentions PathScale, but I have been told on freenode channel #radeon this is not the case and found no trace of their involvement.

AMD finally publically unveiled the GPUOpen initiative on 15th of December 2015. The story was covered on AnandTech, Maximum PC, Ars Technica, Softpedia, and others. For the open source community that follows the development of Linux graphics and computing stack, this announcement comes as hardly surprising: Alex Deucher and Jammy Zhou presented plans regarding amdgpu on XDC2015 in September 2015. Regardless, public announcement in mainstream media proves that AMD is serious about GPUOpen.

I believe GPUOpen is the best chance we will get in this decade to open up the driver and software stacks in graphics and computing industry. I will outline the reasons for my optimism below. As for the history behind open source drivers for ATi/AMD GPUs, I suggest well written reminiscence on Phoronix.

Intel and NVIDIA

AMD’s only competitors are Intel and NVIDIA. More then a decade ago, these three had other other companies competing with them. However, all the companies that used to produce graphics processors either ceased to exist due to bankruptcy/acquisition or changed their focus to other markets.

Intel has very good open source drivers and this has been the case for almost a decade now. However, they only produce integrated GPU which are not very interesting for gaming and heterogeneous computing. Sadly, their open source support does not include Xeon Phi, which is a sort of interesting device for heterogeneous computing.

NVIDIA, on the other hand, has very good proprietary drivers, and this has been true for more then a decade. Aside from Linux, these drivers also support FreeBSD and Solaris (however, CUDA, the compute stack, is Linux-only).

To put it simply, if using a proprietary driver for graphics and computing is acceptable, NVIDIA simply does better job with proprietary drivers than AMD. You buy the hardware, you install the proprietary driver on Linux, and you play your games or run the computations. From a consumer’s perspective, this is how hardware should work: stable and on the release day. From the perspective of an activist fighting for software freedom, this is unacceptable.

Yes, if AMD tries to compete with proprietary drivers against NVIDIA’s proprietary drivers, NVIDA wins. When both companies do not really care about free and open source software, I (and probably others) will just pick the one that works better at this moment, and not think much about it.

To give a real-world example, back in 2012 we started a new course on GPU computing at University of Rijeka Department of Informatics. If AMD had the open source heterogeneous computing stack ready, we would gladly pick their technology, even if hardware had slightly lower performance (you do not really care for teaching anyway). However, since it came down to proprietary vs. proprietary, NVIDIA offered more stable and mature solution and we went with them.

Even with the arguments that NVIDIA is anti-competitive because G-Sync works only on their hardware, that AMD’s hardware is not so bad and you can still play games on it, and that if AMD crashes NVIDIA will have a monopoly, I personally could not care less. It is completely useless to buy AMD’s hardware just so that they don’t crash as a company; AMD is not a charity and I require value in return when I give money to them.

To summarize, AMD with (usually more buggy and less stable) proprietary drivers just did not really have an attractive value proposition.

GPUOpen changing the game

However, AMD having the open source driver as their main one gives a reason to ignore their slight disadvantage in terms of the performance per watt and the performance per dollar. Now that AMD is developing a part of the open source graphics ecosystem and improving it for them as well as the rest of the community, they are a very valuable graphics hardware vendor.

This change empowers the community to disagree with AMD about what should be developed first and take the lead. As a user, you can fix the bug that annoys you when you decide and do not need to wait for AMD to fix it when they care to do it. Even if you don’t have sufficient knowledge to do it yourself, you can pay someone to fix it for you. And this freedom is what is very valuable with open source driver.

Critics might say, this is easy to promise, AMD has said many things many times. And this is true; however, the commits by AMD developers in the Kernel, LLVM, and Mesa repositories shows that AMD is walking the walk. Doing a quick grep for e-mail addresses that contain amd.com shows a nice and steady increase in both the number of developers and the number of commits since 2011.

Critics might also say that AMD is just getting free work from the community and giving ‘nothing’ in return. Well, I wish more companies sourced free work from the community in this way and gave their code as free and open source software (the ‘nothing’). Specifically, I really wish NVIDIA follows AMD’s lead. Anyhow, this is precisely the way Netscape started what we know today as Firefox, and Sun Microsystems started what we know today as LibreOffice.

To summarize, AMD with open source drivers as the main lineup is very attractive. Free and open source software enthusiasts do not (nor they should) care if AMD is ‘slightly less evil’, ‘more pro-free market’, ‘cares more about the teddy bear from your childhood’ than NVIDIA (other types of activists might or might not care about some of these issues). For the open source community, including Linux users, AMD either has the open source drivers and works to improve open source graphics ecosystem or they do not. If AMD wants Linux users on their side, they have to remain committed to developing open source drivers. It’s that simple, open or irrelevant.

Non-free Radeon firmware

Free Software Foundation calls for reverse engineering of the Radeon firmware. While I do believe we should aim for the free firmware and hardware, I have a two problems with this. First, I disagree with a part of Stallman’s position (which is basically mirrored by FSF):

I wish ATI would free this microcode, or put it in ROM, so that we could endorse its products and stop preferring the products of a company that is no friend of ours.

I can not agree with the idea that the non-free firmware, when included in a ROM on the card, is somehow better than the same non-free firmware uploaded by the driver. The reasoning behind this argument makes exactly zero sense to me. Finally, the same reasoning has been applied elsewhere: in 2011 LWN covered the story of GTA04, which used the ‘include firmware in hardware’ trick to be compliant with FSF’s goals.

Second, AMD, for whatever reason, does not want to release firmware as free and open source, but their firmware is freely redistributable. (They have the freedom not to open it and even disagree with us that they should, of course.) While not ideal, for me this is a reasonable compromise that works in practice. I can install latest Fedora or Debian and small firmware blob is packaged with the distro, despite being non-free. It doesn’t depend on kernel version, it doesn’t even depend on whether I run Linux or FreeBSD kernel.

To summarize, I would like to see AMD release free firmware as much as anyone supporting FSF’s ideas. And I do not hide that from AMD nor do I think anyone else should. However, I do not consider this issue of non-free firmware to be anywhere as important as having a supported free and open source driver, which they finally have. Since NVIDIA is no better regarding free firmware, I do not believe that right now we have the leverage required to convince AMD to change their position.

AMD and the open source community

Just like Netscape and Sun Microsystems before them, AMD right now needs the community as much as the community needs them. I sincerely hope AMD is aware of this, and I know that the community is. Together, we have the chance of the decade to free another part of the industry that has been locked down with proprietary software dominating it for so long. Together, we have the chance to start a new chapter in graphics and computing history.

Joys and pains of interdisciplinary research

Featured image: Leo Rivas-Micoud | Unsplash

In 2012 University of Rijeka became NVIDIA GPU Education Center (back then it was called CUDA Teaching Center). For non-techies: NVIDIA is a company producing graphical processors (GPUs), the computer chips that draw 3D graphics in games and the effects in modern movies. In the last couple of years, NVIDIA and other manufacturers allowed the usage of GPUs for general computations, so one can use them to do really fast multiplication of large matrices, finding paths in graphs, and other mathematical operations.

Partnership with NVIDIA

To become a GPU Education Center, NVIDIA required us to have at least one recurring course in the curriculum and also hold regular workshops. In return, we got the GPUs to work with. Aside from allowing us to teach, having this hardware gave us an opportunity to initiate research projects using GPU computing. If we are successful in research,  we can take the next step and become a GPU Research Center, and hopefully end up being GPU Center of Excellence at some point. Either of these would give us access to special events, pre-release hardware, special pricing, etc.

Nvidia headquarters on San Tomas Expressway
Nvidia headquarters on San Tomas Expressway. We might end up visiting this location at some point, pretty awesome ain’t it? (Image source: Wikimedia Commons.)

Roughly a year later, in September 2013, we had the Researchers night in Rijeka. The goal was to get researchers from various disciplines to showcase their work, and potentially find collaborators or options for joint projects. I came there to find scientist interested in applying computation in their research, ideally using GPU computing. I was inspired by Assistant Professor Željko Svedružić‘s enthusiasm, and saw the potential for collaboration. A bit later I joined BioSFLab to do research work in computational chemistry in my spare time. At that point I had a PhD thesis to finish and there was little time to do other things.

Dipping toes in computational chemistry

However, computational chemistry seemed worth gambling my spare time, due to a number of resons. First, I had the hardware that would eventually be obsolete, used or unused; second, there were open source software computational chemistry packages which I could contribute to; third, I wanted to move the GPU Education Center closer to becoming the GPU Research Center. Very soon Patrik Nikolić and I were in the lab AM to PM, five to six days a week. GROMACS was running day and night, and we were juggling visualizations in VMD, Chimera, Avogadro, and Marvin (occasionally we hated each of these packages). At some point, we also figured out how to do “simple” quantum mechanics calculations in NWChem and CP2K.

Ethene orbitals
Some orbitals of ethene, computed by CP2K, and visualized by VMD.

Ṛegardless of the extra work, the experience was very rewarding due to a number of things. First, both GROMACS and CP2K are meant to run on Linux. A biochemist might or might not have experience with compiling Linux software and linking it with GPU compute libraries such as NVIDIA CUDA; however, a biochemist does not want to be blocked by taking time to do these things. A computer scientist, on the other hand, is used to working with different operating systems and software. Software, and specifically scientific software, is what you do as a computer scientist. In my particular case, this experties includes both Linux and CUDA. Suddenly, the research group I was a part of started to iterate very fast since all of us did not have to learn the others domain to move forward.

The exchange of knowledge

Second, the knowledge is flowing both ways. After a couple of months, Patrik was using Linux as his primary OS, and I had no problem reading through Professor Svedružić’s copy of Lehninger Principles of Biochemistry. With each new method (e.g. molecular dynamics or nudged elastic band) we exchanged more knowledge. “Let’s try to plot this using Gnuplot” from my side was met with “why don’t we try Diels-Alder reaction” from Patrik’s. Eventually, I could assess approximations of forces resulting from different force fields as good or bad, and Patrik benchmarked GROMACS on one or more GPUs to decide how to run it.

GPUs on motherboard
Multiple GPUs on a single motherboard. GROMACS benefits from using two GPUs for calculation instead of one, kudos to developers on making that possible. We would test with three GPUs, but our most powerful systems have “only” two. (Image source: GBPublic_PR Flickr.)

There is a number of downsides as well. Instead of taking time to expand my horizons, I could have just followed the (un)written rules and take my time to work on projects that will result in papers strictly in field of computer science, because these count. I could have explored opportunities to squeeze more papers by re-exploiting my previous research work. This would enable me to avoid learning to use new software or to postpone developing new features in existing software packages. I could have done either, but I did not because I believed and still believe there are many more productive ways to use my time. (Just to be clear: we did create a publication resulting from this work. Namely, a book chapter written by our group will appear in a book by Elsevier in 2016.)

Formal critera for professorship in support of individual passion and creativity

Present classification of areas of sciences, engineering, biomedicine, biotechnology, social sciences, humanities, and arts in Croatia recognizes interdisciplinary fields of science, but only a handful of them. However, the minimal criteria for professorship in Croatia recognizes interdisciplinary papers only in sciences, biotechnology, and humanities. I am well aware it is hard to write precise criteria about a myriad of possible interdisciplinary combinations of different fields. But I am also aware that having such criteria would expand the amount of possibilities one has to get professorship, and in turn motivate more researchers to look into their options.

I might be an idealist, writing all this. I don’t expect to motivate anyone to do the same; people have very different motivations for doing the work they do. Regardless, I have sort of an addiction to epic quotes, so here is one from Ralph Waldo Emerson.

Every revolution was first a thought in one man’s mind; and when the same thought occurs to another man, it is the key to that era.

That is, we are not the only group in Croatia combining life sciences and computer science. I’m very happy to say that Mile Šikić from University of Zagreb Faculty of Electrical Engineering and Computing, working in area of computer science, has a number of papers in field of bionformatics (look for papers published in Nuclelic Acids Research). Do these papers count for professorship? I have no idea, I guess we will find out eventually, but I doubt that getting counts up was the primary motivation for writing those papers.