Skip to content

Commit

Permalink
[CPU] Remove BatchNorm node. (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
nshchego authored and dmitry-gorokhov committed May 5, 2021
1 parent 825d053 commit 2a1c980
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 363 deletions.
1 change: 0 additions & 1 deletion inference-engine/src/mkldnn_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ endif()

## TODO
set(LAYERS
# ${CMAKE_CURRENT_SOURCE_DIR}/nodes/mkldnn_batchnorm_node.cpp
${CMAKE_CURRENT_SOURCE_DIR}/nodes/mkldnn_bin_conv_node.cpp
${CMAKE_CURRENT_SOURCE_DIR}/nodes/mkldnn_concat_node.cpp
${CMAKE_CURRENT_SOURCE_DIR}/nodes/mkldnn_conv_node.cpp
Expand Down
12 changes: 0 additions & 12 deletions inference-engine/src/mkldnn_plugin/mkldnn_descriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,6 @@ size_t MKLDNNDescriptor::outputNumbers() const {
return 1;
}

MKLDNNDescriptor::MKLDNNDescriptor(std::shared_ptr<mkldnn::batch_normalization_forward::desc> desc) {
this->desc.reset(new DescFwdImpl<mkldnn::batch_normalization_forward::desc>(desc));
}

MKLDNNDescriptor::operator std::shared_ptr<mkldnn::batch_normalization_forward::desc>() {
auto typeDesc = std::dynamic_pointer_cast<DescFwdImpl<mkldnn::batch_normalization_forward::desc>>(desc);
if (typeDesc == nullptr) {
IE_THROW() << "Cannot cast descriptor!";
}
return typeDesc->getPtr();
}

MKLDNNDescriptor::MKLDNNDescriptor(std::shared_ptr<mkldnn::convolution_forward::desc> desc) {
this->desc.reset(new DescFwdImpl<mkldnn::convolution_forward::desc>(desc));
}
Expand Down
3 changes: 0 additions & 3 deletions inference-engine/src/mkldnn_plugin/mkldnn_descriptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@

class MKLDNNDescriptor {
public:
explicit MKLDNNDescriptor(std::shared_ptr<mkldnn::batch_normalization_forward::desc> desc);
operator std::shared_ptr<mkldnn::batch_normalization_forward::desc>();

explicit MKLDNNDescriptor(std::shared_ptr<mkldnn::convolution_forward::desc> desc);
operator std::shared_ptr<mkldnn::convolution_forward::desc>();

Expand Down
1 change: 0 additions & 1 deletion inference-engine/src/mkldnn_plugin/mkldnn_exec_network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,6 @@ bool MKLDNNExecNetwork::CanProcessDynBatch(const InferenceEngine::CNNNetwork &ne
// type != Concatenation &&
// type != Eltwise &&
// type != Crop &&
// type != BatchNormalization &&
// type != Copy) {
// check_result = false;
// }
Expand Down
9 changes: 0 additions & 9 deletions inference-engine/src/mkldnn_plugin/mkldnn_graph_optimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,6 @@ void MKLDNNGraphOptimizer::ApplyCommonGraphOptimizations(MKLDNNGraph &graph) {
FuseBinaryConvolutionAndQuantize(graph);
graph.RemoveDroppedNodes();

OV_ITT_SCOPE_NEXT(FIRST_INFERENCE, taskChain, "FuseBatchNormWithScale");
FuseBatchNormWithScale(graph);
graph.RemoveDroppedNodes();

// OV_ITT_SCOPE_NEXT(FIRST_INFERENCE, taskChain, "RemoveIdentityOperator");
// RemoveIdentityOperator(graph);
// graph.RemoveDroppedNodes();

OV_ITT_SCOPE_NEXT(FIRST_INFERENCE, taskChain, "FuseConvolutionSumAndConvolutionSumActivation");
FuseConvolutionSumAndConvolutionSumActivation(graph);
graph.RemoveDroppedNodes();

Expand Down
2 changes: 0 additions & 2 deletions inference-engine/src/mkldnn_plugin/mkldnn_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include <cstdint>
#include <unordered_map>

#include <nodes/mkldnn_batchnorm_node.h>
#include <nodes/mkldnn_concat_node.h>
#include <nodes/mkldnn_conv_node.h>
#include <nodes/mkldnn_deconv_node.h>
Expand Down Expand Up @@ -168,7 +167,6 @@ static const InferenceEngine::details::caseless_unordered_map<std::string, Type>
// { "SimplerNMS", SimplerNMS },
// { "ROIAlign", ROIAlign },
// { "ROIPooling", ROIPooling },
// { "BatchNormalization", BatchNormalization },
// { "Flatten", Flatten },
{ "Pad", Pad },
{ "Transpose", Transpose },
Expand Down
3 changes: 0 additions & 3 deletions inference-engine/src/mkldnn_plugin/mkldnn_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ enum Type {
SimplerNMS,
ROIAlign,
ROIPooling,
BatchNormalization,
DepthToSpace,
Flatten,
Pad,
Expand Down Expand Up @@ -202,8 +201,6 @@ static std::string NameFromType(Type type) {
return "ROIAlign";
case ROIPooling:
return "ROIPooling";
case BatchNormalization:
return "BatchNormalization";
case DepthToSpace:
return "DepthToSpace";
case Flatten:
Expand Down
289 changes: 0 additions & 289 deletions inference-engine/src/mkldnn_plugin/nodes/mkldnn_batchnorm_node.cpp

This file was deleted.

Loading

0 comments on commit 2a1c980

Please sign in to comment.