Home
last modified time | relevance | path

Searched refs:shard_index (Results 1 – 25 of 34) sorted by relevance

12

/external/tensorflow/tensorflow/python/distribute/
Dparameter_server_strategy_v2.py622 def init_shard_fn(shard_index): argument
625 logging.WARN, _INEFFICIENT_INIT_WARNING % name, shard_index == 0 and
627 return initial_value[offsets[shard_index]:offsets[shard_index + 1]]
628 partition_shape = (offsets[shard_index + 1] -
629 offsets[shard_index],) + shape[1:]
630 partition_offset = (offsets[shard_index],) + (0,) * len(shape[1:])
652 shard_index == 0 and
654 return value[offsets[shard_index]:offsets[shard_index + 1]]
/external/tensorflow/tensorflow/core/kernels/data/experimental/
Dio_ops.cc111 int64 shard_index = -1; in WriteData() local
113 &iter_ctx, instantiated_captured_func.get(), element, &shard_index)); in WriteData()
116 if (writers.count(shard_index) == 0) { in WriteData()
118 snapshot_util::ShardDirectory(run_dir, shard_index); in WriteData()
120 ctx->env(), shard_index, snapshot_shard_directory, in WriteData()
126 writers.insert({shard_index, std::move(writer_thread)}); in WriteData()
128 writers[shard_index]->Write(element); in WriteData()
144 int64* shard_index) { in GetShardIndex() argument
146 *shard_index = (*shard_index + 1) % port::NumSchedulableCPUs(); in GetShardIndex()
157 *shard_index = output_tensors[0].flat<int64>()(0); in GetShardIndex()
Dio_ops.h50 const std::vector<Tensor>& element, int64* shard_index);
Dsnapshot_dataset_op.cc258 int64* shard_index) TF_EXCLUSIVE_LOCKS_REQUIRED(mu_);
683 int64* shard_index) { in GetShardIndex() argument
696 *shard_index = output_tensors[0].flat<int64>()(0); in GetShardIndex()
748 int64 shard_index = 0; in GetNextInternal() local
749 TF_RETURN_IF_ERROR(GetShardIndex(ctx, *out_tensors, &shard_index)); in GetNextInternal()
752 if (writers_.count(shard_index) == 0) { in GetNextInternal()
754 snapshot_util::ShardDirectory(run_dir_, shard_index); in GetNextInternal()
756 ctx->env(), shard_index, snapshot_shard_directory, in GetNextInternal()
765 writers_.insert({shard_index, std::move(writer)}); in GetNextInternal()
767 current_writer = writers_[shard_index].get(); in GetNextInternal()
/external/tensorflow/tensorflow/python/tpu/
Dtpu_sharding.py192 def get_sharded_shape(self, shape, shard_index=None): argument
219 if shard_index is not None:
220 if shard_index < 0 or shard_index >= self.number_of_shards:
222 (shard_index, self._number_of_shards))
Dtpu_sharding_test.py100 _ = p.get_sharded_shape([4, 9], shard_index=4)
102 _ = p.get_sharded_shape([4, 9], shard_index=-1)
108 _ = p.get_sharded_shape([4, 10], shard_index=-1)
/external/tensorflow/tensorflow/core/kernels/data/
Dsplit_utils.cc61 int64 num_shards, int64 shard_index, in ShardingSplitProvider() argument
64 shard_index_(shard_index), in ShardingSplitProvider()
Dsplit_utils.h46 ShardingSplitProvider(int64 num_shards, int64 shard_index,
/external/rust/crates/crossbeam-utils/src/sync/
Dsharded_lock.rs228 let shard_index = current_index & (self.shards.len() - 1); in try_read() localVariable
230 match self.shards[shard_index].lock.try_read() { in try_read()
288 let shard_index = current_index & (self.shards.len() - 1); in read() localVariable
290 match self.shards[shard_index].lock.read() { in read()
/external/autotest/server/cros/ap_configurators/
Dpyauto_utils.py170 def Shard(ilist, shard_index, num_shards): argument
179 chunk_start = shard_index * chunk_size
180 if shard_index == num_shards - 1: # Exhaust the remainder in the last shard.
/external/tensorflow/tensorflow/core/kernels/
Dtopk_op_gpu.h323 int shard_index = max_element.index;
324 top_k_indices[rank] = entries[shard_index].index;
325 int next_shard_index = shard_index + num_shards;
335 int shard_index = max_element.index;
336 top_k_indices[last_k] = entries[shard_index].index;
/external/angle/src/tests/restricted_traces/
Drestricted_trace_gold_tests.py412 def _shard_tests(tests, shard_count, shard_index): argument
413 return [tests[index] for index in range(shard_index, len(tests), shard_count)]
456 args.shard_index = int(env.pop('GTEST_SHARD_INDEX'))
488 sharded_tests = _shard_tests(tests['traces'], args.shard_count, args.shard_index)
/external/googletest/googletest/test/
Dgoogletest-filter-unittest.py220 def RunWithSharding(total_shards, shard_index, command): argument
223 extra_env = {SHARD_INDEX_ENV_VAR: str(shard_index),
Dgtest_unittest.cc1961 for (int shard_index = 0; shard_index < num_shards; shard_index++) { in TEST() local
1962 if (ShouldRunTestOnShard(num_shards, shard_index, test_id)) { in TEST()
1964 prev_selected_shard_index = shard_index; in TEST()
1967 << shard_index << " are both selected to run test " << test_id; in TEST()
1975 for (int shard_index = 0; shard_index < num_shards; shard_index++) { in TEST() local
1979 ShouldRunTestOnShard(num_shards, shard_index, test_id); in TEST()
/external/llvm/utils/unittest/googletest/src/
Dgtest.cc2702 const Int32 shard_index = Int32FromEnvOrDie(kTestShardIndex, -1); in OnTestIterationStart() local
2705 static_cast<int>(shard_index) + 1, in OnTestIterationStart()
4281 const Int32 shard_index = Int32FromEnvOrDie(shard_index_env, -1); in ShouldShard() local
4283 if (total_shards == -1 && shard_index == -1) { in ShouldShard()
4285 } else if (total_shards == -1 && shard_index != -1) { in ShouldShard()
4288 << kTestShardIndex << " = " << shard_index in ShouldShard()
4293 } else if (total_shards != -1 && shard_index == -1) { in ShouldShard()
4301 } else if (shard_index < 0 || shard_index >= total_shards) { in ShouldShard()
4305 << ", but you have " << kTestShardIndex << "=" << shard_index in ShouldShard()
4336 bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_id) { in ShouldRunTestOnShard() argument
[all …]
/external/llvm-project/llvm/utils/unittest/googletest/src/
Dgtest.cc3071 const Int32 shard_index = Int32FromEnvOrDie(kTestShardIndex, -1); in OnTestIterationStart() local
3074 static_cast<int>(shard_index) + 1, in OnTestIterationStart()
4723 const Int32 shard_index = Int32FromEnvOrDie(shard_index_env, -1); in ShouldShard() local
4725 if (total_shards == -1 && shard_index == -1) { in ShouldShard()
4727 } else if (total_shards == -1 && shard_index != -1) { in ShouldShard()
4730 << kTestShardIndex << " = " << shard_index in ShouldShard()
4735 } else if (total_shards != -1 && shard_index == -1) { in ShouldShard()
4743 } else if (shard_index < 0 || shard_index >= total_shards) { in ShouldShard()
4747 << ", but you have " << kTestShardIndex << "=" << shard_index in ShouldShard()
4778 bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_id) { in ShouldRunTestOnShard() argument
[all …]
/external/libvpx/libvpx/third_party/googletest/src/src/
Dgtest.cc3140 const Int32 shard_index = Int32FromEnvOrDie(kTestShardIndex, -1); in OnTestIterationStart() local
3143 static_cast<int>(shard_index) + 1, in OnTestIterationStart()
5265 const Int32 shard_index = Int32FromEnvOrDie(shard_index_env, -1); in ShouldShard() local
5267 if (total_shards == -1 && shard_index == -1) { in ShouldShard()
5269 } else if (total_shards == -1 && shard_index != -1) { in ShouldShard()
5272 << kTestShardIndex << " = " << shard_index in ShouldShard()
5277 } else if (total_shards != -1 && shard_index == -1) { in ShouldShard()
5285 } else if (shard_index < 0 || shard_index >= total_shards) { in ShouldShard()
5289 << ", but you have " << kTestShardIndex << "=" << shard_index in ShouldShard()
5320 bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_id) { in ShouldRunTestOnShard() argument
[all …]
/external/libaom/libaom/test/
Dtest.cmake419 foreach(shard_index RANGE ${max_shard_index})
420 set(test_name "test_${shard_index}")
423 -DGTEST_SHARD_INDEX=${shard_index}
/external/rust/crates/quiche/deps/boringssl/src/third_party/googletest/src/
Dgtest.cc3147 const Int32 shard_index = Int32FromEnvOrDie(kTestShardIndex, -1); in OnTestIterationStart() local
3150 static_cast<int>(shard_index) + 1, in OnTestIterationStart()
5364 const Int32 shard_index = Int32FromEnvOrDie(shard_index_env, -1); in ShouldShard() local
5366 if (total_shards == -1 && shard_index == -1) { in ShouldShard()
5368 } else if (total_shards == -1 && shard_index != -1) { in ShouldShard()
5371 << kTestShardIndex << " = " << shard_index in ShouldShard()
5376 } else if (total_shards != -1 && shard_index == -1) { in ShouldShard()
5384 } else if (shard_index < 0 || shard_index >= total_shards) { in ShouldShard()
5388 << ", but you have " << kTestShardIndex << "=" << shard_index in ShouldShard()
5419 bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_id) { in ShouldRunTestOnShard() argument
[all …]
/external/mesa3d/src/gtest/src/
Dgtest.cc3156 const Int32 shard_index = Int32FromEnvOrDie(kTestShardIndex, -1); in OnTestIterationStart() local
3159 static_cast<int>(shard_index) + 1, in OnTestIterationStart()
5426 const Int32 shard_index = Int32FromEnvOrDie(shard_index_env, -1); in ShouldShard() local
5428 if (total_shards == -1 && shard_index == -1) { in ShouldShard()
5430 } else if (total_shards == -1 && shard_index != -1) { in ShouldShard()
5433 << kTestShardIndex << " = " << shard_index in ShouldShard()
5438 } else if (total_shards != -1 && shard_index == -1) { in ShouldShard()
5446 } else if (shard_index < 0 || shard_index >= total_shards) { in ShouldShard()
5450 << ", but you have " << kTestShardIndex << "=" << shard_index in ShouldShard()
5481 bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_id) { in ShouldRunTestOnShard() argument
[all …]
/external/googletest/googletest/src/
Dgtest.cc3403 const int32_t shard_index = Int32FromEnvOrDie(kTestShardIndex, -1); in OnTestIterationStart() local
3405 static_cast<int>(shard_index) + 1, in OnTestIterationStart()
5958 const int32_t shard_index = Int32FromEnvOrDie(shard_index_env, -1); in ShouldShard() local
5960 if (total_shards == -1 && shard_index == -1) { in ShouldShard()
5962 } else if (total_shards == -1 && shard_index != -1) { in ShouldShard()
5965 << kTestShardIndex << " = " << shard_index in ShouldShard()
5970 } else if (total_shards != -1 && shard_index == -1) { in ShouldShard()
5978 } else if (shard_index < 0 || shard_index >= total_shards) { in ShouldShard()
5982 << ", but you have " << kTestShardIndex << "=" << shard_index in ShouldShard()
6013 bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_id) { in ShouldRunTestOnShard() argument
[all …]
/external/libaom/libaom/third_party/googletest/src/googletest/src/
Dgtest.cc3228 const int32_t shard_index = Int32FromEnvOrDie(kTestShardIndex, -1); in OnTestIterationStart() local
3230 static_cast<int>(shard_index) + 1, in OnTestIterationStart()
5467 const int32_t shard_index = Int32FromEnvOrDie(shard_index_env, -1); in ShouldShard() local
5469 if (total_shards == -1 && shard_index == -1) { in ShouldShard()
5471 } else if (total_shards == -1 && shard_index != -1) { in ShouldShard()
5473 << kTestShardIndex << " = " << shard_index in ShouldShard()
5479 } else if (total_shards != -1 && shard_index == -1) { in ShouldShard()
5487 } else if (shard_index < 0 || shard_index >= total_shards) { in ShouldShard()
5491 << ", but you have " << kTestShardIndex << "=" << shard_index in ShouldShard()
5522 bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_id) { in ShouldRunTestOnShard() argument
[all …]
/external/fmtlib/test/
Dgmock-gtest-all.cc685 GTEST_API_ bool ShouldRunTestOnShard(int total_shards, int shard_index,
4099 const Int32 shard_index = Int32FromEnvOrDie(kTestShardIndex, -1); in OnTestIterationStart() local
4101 static_cast<int>(shard_index) + 1, in OnTestIterationStart()
5722 const Int32 shard_index = Int32FromEnvOrDie(shard_index_env, -1); in ShouldShard() local
5724 if (total_shards == -1 && shard_index == -1) { in ShouldShard()
5726 } else if (total_shards == -1 && shard_index != -1) { in ShouldShard()
5728 << kTestShardIndex << " = " << shard_index in ShouldShard()
5734 } else if (total_shards != -1 && shard_index == -1) { in ShouldShard()
5742 } else if (shard_index < 0 || shard_index >= total_shards) { in ShouldShard()
5746 << ", but you have " << kTestShardIndex << "=" << shard_index in ShouldShard()
[all …]
/external/rust/crates/grpcio-sys/grpc/third_party/cares/cares/test/gmock-1.8.0/
Dgmock-gtest-all.cc683 int total_shards, int shard_index, int test_id);
4519 const Int32 shard_index = Int32FromEnvOrDie(kTestShardIndex, -1); in OnTestIterationStart() local
4522 static_cast<int>(shard_index) + 1, in OnTestIterationStart()
6171 const Int32 shard_index = Int32FromEnvOrDie(shard_index_env, -1); in ShouldShard() local
6173 if (total_shards == -1 && shard_index == -1) { in ShouldShard()
6175 } else if (total_shards == -1 && shard_index != -1) { in ShouldShard()
6178 << kTestShardIndex << " = " << shard_index in ShouldShard()
6183 } else if (total_shards != -1 && shard_index == -1) { in ShouldShard()
6191 } else if (shard_index < 0 || shard_index >= total_shards) { in ShouldShard()
6195 << ", but you have " << kTestShardIndex << "=" << shard_index in ShouldShard()
[all …]
/external/rust/crates/quiche/deps/boringssl/src/third_party/googletest/test/
Dgtest_unittest.cc1952 for (int shard_index = 0; shard_index < num_shards; shard_index++) { in TEST() local
1953 if (ShouldRunTestOnShard(num_shards, shard_index, test_id)) { in TEST()
1955 prev_selected_shard_index = shard_index; in TEST()
1958 << shard_index << " are both selected to run test " << test_id; in TEST()
1966 for (int shard_index = 0; shard_index < num_shards; shard_index++) { in TEST() local
1970 ShouldRunTestOnShard(num_shards, shard_index, test_id); in TEST()

12