Skip to content

Commit cb7d39d

Browse files
committed
Fix CI
1 parent 0379b1d commit cb7d39d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

paddle/framework/operator.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ OperatorBase::OperatorBase(const std::string& type,
125125

126126
if (op_info_it != OpRegistry::op_info_map().end()) {
127127
auto* op_proto = op_info_it->second.proto_;
128+
if (op_proto == nullptr) return;
128129
for (auto& output : op_proto->outputs()) {
129130
if (output.duplicable()) { // If outputs is duplicable, do not set
130131
// default output

python/paddle/v2/framework/op.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ def get_all_op_protos():
99
Get all registered op proto from Paddle C++
1010
:return: list of OpProto
1111
"""
12+
global g_all_op_protos
1213
protostrs = core.get_all_op_protos()
1314
if g_all_op_protos is None:
14-
global g_all_op_protos
1515
g_all_op_protos = dict()
1616
for pbstr in protostrs:
1717
op_proto = framework_pb2.OpProto.FromString(str(pbstr))

0 commit comments

Comments
 (0)