Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
105 Views

SPARSE_MEMORY_AGGRESSIVE

Hi,

Iam using SPARSE_MEMORY_AGGRESIVE which is default in mkl_sparse_set_memory_hint. But with this the memory utilization is 75% more than without it. If I use this I see a performance beneifit with penalty in the memory consumption.

Iam using this for a SPMV operation here is the sequence:

mkl_sparse_d_create_csr

mkl_sparse_set_memory_hint

mkl_sparse_set_mv_hint

mkl_sparse_optimize

Could you please help me to resolve the memory consumption issue,

 

 

0 Kudos
5 Replies
Highlighted
Moderator
105 Views

Do you expect to see the same performance but with the memory consumption which will be is proportional to vector size? 

0 Kudos
Highlighted
Beginner
105 Views

Yes. Is this possible.  How do I reduce the memory consumption. 

0 Kudos
Highlighted
Moderator
105 Views

Did you try to set the memory evaluation SPARSE_MEMORY_NONE policy? Did you accept the performance of this policy?

0 Kudos
Highlighted
Beginner
105 Views

Yes. I had tried with SPARSE_MEMORY_NONE. This reduces the memory, but no performance gain. That is the performance is similar to the run without using this optimized Intel MKL call

0 Kudos
Highlighted
Employee
105 Views

Hello,

I think there is nothing you can do about it. The goal of the optimize routines is to improve performance with the costs (often) being paid in additional memory.

Intel MKL tries to do its best when running spmv without additional memory, but for the best performance, we need additional memory for some internal data representations. So it is expected that the memory footprint will increase when you do optimize for spmv with the default  (SPARSE_MEMORY_AGGRESSIVE) memory policy.

For some workloads (I guess, yours included), there is not much to be gained without using a more efficient data representation and hence it can happen that no performance improvemement is there to be observed with optimize + SPARSE_MEMORY_NONE hint in comparison to plain spmv call without optimize.

If you have an important application where performance bottleneck is in spmv and you need better performance, you can submit a FR in the customer support center (then we'll need more details).

Best,
Kirill 

0 Kudos