Sparse Matrices in ArrayFire v3.4

Shehzan MohammedArrayFire Leave a Comment

In ArrayFire v3.4, we have added support for sparse matrices, which greatly reduce the memory footprint on GPUs and accelerated devices for many applications. A sparse data structure is one where all the non-zero elements are not stored. Sparse matrices are useful when the number of zero-values elements are much greater than the number of non-zero elements (i.e. the sparsity of the matrix is high). A sparse data structure is generally stored as 3 arrays: A data or values array containing all the non-zero elements A vector for row indices (based on storage format) A vector for column indices (based on storage format) There are many ways to store sparse matrices, the most prominent of which are: Compressed Sparse Row (CSR) Compressed Storage Column (CSC) …

ArrayFire – CUDA Interoperability

Brian KloppenborgArrayFire, CUDA 2 Comments

Although ArrayFire is quite extensive, there remain many cases in which you may want to write custom kernels in CUDA or OpenCL. For example, you may wish to add ArrayFire to an existing code base to increase your productivity, or you may need to supplement ArrayFire’s functionality with your own custom implementation of specific algorithms. Today’s “Learning ArrayFire from scratch“, blog post discusses how you can interface ArrayFire and CUDA.

Introduction to the ArrayFire array

Brian KloppenborgArrayFire Leave a Comment

The fundamental primitive of the ArrayFire Library is our container object, the array. As the next post in our blog series, “Learning ArrayFire from scratch“, we will describe how to construct arrays, what datatypes arrays support, indexing, how to query an array for various properties (content, dimensions), and how to write mathematical expressions that involve arrays.

ArrayFire: Open-source for one year!

Brian KloppenborgArrayFire Leave a Comment

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 …

Learning ArrayFire from scratch: Installation

Brian KloppenborgArrayFire 9 Comments

Recently one of our interns completed his project ahead of schedule and asked if he could spend some time writing a particle filtering demo in ArrayFire for use at our upcoming trade shows. While learning the ins and outs of ArrayFire he posed several excellent questions which prompted us to start a series of blog posts entitled “Learning ArrayFire from scratch” that are geared to first-time users of our library. In today’s post I will cover the installation process on Windows, Mac, and Linux. Our next post will discuss the basics of setting up your first ArrayFire project.

ArrayFire v3.1 Official Release

ScottArrayFire 1 Comment

Today we are pleased to announce the release of ArrayFire v3.1. This new version features new functional support with a focus on computer vision and machine learning functions added to the library, along with new support for Array and Data Handling functions. This release also includes support for CUDA 7.5. A complete list of ArrayFire v3.1 updates and new features can be found in the product Release Notes. With over 8 years of continuous development, the open source ArrayFire library is the top CUDA and OpenCL software library. ArrayFire supports CUDA-capable GPUs, OpenCL devices, and other accelerators. With its easy-to-use API, this hardware-neutral software library is designed for maximum speed without the hassle of writing time-consuming CUDA and OpenCL device code. …

Building an ArrayFire program with CMake

Brian KloppenborgArrayFire 5 Comments

Introduction In the last week there were a few questions about how to use ArrayFire with CMake on Linux on the ArrayFire Google Groups page. Although we have some quick notes about this in the documentation I thought it would be fun to provide a fully worked example that demonstrates a cool CMake trick to reduce compilation time by a factor of three when linking against multiple backends. At the bottom of this post is a link to a GitHub repository containing a minimal CMake project setup which links a program against ArrayFire’s CPU, OpenCL, and CUDA backends.