Blog

Notes on GPU computing and scientific Ruby

From Google Summer of Code and the Ruby Grant: NMatrix on JRuby, ArrayFire and CUDA bindings for Ruby, and calling D from Ruby.

cuda 24 February 2018

RbCUDA: Installation and Architecture

RBCuda is a software library designed to integrate with Ruby. It provides an interface for leveraging NVIDIA CUDA technology to accelerate computations on GPUs (Graphics Processing Units). This can significantly speed up tasks like matrix operations, simulations, and data processing by harnessing...

cuda 30 December 2017

RbCUDA: CUDA bindings for Ruby

I have been working on a new project called RbCUDA.

arrayfire 28 August 2017

GSoC 2017: Creating the fastest math libraries for Ruby by using the GPU through OpenCL and ArrayFire.

GSoC 2017 is about to end. This post summarises my work during the course of summer.

arrayfire 24 August 2017

ArrayFire Ruby Bindings
(Part VIII : Interfacing to NMatrix)

ArrayFire-rb has been interfaced to NMatrix so that they can work together. Sometimes, copying data from GPU memory to CPU memory and vice versa can be slower than the computation time. Hence, a lot of developers prefer to use GPU computing for the most time consuming task. The interface between ...

arrayfire 24 August 2017

ArrayFire Ruby Bindings
(Part VII : Multiple Backends: CUDA, OpenCL and CPU)

ArrayFire can run not just on GPU devices but also on CPU devices, which is one of its really cool features. With version 3.2 the unified-backend helps in changing the ArrayFire backend on the fly. When using the unified-backend, the preference order for the default backend is CUDA > OpenCL &g...

arrayfire 22 August 2017

ArrayFire Ruby Bindings
(Part VI : Device and Util)

ArrayFire has Device and Util class that contains of methods which can be used to manage the CPU and GPU devices and various utility functions like printing and storing the arrays. This blog will explain my work regarding the bindings I have created and how to use them.

arrayfire 17 August 2017

ArrayFire Ruby Bindings
(Part V : Statistics and Random Engine routines)

This post explains about the Statistics and Random class of arrayfire gem. ArrayFire::Statistics class consists of methods that can be used to operate on Af_Array for statistical analysis. ArrayFire::Random class contains of methods to generate Random numbers and array of Random numbers on the GPU.

arrayfire 16 August 2017

ArrayFire Ruby Bindings
(Part IV : BLAS and LAPACK routines)

This post covers how to use BLAS and LAPACK routines with ArrayFire-rb, and how these functions have been implemented by creating Ruby bindings to ArrayFire C API.

gpu-computing 25 July 2017

Calling D from Ruby for GPU computing

Language bindings are interfaces that allow code written in one programming language to interact with or use functionalities provided by libraries or code written in another programming language. They serve as a bridge between different programming environments, making it possible for developers ...

arrayfire 22 July 2017

ArrayFire Ruby Bindings
(Part III : Test-suite and Algorithm class)

This post covers how I implemented the test-suite and Algorithm class for ArrayFire-rb using ArrayFire C API, and how to use Algorithm class methods with Af_Array.

arrayfire 4 July 2017

ArrayFire Ruby Bindings
(Part II : Af_Array)

This post covers how to create arrays using arrayfire-rb, perform elementwise operations like addition, multiplication, etc. and how these functions have been implemented by creating Ruby bindings to ArrayFire C API.

arrayfire 23 June 2017

ArrayFire Ruby Bindings
(Part I : Installation)

I have been working on creating ArrayFire bindings for Ruby. ArrayFire is an opensource library that is very useful and highly popular for GPGPU computings. It has strong abstractions that makes it very easy for a programmer to benefit from GPU without being bothered about the configurations.

ruby-c-extensions 23 June 2017

Ruby C extensions for complex projects

In this blog and a few others that will follow, I would share my expereiences creating Ruby Bindings for C/C++ libraries. It covers a practical example rather than a Hello world! or chairs and tables examples.

jruby 22 August 2016

GSoC 2016: Port NMatrix to JRuby

I have been working on “Port NMatrix to JRuby” as my GSoC project. I am pleased to announce that JRuby is ready for Nmatrix users.

jruby 9 July 2016

JRuby Port of Mixed-Models

For my GSoC 2016 project of JRuby port of NMatrix, we worked on testing NMatrix-JRuby with real-life data. We started with mixed-models gem.

ruby 16 June 2016

JRuby Port of NMatrix

NMatrix for MRI has become a fairly well-established project. NMatrix is SciRuby’s numerical matrix core, implementing dense matrices as well as two types of sparse (linked-list-based and Yale/CSR). The backend has been written in C/C++ and relies on ATLAS/ CBLAS / CLAPACK and standard LAPACK for...

ruby 30 March 2016

mitab (MITab file parser)

I built a ruby-gem “mitab” that helps in parsing a PSI-Mitab file.