Array causing increase in Host Memory

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

Moderator: pavanky

Array causing increase in Host Memory

Postby neuralPanther » Thu Oct 09, 2014 2:09 pm

Hi All,

Is there host overhead associated with the array object?

I'm finding an increase in host memory when I initialize my arrays.

It's possible I'm not allocating my arrays correctly - here's some code.

Code: Select all
// myGPUClass.h
class myGPUClass:
{
protected:
     //Functions
     long long setGPUMem(long long numBytes)
    {
         myArray = af::array(1,numBytes,af::f32);
    }
private:
    // variables
    af::array myArray;
};



Prior to calling the the setGPUMem my program shows 35 MB in task manager, after allocating the array - task manager is showing 135 MB.

Is there a better way to do this allocation? Is there a reason for this increase in host memory utilization?

Thank you,

~ NP
neuralPanther
 
Posts: 25
Joined: Fri Feb 14, 2014 8:03 pm

Re: Array causing increase in Host Memory

Postby shehzan » Thu Oct 09, 2014 2:29 pm

Hi

This increase is because we load the dependent dynamic libraries when ArrayFire is initialized.
You should see this increase even if you run af::info instead of initializing an array.
----
Shehzan
Developer
AccelerEyes
User avatar
shehzan
 
Posts: 121
Joined: Tue Feb 12, 2013 7:20 pm

Re: Array causing increase in Host Memory

Postby neuralPanther » Thu Oct 09, 2014 3:01 pm

That makes sense -

Is there anyway to minimize or reduce this?

I'm not host memory limited now, but I may be in the near future.

~ NP
neuralPanther
 
Posts: 25
Joined: Fri Feb 14, 2014 8:03 pm

Re: Array causing increase in Host Memory

Postby shehzan » Thu Oct 09, 2014 3:42 pm

Unfortunately, all the dependent libraries need to be located so I do not think there is way to reduce it.
----
Shehzan
Developer
AccelerEyes
User avatar
shehzan
 
Posts: 121
Joined: Tue Feb 12, 2013 7:20 pm


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

cron