Texture Binding of MATLAB GPU variables

[Old posts from the commercial version of ArrayFire] Discussion of ArrayFire using CUDA or OpenCL.

Moderator: pavanky

Texture Binding of MATLAB GPU variables

Postby vishy » Wed Mar 09, 2011 11:35 am

We recently received the following email from a customer:

I'm currently developing algorithms for data processing in MR based neuroimaging. Because of the
nature of the problem i'm solving it's necessary for me to design custom CUDA kernels to
execute them in MATLAB using the functionality of the MATLAB Paralell toolbox which allows
me to call my custom kernels on GPU array variables in the MATLAB workspace.

This for the moment is working well, but my algorithms would now benefit from being able
to use texture-bound variables in my kernels. Currently I can't see a way of doing this
with the current implementation of the MATLAB parallel toolbox without reverting to
going through the MEX interface, which i find is always problematic and difficult.

What i'd like to be able to do is bind gpuArrays in my MATLAB workspace to textures
so that they can be used via texture references in my custom CUDA kernels, this
would give me many performance benefits.

What I'd like to know is if this is possible with the functionality of the Jacket product
itself. Firstly, I believe that Jacket allows me to instantiate gpuArrays in the MATLAB
workspace in a similar way to the MATLAB parallel toolbox and then call my custom
CUDA kernels on these variables. Does Jacket provide the functionality I seek to
bind these gpuArray variables in the MATLAB workspace to textures for use
in Kernels which use texture fetches? And also, will the Jacket SDK help with this
perhaps, if this functionality is not already inherent in the Jacket product, could I
use the jacket SDK to perhaps produce my own variable types for the MATLAB
workspace which are texture bound?


You might consider Jacket's SDK interface to bind to textures and include your kernels. Check out demos/sdk_example/medfilter2_example/medfilt2_tex.cu in the Jacket installation directory. Free download/trial here: http://www.accelereyes.com/downloadJacket
--------------------------------------------------
Vish Venugopalakrishnan
Software Engineer (Q/A)
AccelerEyes LLC
vishy.v@accelereyes.com

--------------------------------------------------
Resources:
Getting Started, FAQ, Tips, Syntax
User avatar
vishy
 
Posts: 411
Joined: Thu Apr 16, 2009 11:46 am

Return to [archive-commercial] Programming & Development with ArrayFire

cron