Fix inplace_abn compile error on Windows (#23464)

* fix inplace_abn windows compile error. test=develop
revert-23830-2.0-beta
Kaipeng Deng 5 years ago committed by GitHub
parent 0b583235f5
commit d223a24904
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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()

Loading…
Cancel
Save