r2.12 cherry-pick: c7c3dbe"Prevent integer overflow in tensor byte size computation".
Prevent integer overflow in tensor byte size computation. https://github.com/tensorflow/tensorflow/commit/c7c3dbe1ca35cbffe0749181734131875863cd82.