Home
last modified time | relevance | path

Searched refs:num_shards (Results 1 – 25 of 177) sorted by relevance

12345678

/external/tensorflow/tensorflow/python/kernel_tests/
Dembedding_ops_test.py140 def _EmbeddingParams(num_shards, argument
150 for i in range(num_shards):
151 shard_shape = [vocab_size // num_shards] + shape
152 if i < vocab_size % num_shards: # Excess goes evenly on the first shards
170 def _EmbeddingParamsAsPartitionedVariable(num_shards, argument
176 num_shards, vocab_size, dtype=dtype, shape=shape)
183 max_partitions=num_shards, min_slice_size=1),
190 num_shards, argument
209 val = np.copy(params[_PName(i % num_shards) + ":0"][
210 i // num_shards, :]) * weight_value
[all …]
/external/tensorflow/tensorflow/python/tpu/
Dtpu_optimizer.py72 def _verify_and_get_subgroup_size(self, group_assignment, num_shards): argument
98 if set(range(num_shards)) != replica_ids:
101 num_shards, group_assignment))
144 num_shards = tpu_function.get_tpu_context().number_of_shards
145 if num_shards is None:
149 num_shards = 1
152 num_shards)
154 if num_shards > 1 and self._reduction == losses.Reduction.MEAN:
158 scale = 1.0 / num_shards
/external/tensorflow/tensorflow/python/data/experimental/kernel_tests/serialization/
Dshard_dataset_serialization_test.py33 def _build_dataset(self, num_elements, num_shards, index): argument
34 return dataset_ops.Dataset.range(num_elements).shard(num_shards, index)
40 elems=[10, 100], num_shards=[2, 5], index=[0, 1])))
41 def testCore(self, elems, num_shards, index): argument
42 self.run_core_tests(lambda: self._build_dataset(elems, num_shards, index),
43 elems // num_shards)
/external/tensorflow/tensorflow/core/kernels/data/
Dshard_dataset_op.cc43 Dataset(OpKernelContext* ctx, int64 num_shards, int64 index, in Dataset() argument
46 num_shards_(num_shards), in Dataset()
53 strings::Printf("%lld", static_cast<long long>(num_shards))}}) { in Dataset()
102 Node* num_shards = nullptr; in AsGraphDefInternal() local
103 TF_RETURN_IF_ERROR(b->AddScalar(num_shards_, &num_shards)); in AsGraphDefInternal()
111 b->AddDataset(this, {input_graph_node, num_shards, index}, in AsGraphDefInternal()
247 int64 num_shards = 0; in MakeDataset() local
249 OP_REQUIRES_OK(ctx, ParseScalarArgument<int64>(ctx, kNumShards, &num_shards)); in MakeDataset()
251 ctx, num_shards > 0, in MakeDataset()
254 num_shards, ").")); in MakeDataset()
[all …]
/external/tensorflow/tensorflow/core/kernels/
Dtopk_op_gpu.h271 __device__ void mergeShards(int num_shards, int k,
279 const int heap_size = k < num_shards ? k : num_shards;
293 for (int shard = heap_size; shard < num_shards; shard++) {
325 int next_shard_index = shard_index + num_shards;
382 cudaError LaunchTopKKernel(const gpuStream_t& stream, int num_shards,
392 if (num_shards <= 0) {
396 num_shards = shared_memory_size / heap_size - 1;
397 if (num_shards <= 0) {
398 num_shards = 1;
400 auto shard_size = length / num_shards;
[all …]
/external/tensorflow/tensorflow/core/util/tensor_bundle/
Dnaming.cc28 string DataFilename(StringPiece prefix, int32 shard_id, int32 num_shards) { in DataFilename() argument
29 DCHECK_GT(num_shards, 0); in DataFilename()
30 DCHECK_LT(shard_id, num_shards); in DataFilename()
33 shard_id, num_shards); in DataFilename()
/external/tensorflow/tensorflow/core/util/
Dwork_sharder_test.cc34 int64 num_shards = 0; in RunSharding() local
38 [=, &mu, &num_shards, &num_done_work, &work](int64 start, int64 limit) { in RunSharding()
43 ++num_shards; in RunSharding()
51 << num_shards; in RunSharding()
60 EXPECT_LE(num_shards, 1 + per_thread_max_parallelism); in RunSharding()
Dwork_sharder.cc67 const int num_shards = in Do() local
77 const int64 block_size = (total + num_shards - 1) / num_shards; in Do()
/external/tensorflow/tensorflow/core/ops/compat/ops_history_v1/
DLoadTPUEmbeddingStochasticGradientDescentParameters.pbtxt24 name: "num_shards"
56 name: "num_shards"
93 name: "num_shards"
DRetrieveTPUEmbeddingStochasticGradientDescentParameters.pbtxt24 name: "num_shards"
56 name: "num_shards"
93 name: "num_shards"
DLoadTPUEmbeddingAdagradParameters.pbtxt28 name: "num_shards"
64 name: "num_shards"
105 name: "num_shards"
DRetrieveTPUEmbeddingProximalAdagradParameters.pbtxt28 name: "num_shards"
64 name: "num_shards"
105 name: "num_shards"
DRetrieveTPUEmbeddingMomentumParameters.pbtxt28 name: "num_shards"
64 name: "num_shards"
105 name: "num_shards"
DRetrieveTPUEmbeddingAdagradParameters.pbtxt28 name: "num_shards"
64 name: "num_shards"
105 name: "num_shards"
DLoadTPUEmbeddingMomentumParameters.pbtxt28 name: "num_shards"
64 name: "num_shards"
105 name: "num_shards"
DLoadTPUEmbeddingProximalAdagradParameters.pbtxt28 name: "num_shards"
64 name: "num_shards"
105 name: "num_shards"
DLoadTPUEmbeddingRMSPropParameters.pbtxt32 name: "num_shards"
72 name: "num_shards"
117 name: "num_shards"
DRetrieveTPUEmbeddingRMSPropParameters.pbtxt32 name: "num_shards"
72 name: "num_shards"
117 name: "num_shards"
DLoadTPUEmbeddingAdadeltaParameters.pbtxt32 name: "num_shards"
72 name: "num_shards"
117 name: "num_shards"
DLoadTPUEmbeddingFTRLParameters.pbtxt32 name: "num_shards"
72 name: "num_shards"
117 name: "num_shards"
DLoadTPUEmbeddingMDLAdagradLightParameters.pbtxt36 name: "num_shards"
80 name: "num_shards"
129 name: "num_shards"
DLoadTPUEmbeddingAdagradParametersGradAccumDebug.pbtxt32 name: "num_shards"
72 name: "num_shards"
117 name: "num_shards"
DRetrieveTPUEmbeddingFTRLParameters.pbtxt32 name: "num_shards"
72 name: "num_shards"
117 name: "num_shards"
DLoadTPUEmbeddingCenteredRMSPropParameters.pbtxt36 name: "num_shards"
80 name: "num_shards"
129 name: "num_shards"
DRetrieveTPUEmbeddingProximalAdagradParametersGradAccumDebug.pbtxt32 name: "num_shards"
72 name: "num_shards"
117 name: "num_shards"

12345678