if you look at the OpenCV functions cv::erode and cv::dilate, you will see that they use constant border mode by default. In other words, in most cases the IPP acceleration will not be even called. You should check that if borderType == BORDER_CONSTANT and borderValue is equal to morphologyDefaultBorderValue() and if kernel at the anchor point is non-zero then IPP function can also be used. I repeat, without this modification IPP acceleration here is almost useless.