Skip to content

Commit 46677fb

Browse files
author
Wojciech Uss
committed
Move cpu_quantize_* passes into mkldnn subfolder
test=develop
1 parent de3b70a commit 46677fb

12 files changed

+19
-12
lines changed

paddle/fluid/framework/ir/CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ cc_library(fuse_pass_base SRCS fuse_pass_base.cc DEPS pass)
4646
pass_library(graph_to_program_pass base)
4747
pass_library(graph_viz_pass base)
4848
pass_library(lock_free_optimize_pass base)
49-
pass_library(cpu_quantize_placement_pass base)
50-
pass_library(cpu_quantize_pass inference)
51-
pass_library(cpu_quantize_squash_pass inference)
5249
pass_library(fc_fuse_pass inference)
5350
pass_library(attention_lstm_fuse_pass inference)
5451
pass_library(infer_clean_graph_pass inference)
@@ -87,6 +84,9 @@ if(WITH_MKLDNN)
8784
pass_library(conv_bias_mkldnn_fuse_pass inference mkldnn)
8885
pass_library(conv_relu_mkldnn_fuse_pass inference mkldnn)
8986
pass_library(conv_elementwise_add_mkldnn_fuse_pass inference mkldnn)
87+
pass_library(cpu_quantize_placement_pass base mkldnn)
88+
pass_library(cpu_quantize_pass inference mkldnn)
89+
pass_library(cpu_quantize_squash_pass inference mkldnn)
9090
endif()
9191

9292
cc_library(fuse_elewise_add_act_pass SRCS fuse_elewise_add_act_pass.cc DEPS pass graph_pattern_detector )
@@ -105,9 +105,6 @@ cc_test(test_graph_pattern_detector SRCS graph_pattern_detector_tester.cc DEPS g
105105
cc_test(test_fc_fuse_pass SRCS fc_fuse_pass_tester.cc DEPS fc_fuse_pass framework_proto)
106106
cc_test(test_seqpool_concat_fuse_pass SRCS seqpool_concat_fuse_pass_tester.cc DEPS seqpool_concat_fuse_pass framework_proto)
107107
cc_test(test_is_test_pass SRCS is_test_pass_tester.cc DEPS is_test_pass)
108-
cc_test(test_cpu_quantize_placement_pass SRCS cpu_quantize_placement_pass_tester.cc DEPS cpu_quantize_placement_pass)
109-
cc_test(test_cpu_quantize_pass SRCS cpu_quantize_pass_tester.cc DEPS cpu_quantize_pass naive_executor)
110-
cc_test(test_cpu_quantize_squash_pass SRCS cpu_quantize_squash_pass_tester.cc DEPS cpu_quantize_squash_pass naive_executor)
111108
if(NOT WIN32)
112109
cc_test(test_sync_batch_norm_pass SRCS sync_batch_norm_pass_tester.cc DEPS sync_batch_norm_pass)
113110
endif()
@@ -117,4 +114,7 @@ if (WITH_MKLDNN)
117114
cc_test(test_conv_relu_mkldnn_fuse_pass SRCS mkldnn/conv_relu_mkldnn_fuse_pass_tester.cc DEPS conv_relu_mkldnn_fuse_pass)
118115
cc_test(test_conv_elementwise_add_mkldnn_fuse_pass SRCS mkldnn/conv_elementwise_add_mkldnn_fuse_pass_tester.cc DEPS conv_elementwise_add_mkldnn_fuse_pass)
119116
cc_test(test_mkldnn_placement_pass SRCS mkldnn/mkldnn_placement_pass_tester.cc DEPS mkldnn_placement_pass)
117+
cc_test(test_cpu_quantize_placement_pass SRCS mkldnn/cpu_quantize_placement_pass_tester.cc DEPS cpu_quantize_placement_pass)
118+
cc_test(test_cpu_quantize_pass SRCS mkldnn/cpu_quantize_pass_tester.cc DEPS cpu_quantize_pass naive_executor)
119+
cc_test(test_cpu_quantize_squash_pass SRCS mkldnn/cpu_quantize_squash_pass_tester.cc DEPS cpu_quantize_squash_pass naive_executor)
120120
endif ()

paddle/fluid/framework/ir/cpu_quantize_pass.cc renamed to paddle/fluid/framework/ir/mkldnn/cpu_quantize_pass.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#include "paddle/fluid/framework/ir/cpu_quantize_pass.h"
15+
#include "paddle/fluid/framework/ir/mkldnn/cpu_quantize_pass.h"
1616
#include <utility>
1717
#include <vector>
1818
#include "paddle/fluid/framework/eigen.h"
File renamed without changes.

paddle/fluid/framework/ir/cpu_quantize_pass_tester.cc renamed to paddle/fluid/framework/ir/mkldnn/cpu_quantize_pass_tester.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#include "paddle/fluid/framework/ir/cpu_quantize_pass.h"
15+
#include "paddle/fluid/framework/ir/mkldnn/cpu_quantize_pass.h"
1616
#include <gtest/gtest.h>
1717
#include "paddle/fluid/framework/naive_executor.h"
1818
#include "paddle/fluid/platform/place.h"

paddle/fluid/framework/ir/cpu_quantize_placement_pass.cc renamed to paddle/fluid/framework/ir/mkldnn/cpu_quantize_placement_pass.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License. */
1414

15-
#include "paddle/fluid/framework/ir/cpu_quantize_placement_pass.h"
15+
#include "paddle/fluid/framework/ir/mkldnn/cpu_quantize_placement_pass.h"
1616
#include <string>
1717
#include <unordered_set>
1818

paddle/fluid/framework/ir/cpu_quantize_placement_pass.h renamed to paddle/fluid/framework/ir/mkldnn/cpu_quantize_placement_pass.h

File renamed without changes.

paddle/fluid/framework/ir/cpu_quantize_placement_pass_tester.cc renamed to paddle/fluid/framework/ir/mkldnn/cpu_quantize_placement_pass_tester.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#include "paddle/fluid/framework/ir/cpu_quantize_placement_pass.h"
15+
#include "paddle/fluid/framework/ir/mkldnn/cpu_quantize_placement_pass.h"
1616

1717
#include <gtest/gtest.h>
1818
#include <boost/logic/tribool.hpp>

paddle/fluid/framework/ir/cpu_quantize_squash_pass.cc renamed to paddle/fluid/framework/ir/mkldnn/cpu_quantize_squash_pass.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// See the License for the specific language governing permissions and
1414
// limitations under the License.
1515

16-
#include "paddle/fluid/framework/ir/cpu_quantize_squash_pass.h"
16+
#include "paddle/fluid/framework/ir/mkldnn/cpu_quantize_squash_pass.h"
1717
#include <string>
1818
#include <vector>
1919
#include "paddle/fluid/platform/enforce.h"

paddle/fluid/framework/ir/cpu_quantize_squash_pass.h renamed to paddle/fluid/framework/ir/mkldnn/cpu_quantize_squash_pass.h

File renamed without changes.

paddle/fluid/framework/ir/cpu_quantize_squash_pass_tester.cc renamed to paddle/fluid/framework/ir/mkldnn/cpu_quantize_squash_pass_tester.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#include "paddle/fluid/framework/ir/cpu_quantize_squash_pass.h"
15+
#include "paddle/fluid/framework/ir/mkldnn/cpu_quantize_squash_pass.h"
1616
#include <gtest/gtest.h>
1717
#include "paddle/fluid/framework/naive_executor.h"
1818
#include "paddle/fluid/platform/place.h"

0 commit comments

Comments
 (0)