Commit f244fb0 1 parent 42d669f commit f244fb0 Copy full SHA for f244fb0
File tree 1 file changed +4
-0
lines changed
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -658,12 +658,16 @@ bool Constant::has_evaluate() const {
658
658
}
659
659
660
660
bool Constant::evaluate_lower (TensorVector& outputs) const {
661
+ if (!outputs.empty () && outputs[0 ].get_element_type () != m_element_type)
662
+ return evaluate (outputs, {}); // for TypeRelaxed<Constant>
661
663
outputs.resize (1 );
662
664
outputs[0 ] = get_tensor_view ();
663
665
return get_data_ptr () != nullptr ;
664
666
}
665
667
666
668
bool Constant::evaluate_upper (TensorVector& outputs) const {
669
+ if (!outputs.empty () && outputs[0 ].get_element_type () != m_element_type)
670
+ return evaluate (outputs, {}); // for TypeRelaxed<Constant>
667
671
outputs.resize (1 );
668
672
outputs[0 ] = get_tensor_view ();
669
673
return get_data_ptr () != nullptr ;
You can’t perform that action at this time.
0 commit comments