CUDA Computing on Google Colab with ArrayFire

John MelonakosArrayFire, Benchmarks, Computing Trends, CUDA, Open Source, Python Leave a Comment

For the first-time in our 14 year existence, we are now able to provide our community with the ability to run ArrayFire programs for free within minutes. Before today, users would have to download and install the library on their own systems, which can be a hassle if you just want to play around with some code and benchmarks.

Today, we’re excited to announce that ArrayFire is available on Google Colab, the free GPU computing cloud service from Google. Colaboratory, or “Colab” for short, allows you to write and execute Python in your browser, with Zero configuration required, free access to GPUs, and easy sharing.

You can jump right in and start playing with this new tool: Click Here to Try ArrayFire on Colab

The following is a description of the 5 sections of code listed in the screenshot above:

  1. Install ArrayFire into your Google Colaboratory instance automatically
  2. Set the backend to CUDA and run a few informational commands
  3. Create a random metric and benchmark the “pinverse” function; note that you can change these lines of code to time other functions of your choosing
  4. Switch backend to CPU
  5. Benchmark the same code from #3 on the CPU

For other example codes that you can run in Python with ArrayFire, see arrayfire-python/examples on Github.

Let us know how you like the new coding experience in the comments or by contacting us. And if you would like to hire assistance with your GPU or AI project, let us know!

Leave a Reply

Your email address will not be published. Required fields are marked *