Skip to content

Commit d84a1a0

Browse files
committed
fc op use cpu only
1 parent fbc1640 commit d84a1a0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

paddle/fluid/operators/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,11 @@ function(op_library TARGET)
158158
file(APPEND ${pybind_file} "USE_OP_DEVICE_KERNEL(relu, MKLDNN);\n")
159159
else()
160160
file(APPEND ${pybind_file} "USE_OP_DEVICE_KERNEL(${TARGET}, MKLDNN);\n")
161+
# HACK: fc only have cpu kernel
162+
if (${MKLDNN_FILE} STREQUAL "fc_mkldnn_op")
163+
file(APPEND ${pybind_file} "USE_CPU_ONLY_OP(${TARGET});\n")
164+
set(pybind_flag 1)
165+
endif()
161166
endif()
162167
endif()
163168

0 commit comments

Comments
 (0)