Using GPUs in KVM Virtual Machines

Pavan Hardware, Infrastructure, Open Source 2 Comments

Introduction A couple of months ago, I began investigating GPU passthrough on my workstation to test ArrayFire on different operating systems. Around the same time, we at ArrayFire found ourselves with a few surplus GPUs. Having had great success with my virtualization efforts, we decided to build a Virtualized GPU Server to utilize these GPUs. Building a Virtualized GPU Server alleviated one of the pain points at our company: We no longer need to swap GPUs or Hard Disks to test a new environment. To maximize the number of GPUs we can put in a machine, we ended up getting a Quantum TXR430-0768R from Exxact Computing which comes in a 4U form factor and supports upto 8x double width GPUs. ...

ArrayFire v3.0 is here!

Aaron Announcements, ArrayFire, CUDA, Open Source, OpenCL 5 Comments

Today we are pleased to announce the release of ArrayFire v3.0. This new version features major changes to ArrayFire’s visualization library, a new CPU backend, and dense linear algebra for OpenCL devices. It also includes improvements across the board for ArrayFire’s OpenCL backend. A complete list ArrayFire v3.0 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. With ArrayFire’s library functions, developers can maximize ...

Machine Learning with ArrayFire: Linear Classifiers

Pavan ArrayFire, CUDA, OpenCL Leave a Comment

Linear classifiers perform classification based on the linear combinition of the component features. Some examples of Linear Classifiers include: Naive Bayes Classifier, Linear Discriminant Analysis, Logistic Regression and Perceptrons. ArrayFire's easy to use API enables users to write such classifiers from scratch fairly easily. In this post, we show how you can map mathematical equations to ArrayFire code and implement them from scratch. Naive Bayes Classifier Perceptron Naive Bayes Classifier Naive bayes classifier is a probabilistic classifier that assumes all the features in a feature vector are independent of each other. This assumption simplifies the bayes rule to a simple multiplication of probabilities as show below. First we start with the simple Baye's rule. Where: Since p(x) is the same ...

Indexing with ArrayFire

Umar ArrayFire Leave a Comment

ArrayFire is a fantastic library when it comes to performance. One of the things that people overlook when looking into ArrayFire is it's powerful indexing capabilities. The main data structure in the ArrayFire library is the array. The array stores the data in a column major order. This means that the following code:

Will produce the following matrix: Notice how the first three values of the a array make up the first column of A. When you want to perform an operation on every element of the array you can just use the variable name with the operation. The following command adds 5 to each element of the array:

If you want to assign one value to each ...

How to Make GPU Hardware Decisions

Scott Computing Trends, CUDA, Hardware, OpenCL Leave a Comment

We get questions all the time about how to make GPU hardware decisions. We've seen just about every scenario you can imagine, and so we always jump at the chance to help others through this decision process. Here's a recent question from a customer. "I've just found your post on Analytic Bridge and have taken a look at your website ... I'm replacing my two Tesla M1060 cards (computing capability too low) and I'm considering used Tesla M2070s or the new GTX 760 cards. Could you offer any insight? I believe the GTX 760 cards may well outperform the older 2070s and are much cheaper." And here's our response. "The GTX 760 will probably outperform the M2070 for single precision ...

ArrayFire-OpenGL Interop using CUDA

Shehzan ArrayFire, CUDA, OpenGL Leave a Comment

A lot of ArrayFire users have been interested in the usage of ArrayFire in partnership with OpenGL for graphics computation. In the long run, we do plan to expand further on the interoperablilty and make it easier through ArrayFire. For now, we have developed a small example to expand on the usage of the CUDA-OpenGL interop API to assist in the interop operations between ArrayFire and OpenGL. Some of the advantage of direct ArrayFire-OpenGL interop are: Faster data transfers: Since the OpenGL buffers as well as ArrayFire data reside on the GPU, we can use a direct device to device copy rather than using the CPU as an intermediate and the relatively slow PCIe interface. Offscreen rendering: It is commonly ...

Application Time vs Solver Time

John ArrayFire, Computing Trends Leave a Comment

Last week, HPCwire ran an interesting article entitled, "Where has HPC's math gone?" The article analyzes the increasing importance of math solvers to successful HPC outcomes. As the number of cores grows, the percentage of time HPC codes spend in solvers increases significantly. The following chart illustrates this trend nicely:   ArrayFire is ideally suited for HPC applications that need to accelerate the toughest math problems. ArrayFire contains hundreds of math functions across numerous domains. In general, if the HPC community really wants to solve this problem, it will begin to invest more in libraries than in compilers that have no chance at optimizing these tough math problems automatically. Rather, it is only through expertly-tuned codes, such as those developed ...

clMath: An Open Source BLAS and FFT Library for OpenCL

Scott Announcements, OpenCL Leave a Comment

If you're reading our blog, BLAS and FFT libraries likely form an important basis for your work. For instance, BLAS and FFT libraries are used in some of ArrayFire's higher-level functions for linear algebra, signal processing, and image processing. Today, OpenCL is getting a big boost in BLAS and FFT library availability. AMD has announced a bold and generous move to contribute back to the OpenCL community by open sourcing its APPML BLAS and FFT OpenCL libraries. At AccelerEyes, we have used AMD's OpenCL libraries in the past within our higher-level ArrayFire library. These libraries are the best BLAS and FFT OpenCL libraries available anywhere. We are thrilled to now join AMD and the open source community in maintaining and improving these ...

Beamforming with ArrayFire

Scott ArrayFire, Case Studies, CUDA Leave a Comment

Alessandro Savoia and researchers at Università degli Studi Roma Tre have achieved an order of magnitude improvement in the performance of a beamforming application using ArrayFire for GPU acceleration with CUDA-capable NVIDIA GPUs. This application involves conventional beamforming. Steps include the application of a time delay to each signal vector, summation across all vectors, and processing on the result. Processing includes demodulation, envelope extraction, and logarithmic compression. ArrayFire's functions for shifting, interpolation, and filtering made this application possible for acceleration on GPUs and reduced the time to develop significantly. Alessandro's benchmarks show that a CPU-only version was only running at 1 frame/sec, while the ArrayFire-accelerated version was running at 10-20 frames/sec, depending on the dataset. Alessandro and his team are looking forward to ...

History of the Modern GPU Series

John Computing Trends Leave a Comment

Graham Singer over at Techspot posted a series of articles a few weeks ago covering the history of the modern GPU. It is well-written and in-depth. For GPU affectionados, this is a nice read. There are 4 parts to the series: Part 1: (1976 - 1995) The Early Days of 3D Consumer Graphics Part 2: (1995 - 1999) 3Dfx Voodoo: The Game-changer Part 3: (2000 - 2006) The Nvidia vs. ATI Era Begins Part 4: (2006 - 2013) The Modern GPU: Stream processing units a.k.a. GPGPU Enjoy!