Commit 6c4d8aa5 authored by Doe Hyun Yoon's avatar Doe Hyun Yoon Committed by TensorFlower Gardener
Browse files

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
parent 8871d29c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment