Today we are announcing the release of ArrayFire version 3.6. The official binary installers can be downloaded here:

https://sandbox.arrayfire.com/downloads

We added several new features that improve the performance and usability of the ArrayFire library. The main features are:
<ul>
 	<li>Support for batched matrix multiply</li>
 	<li>Added the topk function</li>
 	<li>Added the anisotropic diffusion filter</li>
</ul>
The new batch functionality allows you to perform several matrix multiplication operations in one call of matmul. You might want to call this function if you are performing multiple smaller matrix multiplication operations. Here is an example:
<pre class="lang:c++ decode:true" title="Batched matrix multiply">// Create a 3x3x2 matrix
array a = randu(3, 3, 2);
array b = randu(3, 3, 2);

array c = matmul(a, b);
</pre>
The example above is creating 2 3 by 3 matrices as a 3x3x2 volume for a and b. The matmul function then multiplies the slice of the a volume with the corresponding slice in b. Which this approach you can reach higher efficiencies with smaller matrices. Here are some benchmarks for the batched matmul for different sizes of a matrix.

[column type="one-half" fade_animation="in" fade_animation_offset="45px"]
<pre class="">ArrayFire v3.6.0 (CUDA, 64-bit Linux, build ee21c79)
Platform: CUDA Toolkit 9.1, Driver: 390.30
[0] Tesla V100-PCIE-16GB, 16161 MB, CUDA Compute 7.0
Benchmark N-by-N matrix multiply
 128 x  128:   184 Gflops
 256 x  256:  1478 Gflops
 384 x  384:  4906 Gflops
 512 x  512:  7609 Gflops
 640 x  640:  9295 Gflops
 768 x  768:  9620 Gflops
 896 x  896:  10971 Gflops
1024 x 1024:  11332 Gflops
1152 x 1152:  11493 Gflops
1280 x 1280:  11745 Gflops
1408 x 1408:  12202 Gflops
1536 x 1536:  11885 Gflops
1664 x 1664:  12592 Gflops
1792 x 1792:  13135 Gflops
1920 x 1920:  12668 Gflops
2048 x 2048:  13510 Gflops</pre>
[/column]

[column type="one-half" fade_animation="in" fade_animation_offset="45px"]
<pre class="">ArrayFire v3.6.0 (CUDA, 64-bit Linux, build ee21c79)
Platform: CUDA Toolkit 9.1, Driver: 390.30
[0] Tesla V100-PCIE-16GB, 16161 MB, CUDA Compute 7.0
Benchmark N-by-N matrix multiply
 128 x 128 x 32: 2090 Gflops
 256 x 256 x 32: 8224 Gflops
 384 x 384 x 32: 11191 Gflops
 512 x 512 x 32: 10734 Gflops
 640 x 640 x 32: 12974 Gflops
 768 x 768 x 32: 13242 Gflops
 896 x 896 x 32: 13583 Gflops
1024 x 1024 x 32: 13544 Gflops
1152 x 1152 x 32: 13706 Gflops
1280 x 1280 x 32: 13804 Gflops
1408 x 1408 x 32: 13829 Gflops
1536 x 1536 x 32: 13849 Gflops
1664 x 1664 x 32: 13914 Gflops
1792 x 1792 x 32: 13932 Gflops
1920 x 1920 x 32: 13966 Gflops
2048 x 2048 x 32: 13791 Gflops
 ### peak 13966.2 GFLOPS</pre>
[/column]

The batched calls allow you to reach higher computational efficiencies because we are able to better distribute the work across the GPU.

The topk function is another exciting function that is included in this release. This function returns the top k most maximum or minimum values in a vector or matrix across a given dimension. Here is an example.

&nbsp;

&nbsp;