- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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,
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you expect to see the same performance but with the memory consumption which will be is proportional to vector size?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes. Is this possible. How do I reduce the memory consumption.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you try to set the memory evaluation SPARSE_MEMORY_NONE policy? Did you accept the performance of this policy?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
![](/skins/images/7B0AB6865064EAE32B30EC9A4E94B48A/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page