Fix the condition in ShouldUpdateOutputValue() in static shape inference.
When using aggressive_shape_inference, running EvaluateNode() takes too much resources (compute and memory) if input and output tensors are large. Previously, set 17 as threshold for small / large tensors, but the condition check logic was incorrect. This CL fixes that and avoid costly EvaluateNode() in case output tensor are huge (e.g., Fill op that takes a shape describing large tensors). PiperOrigin-RevId: 232493327
Loading
Please sign in to comment