tensorflow/core/tpu/tpu_embedding_configuration_proto_rewrite.cc
// Populates default values for batch_size_per_tensor_core and
// TableDescriptor.num_features when they have not been filled in by the user.
// The batch_size_per_tensor_core is computed as the GCD of the batch sizes of
// all input features.
Populates default values for batch_size_per_tensor_core and
TableDescriptor.num_features when they have not been filled in by the user.
The batch_size_per_tensor_core is computed as the GCD of the batch sizes of
all input features.
Populates default values for batch_size_per_tensor_core and TableDescriptor . num_features when they have not been filled in by the user . The batch_size_per_tensor_core is computed as the GCD of the batch sizes of all input features .
void PopulateBatchSizeAndFeatureCounts(tpu::TPUEmbeddingConfiguration* config) {
  const std::vector<int> input_feature_batch_sizes =
      ComputeInputFeatureBatchSizes(*config);
  const int batch_size_per_tensor_core =
      ComputeBatchSizePerTensorCore(input_feature_batch_sizes);
  const std::vector<int> tpu_feature_counts = ComputeTpuFeatureCounts(
      *config, input_feature_batch_sizes, batch_size_per_tensor_core);
  config->set_batch_size_per_tensor_core(batch_size_per_tensor_core);
  for (int table_id = 0; table_id < config->table_descriptor_size();
       ++table_id) {
    auto* table_config = config->mutable_table_descriptor(table_id);
    table_config->set_num_features(tpu_feature_counts[table_id]);
  }  
}
void PopulateBatchSizeAndFeatureCounts ( tpu :: TPUEmbeddingConfiguration * config ) { const std :: vector < int > input_feature_batch_sizes = ComputeInputFeatureBatchSizes ( * config ) ; const int batch_size_per_tensor_core = ComputeBatchSizePerTensorCore ( input_feature_batch_sizes ) ; const std :: vector < int > tpu_feature_counts = ComputeTpuFeatureCounts ( * config , input_feature_batch_sizes , batch_size_per_tensor_core ) ; config -> set_batch_size_per_tensor_core ( batch_size_per_tensor_core ) ; for ( int table_id = 0 ; table_id < config -> table_descriptor_size ( ) ; ++ table_id ) { auto * table_config = config -> mutable_table_descriptor ( table_id ) ; table_config -> set_num_features ( tpu_feature_counts [ table_id ] ) ; } }
Populates default values for batch_size_per_tensor_core and
TableDescriptor.num_features when they have not been filled in by the user.
Populates default values for batch_size_per_tensor_core and TableDescriptor . num_features when they have not been filled in by the user .
// table_id