Arrayfire python interoperability

[Old posts from the commercial version of ArrayFire] Issues and comments for download and installation. Getting up and running.

Moderators: melonakos, pavanky

Arrayfire python interoperability

Postby FacundoGFlores » Thu Oct 23, 2014 9:05 pm

I've recently installed ArrayFire 2.1 on my Ubuntu 12.04. I want to use it with Python, is it possible? I tried ArrayFire_Python but it is incomplete, and it does not include functions such as rotate. I have exported the AF_PATH=/opt/arrayfire. I know it is working because:

1 - I did (at examples/helloworld)

Code: Select all
make cuda

2 - Run:

Code: Select all
./helloworld_cuda

3 - Get:
Code: Select all
ArrayFire v2.1 (CUDA, 64-bit Linux, build fd32605)
License: Standalone (/opt/arrayfire/arrayfire.lic)
License expires in 15 days.
Addons: MGL16, DLA, SLA
Platform: CUDA toolkit 6.0, Driver: 340.29
 0 : GeForce GTX 480, 1536 MB, CUDA Compute 2.0
Memory Usage: 1366 MB free (1536 MB total)


create a 5-by-3 matrix of random floats on the GPU
A [5 3] =
        0.7402     0.4464     0.7762
        0.9210     0.6673     0.2948
        0.0390     0.1099     0.7140
        0.9690     0.4702     0.3585
        0.9251     0.5132     0.6814

element-wise arithmetic
B [5 3] =
        0.7744     0.5317     0.8006
        0.8962     0.7189     0.3905
        0.1390     0.2097     0.7549
        0.9243     0.5531     0.4509
        0.8987     0.5910     0.7299

Fourier transform the result
C [5 3] =
           3.6327 + 0.0000i       2.6043 + 0.0000i       3.1267 + 0.0000i
           0.4689 + 0.4640i       0.3193 + 0.0802i       0.1713 + 0.1441i
          -0.3491 - 0.7454i      -0.2923 - 0.4018i       0.2667 + 0.4886i
          -0.3491 + 0.7454i      -0.2923 + 0.4018i       0.2667 - 0.4886i
           0.4689 - 0.4640i       0.3193 - 0.0802i       0.1713 - 0.1441i

grab last row
c [1 3] =
           0.4689 - 0.4640i       0.3193 - 0.0802i       0.1713 - 0.1441i

zero out every other column
negate the first three elements of middle column
B [5 3] =
        0.0000    -0.5317     0.0000
        0.0000    -0.7189     0.0000
        0.0000    -0.2097     0.0000
        0.0000     0.5531     0.0000
        0.0000     0.5910     0.0000

create 2-by-3 matrix from host data
D [2 3] =
        1.0000     3.0000     5.0000
        2.0000     4.0000     6.0000

copy last column onto first
D [2 3] =
        5.0000     3.0000     5.0000
        6.0000     4.0000     6.0000
FacundoGFlores
 
Posts: 3
Joined: Thu Oct 23, 2014 12:40 am

Re: Arrayfire python interoperability

Postby shehzan » Mon Nov 03, 2014 2:17 pm

Hi

We do not contribute to arrayfire_python. Please contact the owner of the repository.
----
Shehzan
Developer
AccelerEyes
User avatar
shehzan
 
Posts: 121
Joined: Tue Feb 12, 2013 7:20 pm

Re: Arrayfire python interoperability

Postby FacundoGFlores » Mon Nov 03, 2014 8:57 pm

Thank you! OK, I tried to contact him, but he did not answer me yet.

Are you planning to add Python support to ArrayFire for the next versions?
FacundoGFlores
 
Posts: 3
Joined: Thu Oct 23, 2014 12:40 am

Re: Arrayfire python interoperability

Postby shehzan » Tue Nov 04, 2014 2:55 pm

We do not have any plans to support python yet. We will make an announcement when we have substantial plans for support.
----
Shehzan
Developer
AccelerEyes
User avatar
shehzan
 
Posts: 121
Joined: Tue Feb 12, 2013 7:20 pm


Return to [archive-commercial] Download & Installation