ArrayFire v3.8 Release

John MelonakosAnnouncements, ArrayFire Leave a Comment

We are excited to share the v3.8 release of ArrayFire!

ArrayFire is used in commercial, academic, and government projects around the world, solving some of the toughest computing problems in the most innovative projects. It is well-tested and amazingly fast!

In this post, we share some of the major features added to ArrayFire in its 3.8 feature release. The binaries and source code can be downloaded from these locations:

Official APT repository

Starting with this release, we will provide Ubuntu packages form our APT repository. To install our packages add our apt repository with the below commands. At this moment we are only supporting bionic(18.04) and focal(20.04).

apt-key adv --fetch-key https://repo.arrayfire.com/GPG-PUB-KEY-ARRAYFIRE-2020.PUB
echo "deb [arch=amd64] https://repo.arrayfire.com/ubuntu $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/arrayfire.list

Once the repository is successfully added run the following command to install all backends of ArrayFire along with examples.

sudo apt update && sudo apt-get install arrayfire

For a detailed list of packages provided by our repository, please go through our wiki document.

This version of ArrayFire is better than ever! We have added new features that expand the capabilities of ArrayFire while improving its performance and flexibility. Some of the new features include:

Ragged Max

Ragged max is a specialized version of the max function that allows you to efficiently get the maximum value on a subset of an array along a given axis. This function does not perform any indexing operation so its significantly faster than doing this using the indexing approach.

Here is an example usage of the function:

array in = {5, 2, 7, 9};
in = tile(in, 1, 4);
unsigned len_array[] = {3, 2, 1, 4};
array len(1, 4, len_array);

array val, idx;
max(val, idx, in, len, 0);

The above code creates the in array which will contain our values. We only want to get the maximum value from the orange area in the image. We use the len array to specify how many elements we want to query to get the result. The val array is the output array which only contains the maximum values in the orange area.

Initializer lists

This example also demonstrates the initializer list API. The in array is created using this new API.

Disk caching of kernel binaries

We would also like to highlight the new disk caching features. ArrayFire’s JIT compilation is one of the clever ways we can achieve great speedups with user code. While impactful, it has suffered from the need to compile user code for each runtime causing a warmup overhead. With the 3.8 release, we are now supporting kernel caching to the disk for both CUDA and OpenCL. Your kernels will now avoid overhead in repeated runs of your program so you can take advantage of ArrayFire JIT compilation without the warmup time!

We are excited to finally release ArrayFire v3.8. We would like to thank our community for supporting us and helping us improve ArrayFire. Through the efforts of the community this release has continually grown and improved into the feat it is today. We are eagerly looking forward to community participation in future releases!

Other changes

  • New API for following statistics function: cov, var and stdev
  • Bit-wise not support (af_bitnot)
  • allocV2 and freeV2 which return cl_mem on OpenCL backend
  • Move constructor and move assignment operator for Dim4 class
  • Add f16 support for histogram
  • Update confidence connected components example for better illustration
  • Enable disk caching of OpenCL kernel binaries
  • Improve warnings messages from run-time kernel compilation functions

More detail and a complete list of these and other changes can be found in our release notes.

Dedicated Support and Coding Services

ArrayFire is open source and always will be. For those who want dedicated support or custom function development, we offer a variety of support packages.

ArrayFire also serves many clients through consulting and coding services, algorithm development, porting code, and training courses for developers. Contact us at sales@arrayfire.com or schedule a free technical consultation to learn more about our consulting and coding services.

Leave a Reply

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