Skip to content

Commit 26771f4

Browse files
authored
"fix compile error" (#13579)
* "fix compile error" * "fix ci" * rerun ci test=develop * test=develop rerun ci
1 parent 186b2b1 commit 26771f4

File tree

3 files changed

+15
-16
lines changed

3 files changed

+15
-16
lines changed

paddle/fluid/operators/CMakeLists.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,11 @@ function(op_library TARGET)
8282
if (${cc_srcs_len} EQUAL 0)
8383
message(FATAL_ERROR "The op library ${TARGET} should contains at least one .cc file")
8484
endif()
85-
86-
#remove windows unsupported op
8785
if (WIN32)
88-
foreach(windows_unsupport_op "nccl_op" "gen_nccl_id_op" "warpctc_op")
86+
# remove windows unsupported op, because windows has no nccl, no warpctc such ops.
87+
foreach(windows_unsupport_op "nccl_op" "gen_nccl_id_op" "warpctc_op" "hierarchical_sigmoid_op"
88+
"crf_decoding_op" "select_op" "lstmp_op" "gru_op" "fusion_gru_op" "lstm_op" "fusion_lstm_op" "cumsum_op"
89+
"channel_send_op" "channel_create_op" "channel_close_op" "channel_recv_op")
8990
if ("${TARGET}" STREQUAL "${windows_unsupport_op}")
9091
return()
9192
endif()
@@ -281,10 +282,12 @@ op_library(array_to_lod_tensor_op DEPS lod_rank_table_op)
281282
op_library(max_sequence_len_op DEPS lod_rank_table)
282283
op_library(sequence_conv_op DEPS context_project)
283284
op_library(sequence_pool_op DEPS sequence_pooling)
285+
if (NOT WIN32)
284286
op_library(lstm_op DEPS sequence2batch lstm_compute)
285287
op_library(hierarchical_sigmoid_op DEPS matrix_bit_code)
286288
op_library(lstmp_op DEPS sequence2batch lstm_compute)
287289
op_library(gru_op DEPS sequence2batch gru_compute)
290+
endif(NOT WIN32)
288291
op_library(recurrent_op DEPS executor)
289292
op_library(warpctc_op DEPS dynload_warpctc sequence_padding sequence_scale)
290293
op_library(cos_sim_op DEPS cos_sim_functor)
@@ -297,7 +300,6 @@ op_library(sequence_pad_op DEPS sequence_padding)
297300
op_library(unstack_op DEPS stack_op)
298301
op_library(fake_quantize_op DEPS memory)
299302
op_library(fusion_lstm_op DEPS cpu_lstm_compute)
300-
301303
if (WITH_GPU)
302304
op_library(conv_op DEPS vol2col depthwise_conv im2col)
303305
op_library(layer_norm_op DEPS cub)

paddle/fluid/operators/math/math_function.cc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ See the License for the specific language governing permissions and
1313
limitations under the License. */
1414

1515
#include "paddle/fluid/operators/math/math_function.h"
16+
17+
#ifdef PADDLE_WITH_MKLML
18+
#include "paddle/fluid/platform/dynload/mklml.h"
19+
#endif
20+
21+
#ifdef PADDLE_USE_OPENBLAS
22+
#include <cblas.h>
23+
#endif
24+
1625
#include <vector>
1726
#include "paddle/fluid/framework/data_type.h"
1827
#include "paddle/fluid/operators/math/math_function_impl.h"

paddle/fluid/operators/math/math_function.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,6 @@ See the License for the specific language governing permissions and
1313
limitations under the License. */
1414

1515
#pragma once
16-
#ifdef PADDLE_WITH_MKLML
17-
#include "paddle/fluid/platform/dynload/mklml.h"
18-
#endif
19-
20-
#ifdef PADDLE_USE_OPENBLAS
21-
#include <cblas.h>
22-
// remove typedef in openblas
23-
#undef FLOAT
24-
#undef INT
25-
#undef SIZE
26-
#endif
27-
2816
#include <cmath>
2917
#include <vector>
3018

0 commit comments

Comments
 (0)