pytorch/caffe2/opt/optimize_ideep.h
Cheng,Penghui e13101e069 support pre-convert filter format for mkldnn training mode and change 'OptimizeForIdeep' to 'OptimizeForMkldnn' (#15171)
Summary:
For MKL-DNN,the filter data will be reorderd to primitive format, it takes a lot of time.
So the patch provide a method to convert filter format before training.
And "OptimizeForIdeep" will be changed to "OptimizeForMkldnn" in this patch.
 This patch depends on https://github.com/pytorch/pytorch/pull/12866
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15171

Differential Revision: D14590741

Pulled By: yinghai

fbshipit-source-id: 07971c9977edac3c8eec08ca2c39cda639683492
2019-03-29 19:00:48 -07:00

17 lines
352 B
C++

#pragma once
#include "caffe2/core/common.h"
#include "caffe2/core/workspace.h"
#include "caffe2/proto/caffe2_pb.h"
#include "nomnigraph/Representations/NeuralNet.h"
namespace caffe2 {
namespace opt {
CAFFE2_API void OptimizeForMkldnn(
nom::repr::NNModule* nn,
caffe2::Workspace* ws,
bool training_mode = false);
}
} // namespace caffe2