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
Loading
Please sign in to comment