Skip to content

Commit ba58b91

Browse files
dpa3 fix
1 parent 1f6403d commit ba58b91

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

paddle/fluid/framework/new_executor/instruction/control_flow/yield_instruction.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ YieldInstruction::YieldInstruction(size_t id,
3838
continue;
3939
}
4040
auto in = op->operand_source(i);
41-
if (in && in.type()) {
41+
if (in) {
4242
inputs.emplace(in, GetValueIds(in, *value_exe_info));
4343
input_vars_.push_back(value_exe_info->GetVarByValue(in));
4444
}

python/paddle/autograd/ir_backward.py

+1
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,7 @@ def make_output_with_output_grad(op):
433433
if (
434434
value not in state.value_to_valuegrad
435435
or state.value_to_valuegrad[value] == []
436+
or state.value_to_valuegrad[value][0][0] is None
436437
):
437438
if not value.use_empty() and get_split_op(value) is not None:
438439
# pattern case:

0 commit comments

Comments
 (0)