# How to utilize "MKLSparse.jl"?

**URL:** https://discourse.julialang.org/t/how-to-utilize-mklsparse-jl/85263
**Category:** General Usage
**Tags:** question
**Created:** [August 3, 2022, 8:07pm UTC](https://discourse.julialang.org/t/how-to-utilize-mklsparse-jl/85263 "2022-08-03T20:07:15Z")
**Posts on this page:** 1
**Showing post:** 14

<div class="post-metadata">

### Author: ![pitsianis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pitsianis/32/26588_2.png) [@pitsianis](https://discourse.julialang.org/u/pitsianis)
#### Post date: [September 1, 2022, 1:30pm UTC](https://discourse.julialang.org/t/how-to-utilize-mklsparse-jl/85263/14 "2022-09-01T13:30:11Z")

</div>

It might be interesting to try

> [@\[ANN\] Fast SpMv with CompressedSparseBlocks.jl](https://discourse.julialang.org/t/ann-fast-spmv-with-compressedsparseblocks-jl/84680):
>
> If you have a computation with an iteration where the time is dominated by a large sparse matrix multiplication, julia\> using LinearAlgebra, SparseArrays, BenchmarkTools julia\> n = 2^22; d = 10; A = sprand(n,n,d/n); x = rand(n); julia\> y = @btime $A\*$x; 909.738 ms (2 allocations: 32.00 MiB) julia\> yt = @btime $(transpose(A))\*$x; 640.637 ms (2 allocations: 32.00 MiB) you may want to consider the [CompressedSparseBlocks](https://github.com/fcdimitr/CompressedSparseBlocks.jl) package, a Julia wrapper to the [CSB Library](https://github.com/PASSIONLab/CSB). julia\> using Compressed…

if your sparse matrix does not change for several iterations. The CSB data structure and code has been observed to be faster than MKL for many sparse matrix families.

Your source codes will require a minor modification or abstraction to process the dense matrices in column batches. I think we compiled it with up to 32 dense columns per call.

---

_[View the full topic](https://discourse.julialang.org/t/how-to-utilize-mklsparse-jl/85263)._
