未验证 提交 d223a249 编写于 作者: K Kaipeng Deng 提交者: GitHub

Fix inplace_abn compile error on Windows (#23464)

* fix inplace_abn windows compile error. test=develop
上级 0b583235
...@@ -24,6 +24,10 @@ namespace ir { ...@@ -24,6 +24,10 @@ namespace ir {
class SyncBatchNormPass : public Pass { class SyncBatchNormPass : public Pass {
protected: protected:
void ApplyImpl(ir::Graph *graph) const override { void ApplyImpl(ir::Graph *graph) const override {
#if defined(_WIN32)
VLOG(3) << "Not use synchronize batch norm on windows";
return;
#endif
VLOG(3) << "Use synchronize batch norm"; VLOG(3) << "Use synchronize batch norm";
for (const Node *n : graph->Nodes()) { for (const Node *n : graph->Nodes()) {
if (n->IsOp() && n->Op()) { if (n->IsOp() && n->Op()) {
......
...@@ -68,12 +68,8 @@ if (WITH_GPU) ...@@ -68,12 +68,8 @@ if (WITH_GPU)
else() else()
op_library(warpctc_op DEPS dynload_warpctc sequence_padding sequence_scale) op_library(warpctc_op DEPS dynload_warpctc sequence_padding sequence_scale)
endif() endif()
if (NOT WIN32) op_library(sync_batch_norm_op)
if (WITH_NCCL) file(APPEND ${pybind_file} "USE_CUDA_ONLY_OP(sync_batch_norm);\n")
op_library(sync_batch_norm_op)
file(APPEND ${pybind_file} "USE_CUDA_ONLY_OP(sync_batch_norm);\n")
endif()
endif()
else() else()
op_library(warpctc_op DEPS dynload_warpctc sequence_padding sequence_scale) op_library(warpctc_op DEPS dynload_warpctc sequence_padding sequence_scale)
endif() endif()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册