oneDNN icon indicating copy to clipboard operation
oneDNN copied to clipboard

KNL layer time Breakdown with Resnet-50

Open sj-leo opened this issue 9 years ago • 4 comments

Dear MKLDNN developers,

I have a question about KNL layer time Breakdown with Resnet-50 in MKLDNN. It is known that most of the execution time of the CNN algorithm proceeds through the convolution layer (up to 95% of total execution time).

However, when I executed Resnet-50 algorithm using KNL in MKLDNN, it is observed that Batch Normalization (BN), relu, split, and Element Wise Sum (EWS) take a lot of execution time (up to 30% of total execution time). Also, in GPU, I observed that most of the execution time of Resnet-50 occurs in the convolution layer (up to 99% of total execution time)

So, I want to know that lots of time in BN, relu, split, and EWS is whether a simple optimization reason or a fundamental reason in KNL (whether the time in BN, relu, split, and EWS can be eliminated with optimazation or not be optimized fundamentally).

sj-leo avatar Jul 25 '17 05:07 sj-leo

Which framework are you using? Which MCDRAM mode?

rsdubtso avatar Jul 25 '17 13:07 rsdubtso

I use Intel Caffe (link: https://github.com/intel/caffe) and use 'flat' MCDRAM mode in KNL. Also, I execute Resnet-50 with 64 batch size to fit the model size to the MCDRAM size (16GB) and use 'numactl' linux command to access all of the memory only in MCDRAM.

sj-leo avatar Jul 25 '17 15:07 sj-leo

I can only confirm that my old-ish runs show about the same % of time spent inside/outside of convolutions. I have little experience with GPU runs so I cannot really comment on why the breakdown is different there.

rsdubtso avatar Jul 27 '17 17:07 rsdubtso

I think I should look for more.

Thank you for reply.

sj-leo avatar Aug 07 '17 01:08 sj-leo