From 928efeed46132df27d1c389be046bdc31c9451f4 Mon Sep 17 00:00:00 2001 From: peizhilin Date: Sat, 17 Nov 2018 14:41:29 +0800 Subject: [PATCH] add the jit support, test=develop --- cmake/operators.cmake | 5 +++-- paddle/fluid/operators/math/detail/activation_functions.h | 6 ------ paddle/fluid/platform/cpu_info.h | 5 +++++ paddle/fluid/platform/enforce.h | 5 +++++ 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/cmake/operators.cmake b/cmake/operators.cmake index c9d0f80da..5636342ef 100644 --- a/cmake/operators.cmake +++ b/cmake/operators.cmake @@ -84,8 +84,9 @@ function(op_library TARGET) endif() if (WIN32) # remove windows unsupported op, because windows has no nccl, no warpctc such ops. - foreach(windows_unsupport_op "nccl_op" "gen_nccl_id_op" "warpctc_op" "hierarchical_sigmoid_op" - "crf_decoding_op" "select_op" "lstmp_op" "gru_op" "fusion_gru_op" "lstm_op" "fusion_lstm_op" "cumsum_op" + foreach(windows_unsupport_op "nccl_op" "gen_nccl_id_op" "warpctc_op" +# "hierarchical_sigmoid_op" "cumsum_op" +# "crf_decoding_op" "select_op" "lstmp_op" "gru_op" "fusion_gru_op" "lstm_op" "fusion_lstm_op" "fusion_seqconv_eltadd_relu_op" "channel_send_op" "channel_create_op" "channel_close_op" "channel_recv_op") if ("${TARGET}" STREQUAL "${windows_unsupport_op}") return() diff --git a/paddle/fluid/operators/math/detail/activation_functions.h b/paddle/fluid/operators/math/detail/activation_functions.h index 42fb45a8a..2b3d38d95 100644 --- a/paddle/fluid/operators/math/detail/activation_functions.h +++ b/paddle/fluid/operators/math/detail/activation_functions.h @@ -16,12 +16,6 @@ limitations under the License. */ #include #include -#ifdef _WIN32 -#undef __AVX__ -#undef __AVX__2 -#endif - - #include "paddle/fluid/platform/enforce.h" #include "paddle/fluid/platform/hostdevice.h" diff --git a/paddle/fluid/platform/cpu_info.h b/paddle/fluid/platform/cpu_info.h index 6810a1651..1b4840d9a 100644 --- a/paddle/fluid/platform/cpu_info.h +++ b/paddle/fluid/platform/cpu_info.h @@ -14,6 +14,11 @@ limitations under the License. */ #pragma once +#ifdef _WIN32 +#undef __AVX__ +#undef __AVX2__ +#endif + #include namespace paddle { diff --git a/paddle/fluid/platform/enforce.h b/paddle/fluid/platform/enforce.h index a251bfcd9..c03bbd59a 100644 --- a/paddle/fluid/platform/enforce.h +++ b/paddle/fluid/platform/enforce.h @@ -14,6 +14,11 @@ limitations under the License. */ #pragma once +#ifdef _WIN32 +#undef __AVX__ +#undef __AVX2__ +#endif + #ifdef __GNUC__ #include // for __cxa_demangle #endif // __GNUC__ -- GitLab