File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -158,11 +158,6 @@ function(op_library TARGET)
158
158
file (APPEND ${pybind_file} "USE_OP_DEVICE_KERNEL(relu, MKLDNN);\n " )
159
159
else ()
160
160
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 ()
166
161
endif ()
167
162
endif ()
168
163
@@ -175,6 +170,9 @@ function(op_library TARGET)
175
170
file (APPEND ${pybind_file} "USE_OP(fake_dequantize_max_abs);\n " )
176
171
elseif (${TARGET} STREQUAL "tensorrt_engine_op" )
177
172
message (STATUS "Pybind skips [tensorrt_engine_op], for this OP is only used in inference" )
173
+ elseif (${TARGET} STREQUAL "fc" )
174
+ # HACK: fc only have mkldnn and cpu, which would mismatch the cpu only condition
175
+ file (APPEND ${pybind_file} "USE_CPU_ONLY_OP(${TARGET} );\n " )
178
176
else ()
179
177
file (APPEND ${pybind_file} "USE_OP(${TARGET} );\n " )
180
178
endif ()
You can’t perform that action at this time.
0 commit comments