ArrayFire.jl - GPU Programming in Julia

1,176 views
Skip to first unread message

ran...@juliacomputing.com

unread,
Jun 10, 2016, 1:08:42 AM6/10/16
to julia-users
Hello, 

We are pleased to announce ArrayFire.jl, a library for GPU and heterogeneous computing in Julia: (https://github.com/JuliaComputing/ArrayFire.jl). We look forward to your feedback and your contributions as well! 

For more information, check out Julia Computing's latest blog post: http://juliacomputing.com/blog/2016/06/09/julia-gpu.html

Thanks,
Ranjan
Julia Computing, Inc. 

Fred

unread,
Jun 10, 2016, 6:10:48 AM6/10/16
to julia-users
Hi !

Thank you for this great package ! I tried to install it on Julia 0.4.5 but I obtained :

julia
               _
   _       _ _
(_)_     |  A fresh approach to technical computing
 
(_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _
| |_  __ _   |  Type "?help" for help.
 
| | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.4.5 (2016-03-18 00:58 UTC)
 _/
|\__'_|_|_|\__'_|  |  Official http://julialang.org release
|__/                   |  x86_64-linux-gnu


julia
> using ArrayFire
ERROR
: LoadError: LoadError: could not load library "libaf"
libaf
: Ne peut ouvrir le fichier d'objet partagé: Aucun fichier ou dossier de ce type
 in dlopen at ./libdl.jl:36
 in dlopen at libdl.jl:36
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:320
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:320
 in require at ./loading.jl:259
while loading /home/fred/.julia/v0.4/ArrayFire/src/config.jl, in expression starting on line 6
while loading /home/fred/.julia/v0.4/ArrayFire/src/ArrayFire.jl, in expression starting on line 5



Mauro

unread,
Jun 10, 2016, 6:19:16 AM6/10/16
to julia...@googlegroups.com
You need to install the arrayfire library by hand:
https://github.com/JuliaComputing/ArrayFire.jl#installation

If done already, check the trouble shooting section.

Robert Feldt

unread,
Jun 10, 2016, 10:14:55 AM6/10/16
to julia-users
Thanks, this looks really nice. 

I seem to be able to install it ok but when trying to run on a fairly recent MacBook Pro (Retina, 13-inch, Early 2015) I get an error when trying this on julia Version 0.4.5 (2016-03-18 00:58 UTC) x86_64-apple-darwin15.4.0:

julia> using ArrayFire

julia> #Random number generation
       a = rand(AFArray{Float64}, 100, 100)
ERROR: "ArrayFire Error (401) : Double precision not supported for this device"
 in af_randu at /Users/feldt/.julia/v0.4/ArrayFire/src/wrap.jl:1033
 in rand at /Users/feldt/.julia/v0.4/ArrayFire/src/create.jl:7

Maybe update the docs to make the requirements and limitations more clear? Or is there a way around this?

My computer/version details:

Processor: 3,1 GHz Intel Core i7

Memory: 16 GB 1867 MHz DDR3

Graphics: Intel Iris Graphics 6100 1536 MB

OS: El Capitan, 10.11.3 (15D21)

Thanks,

Robert Feldt

Mauro

unread,
Jun 10, 2016, 10:18:18 AM6/10/16
to julia...@googlegroups.com


On Fri, 2016-06-10 at 16:14, Robert Feldt <robert...@gmail.com> wrote:
> Thanks, this looks really nice.
>
> I seem to be able to install it ok but when trying to run on a fairly
> recent MacBook Pro (Retina, 13-inch, Early 2015) I get an error when trying
> this on julia Version 0.4.5 (2016-03-18 00:58 UTC)
> x86_64-apple-darwin15.4.0:
>
> julia> using ArrayFire
>
> julia> #Random number generation
> a = rand(AFArray{Float64}, 100, 100)

a = rand(AFArray{Float32}, 100, 100)

Most graphic cards only support 32 bit floats.

> ERROR: "ArrayFire Error (401) : Double precision not supported for this
> device"
> in af_randu at /Users/feldt/.julia/v0.4/ArrayFire/src/wrap.jl:1033
> in rand at /Users/feldt/.julia/v0.4/ArrayFire/src/create.jl:7
>
> Maybe update the docs to make the requirements and limitations more clear?
> Or is there a way around this?
>
> My computer/version details:
>
> Processor: 3,1 GHz Intel Core i7
>
> Memory: 16 GB 1867 MHz DDR3
>
> Graphics: Intel Iris Graphics 6100 1536 MB
> OS: El Capitan, 10.11.3 (15D21)
>
> Thanks,
>
> Robert Feldt
>
> Den fredag 10 juni 2016 kl. 12:19:16 UTC+2 skrev Mauro:
>>
>> You need to install the arrayfire library by hand:
>> https://github.com/JuliaComputing/ArrayFire.jl#installation
>>
>> If done already, check the trouble shooting section.
>>
>> On Fri, 2016-06-10 at 12:10, Fred <fred.so...@gmail.com <javascript:>>

Robert Feldt

unread,
Jun 10, 2016, 10:20:54 AM6/10/16
to julia-users
Great thanks. I suggest a comment about this or changing the example in the README so it's more clear to people like me... ;)

/Robert

Keno Fischer

unread,
Jun 10, 2016, 12:01:50 PM6/10/16
to julia...@googlegroups.com
Some computers have more than one graphics card and the more powerful one needs to be activated manually. I know that's the case on my macbook.

Gabriel Goh

unread,
Jun 10, 2016, 6:00:02 PM6/10/16
to julia-users
is there windows support? I have a pretty beefy gaming PC

David Anthoff

unread,
Jun 10, 2016, 6:10:07 PM6/10/16
to julia...@googlegroups.com

Ranjan Anantharaman

unread,
Jun 11, 2016, 7:49:30 AM6/11/16
to julia-users
Hey, I'm also giving a talk on ArrayFire.jl at JuliaCon 2016 too: http://juliacon.org/abstracts.html#ArrayFire. See how ArrayFire.jl is useful in accelerating your code!

Thanks,
Ranjan

Andrew

unread,
Jun 11, 2016, 9:33:57 AM6/11/16
to julia-users
I have very little knowledge of GPU computing. Is it possible to use the GPU for not just simple matrix operations, but for arbitrary functions? I think I'm looking here for a GPU pmap(f, A), where f is a function I've defined and A is some array with a few thousand elements.

Simon Danisch

unread,
Jun 11, 2016, 12:07:59 PM6/11/16
to julia-users
That would need the capability of compiling arbitrary Julia functions for the GPU.
If you remove the arbitrary (no allocations, no exceptions, no IO) and are confident with trying out prototypes, this already exists for NVidia GPU's: https://github.com/JuliaGPU/CUDAnative.jl
If you only have a couple of thousand elements, it might be that you won't profit much from the GPU, though ;)

Kaj Wiik

unread,
Jun 20, 2016, 3:46:24 PM6/20/16
to julia-users

For anyone trying to get things working in Ubuntu (Xenial) environment...

I could not get ArrayFire.jl working with the binary libraries, compiling from source was quite easy and everything works now fine.

Deniz Yuret

unread,
Aug 25, 2016, 11:39:55 AM8/25/16
to julia-users
Thanks for this great package Ranjan.  I'd like to contribute to the development -- in particular integration with CUDNN, CUSPARSE, etc. under the JuliaGPU ecosystem, if others have not started doing so already.  With CUDNN, for example, I wrapped the low level library code to use CudaArrays, then implemented a high level interface.  Do you see a problem using AFArrays in the same way using kernels from other libraries or custom kernels?  Also I am not sure about the right place for this cross library support: should it go under ArrayFire.jl or CUDNN.jl?

best,
deniz

Min-Woong Sohn

unread,
Aug 26, 2016, 7:08:13 PM8/26/16
to julia-users
Does anybody know of any plan to support ArrayFire in GLM or MixedModels any time soon?

Douglas Bates

unread,
Aug 27, 2016, 11:13:20 AM8/27/16
to julia-users
On Friday, August 26, 2016 at 6:08:13 PM UTC-5, Min-Woong Sohn wrote:
Does anybody know of any plan to support ArrayFire in GLM or MixedModels any time soon?

Do you have a particular application in mind or is this a general question?  For MixedModels I would say that, depending upon the configuration of the random-effects terms in a model there could be a great advantage or almost no advantage in using a GPU, so details are important.

We're always looking for challenging GLM or mixed-effects problems that can be used to tune up these packages.  If you have cases that seem to be taking a long time and would be suitable for parallel or GPU computing we would love to hear about them. 

Min-Woong Sohn

unread,
Aug 28, 2016, 4:35:19 PM8/28/16
to julia-users
No, I don't have any particular application in mind right now, but in general I always found that mixed effects models take a long time to run on large data sets. 
Reply all
Reply to author
Forward
0 new messages