Skip to content

Commit

Permalink
return optional in outputcharacteristic
Browse files Browse the repository at this point in the history
  • Loading branch information
rachguo authored and rachguo committed Oct 26, 2023
1 parent 06d0ff3 commit 04ff3ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyop/pykernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ struct PyCustomOpFactory : public OrtCustomOp {
};

OrtCustomOp::GetOutputCharacteristic = [](const OrtCustomOp* this_, size_t index) noexcept {
return OrtCustomOpInputOutputCharacteristic::INPUT_OUTPUT_REQUIRED;
return index == 0 ? OrtCustomOpInputOutputCharacteristic::INPUT_OUTPUT_REQUIRED
: OrtCustomOpInputOutputCharacteristic::INPUT_OUTPUT_OPTIONAL;
};
}

Expand Down

0 comments on commit 04ff3ec

Please sign in to comment.