Reduce maximum constant size from 10MB to 100Kb.

This reduces the chance of blowing through proto limits on multi-pod graphs, where we can end up with 100s of host subgraphs. We've seen an increase in large graphs triggering protobuf limits as users train half and full pod models. The original value seems to have been chosen as a conservative limit.

PiperOrigin-RevId: 350265185
Change-Id: I671532a2cf52776722dc0a0ec4b76c4ce275424a
This commit is contained in:
Russell Power 2021-01-05 19:08:54 -08:00 committed by TensorFlower Gardener
parent 173603e851
commit 60ba158560

View File

@ -59,8 +59,8 @@ namespace tensorflow {
namespace grappler { namespace grappler {
using TensorVector = gtl::InlinedVector<TensorValue, 4>; using TensorVector = gtl::InlinedVector<TensorValue, 4>;
// We only fold/materialize constants smaller than 10 MiB. // We only fold/materialize constants smaller than 100kB.
const int64 kMaxConstantSize = 10 * 1024 * 1024; const int64 kMaxConstantSize = 100 * 1024;
namespace { namespace {
template <typename T> template <typename T>