Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Jingpeng_W_
Beginner
111 Views

sparse 3D convolution

Jump to solution

Hi MKL developers,

I am trying to implement a sparse convolution function based on MKL convolution. According to the sparseness, I departed the big convolution to a serials of subconvolution tasks. But only the first subconvolution result is correct, it goes wrong when I step forward in the sparseness.

I have implemented a 3D convolution function without sparseness. The output is the same with naive method without MKL. In this function, I have to flip the dimensions from xyz to zyx when specifying the data shape. I have not changed the array. It seems that MKL convolution is using row-major ordering, and the last x is changing fastest. Is it right?

The code using MKL is here:

https://github.com/jingpengwu/znn-release/blob/master/src/core/conv_mkl.hpp#L74

The direct sparse convolution code is here:

https://github.com/jingpengwu/znn-release/blob/master/src/core/bf_conv.hpp#L261

 

0 Kudos
1 Solution
Dmitry_B_Intel
Employee
111 Views

Hi Jingpeng,

 

I recommend you to devote a little bit more time to your code. In particular, look at the status returned by the MKL functions. It might also help to read the documentation and play with MKL examples. MKL convolution supports both col-major and row-major ordering of data, as defined by stride parameters to execution function (these are all NULL in your case, which assumes row-major ordering).

Thanks
Dima

 

View solution in original post

2 Replies
Dmitry_B_Intel
Employee
112 Views

Hi Jingpeng,

 

I recommend you to devote a little bit more time to your code. In particular, look at the status returned by the MKL functions. It might also help to read the documentation and play with MKL examples. MKL convolution supports both col-major and row-major ordering of data, as defined by stride parameters to execution function (these are all NULL in your case, which assumes row-major ordering).

Thanks
Dima

 

View solution in original post

Jingpeng_W_
Beginner
111 Views

Hi Dima,

Thanks for your information. I have fixed the bug. The sparse convolution works now!

 

Best Wishes!

Jingpeng

Reply