Static shape inference sometimes need values, in addition to shapes, for
some ops. Though there're many supplemental logic to infer output values, but it's still not complete. This CL adds a fallback mechanism: If we know all the input values, but output values are not inferred, we evaluate the node (i.e., execute single node) to infer the output values. Currently, it's for only white listed ops (mostly simple arithmetic ops, and StridedSlice) and small tensors (# elements < 17). Also, to be conservative, it's used only if aggressive_shape_inference option is enabled in InferStatically(). It's off by default, and currently no one calls InferStatically() with that option; it'll be enabled in analytical_cost_estimator later. PiperOrigin-RevId: 226031429
Loading
Please sign in to comment