Commit cb2828a8 authored by Derek Murray's avatar Derek Murray Committed by TensorFlower Gardener
Browse files

Check that the type of an implicitly dereferenced tensor matches the expected input type.

The dtype of a tensor reference can change between the point when it is "produced" by an
operation and consumed by the next operation. This evades checks in the executor that the
type of tensor on each edge matches the type signatures of the producing and consuming operation, which could lead to undefined behavior. Although there is no existing operation that changes the type of a tensor reference, it is possible to use the OpKernelContext API to do so, so we add a further check in the runtime to defend against operations that might be added in the future.

PiperOrigin-RevId: 184356242
parent 3ddf1d69
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment