Skip to content

Commit 7dd036f

Browse files
committed
Skip Constant data copy during partial value propagation
1 parent 3e7eeb6 commit 7dd036f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/core/src/op/constant.cpp

+7-2
Original file line numberDiff line numberDiff line change
@@ -658,10 +658,15 @@ bool Constant::has_evaluate() const {
658658
}
659659

660660
bool Constant::evaluate_lower(TensorVector& outputs) const {
661-
return evaluate(outputs, {});
661+
outputs.resize(1);
662+
outputs[0] = get_tensor_view();
663+
return get_data_ptr();
662664
}
665+
663666
bool Constant::evaluate_upper(TensorVector& outputs) const {
664-
return evaluate(outputs, {});
667+
outputs.resize(1);
668+
outputs[0] = get_tensor_view();
669+
return get_data_ptr();
665670
}
666671

667672
bool Constant::can_constant_fold(const OutputVector& input_values) const {

0 commit comments

Comments
 (0)