Created by: bingyanghuang
#14612 (closed) This PR proposed one solution to selectively turn on "use_mkldnn" attribute in mkldnn_placement_pass. After investigation, we found that we can add attribute to each pass. So we decided to pass a string vector named op_list which contains all the op names we want to enable by this attribute of pass. You can add the following code to test this functionality in line 177.
if (use_mkldnn) {
cfg.EnableMKLDNN();
std::vector<std::string> op_list ={"conv3d"};
cfg.SetMKLDNNOp(op_list);
}
This test will enable just conv3d mkldnn kernel in DAM model. Meanwhile, you can test it with resnet50 to make sure that this works well with resnet50 too.