未验证 提交 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 {
class SyncBatchNormPass : public Pass {
protected:
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";
for (const Node *n : graph->Nodes()) {
if (n->IsOp() && n->Op()) {
......
......@@ -68,12 +68,8 @@ if (WITH_GPU)
else()
op_library(warpctc_op DEPS dynload_warpctc sequence_padding sequence_scale)
endif()
if (NOT WIN32)
if (WITH_NCCL)
op_library(sync_batch_norm_op)
file(APPEND ${pybind_file} "USE_CUDA_ONLY_OP(sync_batch_norm);\n")
endif()
endif()
op_library(sync_batch_norm_op)
file(APPEND ${pybind_file} "USE_CUDA_ONLY_OP(sync_batch_norm);\n")
else()
op_library(warpctc_op DEPS dynload_warpctc sequence_padding sequence_scale)
endif()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册