Home
last modified time | relevance | path

Searched refs:shard (Results 1 – 25 of 180) sorted by relevance

12345678

/third_party/grpc/src/core/lib/iomgr/
Dtimer_generic.cc252 static grpc_millis compute_min_deadline(timer_shard* shard) { in compute_min_deadline() argument
253 return grpc_timer_heap_is_empty(&shard->heap) in compute_min_deadline()
254 ? saturating_add(shard->queue_deadline_cap, 1) in compute_min_deadline()
255 : grpc_timer_heap_top(&shard->heap)->deadline; in compute_min_deadline()
278 timer_shard* shard = &g_shards[i]; in timer_list_init() local
279 gpr_mu_init(&shard->mu); in timer_list_init()
280 grpc_time_averaged_stats_init(&shard->stats, 1.0 / ADD_DEADLINE_SCALE, 0.1, in timer_list_init()
282 shard->queue_deadline_cap = g_shared_mutables.min_timer; in timer_list_init()
283 shard->shard_queue_index = i; in timer_list_init()
284 grpc_timer_heap_init(&shard->heap); in timer_list_init()
[all …]
/third_party/grpc/src/core/lib/slice/
Dslice_intern.cc71 slice_shard* shard = &g_shards[SHARD_IDX(this->hash)]; in ~InternedSliceRefcount() local
72 MutexLockForGprMu lock(&shard->mu); in ~InternedSliceRefcount()
75 for (prev_next = &shard->strs[TABLE_IDX(this->hash, shard->capacity)], in ~InternedSliceRefcount()
80 shard->count--; in ~InternedSliceRefcount()
85 static void grow_shard(slice_shard* shard) { in grow_shard() argument
88 size_t capacity = shard->capacity * 2; in grow_shard()
96 for (i = 0; i < shard->capacity; i++) { in grow_shard()
97 for (s = shard->strs[i]; s; s = next) { in grow_shard()
104 gpr_free(shard->strs); in grow_shard()
105 shard->strs = strtab; in grow_shard()
[all …]
/third_party/grpc/src/core/lib/transport/
Dmetadata.cc232 static void gc_mdtab(mdtab_shard* shard);
237 mdtab_shard* shard = &g_shards[i]; in grpc_mdctx_global_init() local
238 gpr_mu_init(&shard->mu); in grpc_mdctx_global_init()
239 shard->count = 0; in grpc_mdctx_global_init()
240 gpr_atm_no_barrier_store(&shard->free_estimate, 0); in grpc_mdctx_global_init()
241 shard->capacity = INITIAL_SHARD_CAPACITY; in grpc_mdctx_global_init()
242 shard->elems = static_cast<InternedMetadata::BucketLink*>( in grpc_mdctx_global_init()
243 gpr_zalloc(sizeof(*shard->elems) * shard->capacity)); in grpc_mdctx_global_init()
249 mdtab_shard* shard = &g_shards[i]; in grpc_mdctx_global_shutdown() local
250 gpr_mu_destroy(&shard->mu); in grpc_mdctx_global_shutdown()
[all …]
/third_party/mindspore/mindspore/parallel/nn/
Dmoe.py115 self.transpose = P.Transpose().shard(((self.dp, 1, 1),))
116 self.transpose2 = P.Transpose().shard(((self.dp, 1, 1, 1),))
117 self.transpose3 = P.Transpose().shard(((self.dp, 1, 1, 1),))
118 self.transpose4 = P.Transpose().shard(((self.dp, 1, 1),))
119 self.transpose5 = P.Transpose().shard(((self.dp, 1, 1),))
120 self.batch_mm = P.BatchMatMul().shard(((self.dp, 1, 1), (self.dp, 1, 1)))
121 self.batch_mm2 = P.BatchMatMul().shard(((self.dp, 1, 1), (self.dp, 1, 1)))
122 self.mul = P.Mul().shard(((), ()))
195 self.range = P.Range().shard(((1,),))
197 self.matmul = P.MatMul().shard(((dp, 1), (1, 1)))
[all …]
Dlayers.py243 def shard(self, strategy): member in _LayerNorm
259 self.mean.shard(strategy)
260 self.square.shard(strategy)
261 self.sqrt.shard(strategy)
262 self.sub1.shard((strategy[0], strategy[0]))
263 self.sub2.shard((strategy[0], strategy[0]))
264 self.add.shard((strategy[0], ()))
265 self.mul.shard((strategy[0], (1,)))
266 self.add2.shard((strategy[0], (1,)))
267 self.real_div.shard((strategy[0], strategy[0]))
[all …]
Dloss.py72 self.sum = P.ReduceSum().shard(((dp, mp),))
73 self.onehot = P.OneHot().shard(((dp, mp), (), ()))
77 self.max = P.ArgMaxWithValue(axis=-1, keep_dims=True).shard(
80 self.sub = P.Sub().shard(((dp, mp), (dp, 1)))
81 self.exp = P.Exp().shard(((dp, mp),))
82 self.div = P.RealDiv().shard(((dp, mp), (dp, 1)))
83 self.log = P.Log().shard(((dp, mp),))
84 self.add = P.Add().shard(((dp, mp), ()))
85 self.mul = P.Mul().shard(
87 self.neg = P.Neg().shard(((dp, mp),))
[all …]
Dtransformer.py351 self.mapping.shard(strategy_matmul=((ep, 1, 1), (ep, 1, mp)),
355 self.mapping.shard(strategy_matmul=((dp, 1), (1, mp)),
365 self.projection.shard(strategy_matmul=((ep, 1, mp), (ep, mp, 1)),
368 self.projection.shard(strategy_matmul=((dp, mp), (mp, 1)),
372 self.dropout.dropout.shard(((dp, 1),))
374 self.dropout_3d.dropout.shard(((dp, 1, 1),))
437 self.not_equal = P.NotEqual().shard(((parallel_config.data_parallel, 1), ()))
439 self.mul = P.BatchMatMul().shard(
441 self.expand_dim = P.ExpandDims().shard(((1, 1),))
445 self.multiply = P.Mul().shard(((parallel_config.data_parallel, 1, 1), (1, 1, 1)))
[all …]
/third_party/mindspore/tests/ut/python/parallel/
Dtest_hybird_parallel_activation.py60 self.matmul1 = P.MatMul().shard(strategy1)
61 self.matmul2 = P.MatMul().shard(strategy2)
62 self.tanh = P.Tanh().shard(strategy3)
86 self.matmul1 = P.MatMul().shard(strategy1)
87 self.matmul2 = P.MatMul().shard(strategy2)
88 self.activation = P.ReLU().shard(strategy3)
112 self.matmul1 = P.MatMul().shard(strategy1)
113 self.matmul2 = P.MatMul().shard(strategy2)
114 self.softmax = P.Softmax().shard(strategy3)
138 self.matmul1 = P.MatMul().shard(strategy1)
[all …]
Dtest_element_wise_function.py60 self.matmul = P.MatMul().shard(strategy1)
61 self.pow = P.Pow().shard(strategy2)
62 self.matmul2 = P.MatMul().shard(strategy1)
86 self.matmul = P.MatMul().shard(strategy1)
87 self.exp = P.Exp().shard(strategy2)
88 self.matmul2 = P.MatMul().shard(strategy1)
112 self.matmul = P.MatMul().shard(strategy1)
113 self.log = P.Log().shard(strategy2)
114 self.matmul2 = P.MatMul().shard(strategy1)
137 self.matmul = P.MatMul().shard(strategy1)
[all …]
Dtest_one_hot_net.py88 self.cast.shard(strategy=strategy.twod_strategy)
90 self.cast1.shard(strategy=strategy.twod_strategy)
92 self.cast2.shard(strategy=strategy.twod_strategy)
94 self.cast3.shard(strategy=strategy.scalar_strategy)
96 self.cast4.shard(strategy=strategy.scalar_strategy)
105 self.onehot.shard(strategy=strategy.onehot_strategy)
107 self.exp.shard(strategy=strategy.twod_strategy)
109 self.exp2.shard(strategy=strategy.twod_strategy)
111 self.exp3.shard(strategy=strategy.twod_strategy)
113 self.mul_const.shard(strategy=strategy.scalar_twod_strategy)
[all …]
Dtest_reduce_method_info.py87 self.mul1 = P.Mul().shard(strategy1)
88 self.reduce_sum = P.ReduceSum(keep_dims=False).shard(strategy2)
89 self.mul2 = P.Mul().shard(strategy3)
114 self.mul1 = P.Mul().shard(strategy1)
115 self.reduce_sum = P.ReduceSum(keep_dims=False).shard(strategy2)
116 self.mul2 = P.Mul().shard(strategy3)
141 self.mul1 = P.Mul().shard(strategy1)
142 self.reduce_sum = P.ReduceSum(keep_dims=False).shard(strategy2)
143 self.mul2 = P.Mul().shard(strategy3)
168 self.mul1 = P.Mul().shard(strategy1)
[all …]
Dtest_comparison_function_info.py60 self.matmul = P.MatMul().shard(strategy1)
61 self.equal = P.Equal().shard(strategy2)
83 self.matmul = P.MatMul().shard(strategy1)
84 self.notequal = P.NotEqual().shard(strategy2)
106 self.matmul = P.MatMul().shard(strategy1)
107 self.approximateEqual = P.ApproximateEqual(tolerance=0.5).shard(strategy2)
130 self.matmul = P.MatMul().shard(strategy1)
131 self.greater = P.Greater().shard(strategy2)
154 self.matmul = P.MatMul().shard(strategy1)
155 self.greaterEqual = P.GreaterEqual().shard(strategy2)
[all …]
Dtest_arithmetic.py59 self.matmul = P.MatMul().shard(strategy1)
60 self.sub = P.Sub().shard(strategy2)
83 self.matmul = P.MatMul().shard(strategy1)
84 self.add = P.Add().shard(strategy2)
107 self.matmul = P.MatMul().shard(strategy1)
108 self.mul = P.Mul().shard(strategy2)
130 self.matmul = P.MatMul().shard(strategy1)
131 self.mod = P.Mod().shard(strategy2)
153 self.matmul = P.MatMul().shard(strategy1)
154 self.floormod = P.FloorMod().shard(strategy2)
[all …]
Dtest_operator_model_parallel.py54 shard=None): argument
72 self.matmul = P.MatMul(transpose_b=True).shard(matmul_strategy)
73 self.bias_add = P.Add().shard(shard)
111 conv.conv2d.shard(strategy_weight)
122 conv.conv2d.shard(strategy_weight)
133 conv.conv2d.shard(strategy_weight)
155 bn.bn_train.shard(strategy_bn)
167 bn.bn_train.shard(strategy_bn)
178 matmul_strategy=strategy_fc_weight_nobias, shard=strategy_tensor_add)
200 self.relu1 = P.ReLU().shard(strategy_no_weight)
[all …]
Dtest_dsd_matmul.py46 def __init__(self, batch_size, num_heads, dp, mp, shard=True): argument
66 if shard:
67 … self.dsd_matmul.shard(((dp, mp, 1, 1, 1, 1, 1), (dp, mp, 1, 1, 1, 1, 1), (dp, mp, 1, 1)))
68 self.dense1.matmul.shard(((dp, 1), (mp, 1)))
69 self.dense2.matmul.shard(((dp, 1), (mp, 1)))
70 self.dense2.matmul.shard(((dp, 1), (mp, 1)))
71 self.transpose.shard(((dp, 1, mp, 1),))
72 self.transpose1.shard(((dp, mp, 1, 1, 1, 1),))
118 def compile_graph(batch_size, num_heads, dp, mp, auto=False, shard=True): argument
124 net = GradWrap(NetWithLoss(Net(batch_size, num_heads, dp, mp, shard=shard)))
[all …]
Dtest_cus_matmul_dds.py41 def __init__(self, batch_size, num_heads, dp, mp, shard=True): argument
61 if shard:
62 self.cus_matmul.shard(((mp, dp, 1, 1), (mp, dp, 1, 1), (1, dp, 1, 1), (dp, 1, 1, 1)))
63 self.dense1.matmul.shard(((dp, 1), (mp, 1)))
64 self.dense2.matmul.shard(((dp, 1), (mp, 1)))
65 self.transpose.shard(((dp, 1, mp, 1),))
102 def compile_graph(batch_size, num_heads, dp, mp, auto=False, shard=True): argument
108 net = GradWrap(NetWithLoss(Net(batch_size, num_heads, dp, mp, shard=shard)))
169 compile_graph(batch_size, num_heads, dp, mp, auto=True, shard=False)
178 compile_graph(batch_size, num_heads, dp, mp, auto=True, shard=False)
[all …]
Dtest_matmul_tensor.py63 self.matmul1 = P.MatMul().shard(strategy1)
64 self.matmul2 = P.MatMul().shard(strategy2)
65 self.matmul3 = P.MatMul().shard(strategy3)
93 self.matmul = P.MatMul().shard(strategy1)
94 self.mul = P.Mul().shard(strategy2)
117 self.matmul1 = P.MatMul().shard(strategy1)
118 self.matmul2 = P.MatMul().shard(strategy2)
119 self.matmul3 = P.MatMul().shard(strategy3)
147 self.matmul = P.MatMul().shard(strategy1)
148 self.add = P.Add().shard(strategy2)
Dtest_two_matmul.py61 self.matmul1 = P.MatMul().shard(strategy1)
62 self.matmul2 = P.MatMul().shard(strategy2)
86 self.matmul1 = P.MatMul().shard(strategy1)
87 self.matmul2 = P.MatMul().shard(strategy2)
110 self.matmul1 = P.MatMul().shard(strategy1)
111 self.matmul2 = P.MatMul().shard(strategy2)
134 self.matmul = P.MatMul().shard(strategy1)
136 self.mul = P.Mul().shard(strategy2)
158 self.matmul = P.MatMul(transpose_b=True).shard(strategy1)
160 self.mul = P.Mul().shard(strategy2)
Dtest_reshape_unexpand.py55 self.mul = P.Mul().shard(((1, 8), (1, 1, 8)))
78 self.mul = P.Mul().shard(((1, 1, 8), (1, 8)))
101 self.mul = P.Mul().shard(((1, 4, 2), (4, 2)))
124 self.relu1 = P.ReLU().shard(((4, 1),))
125 self.relu2 = P.ReLU().shard(((1, 4),))
148 self.relu1 = P.ReLU().shard(((4, 1),))
149 self.relu2 = P.ReLU().shard(((1, 2, 2),))
172 self.relu1 = P.ReLU().shard(((2, 2, 1),))
173 self.relu2 = P.ReLU().shard(((1, 4),))
196 self.relu1 = P.ReLU().shard(((2, 1),))
[all …]
Dtest_loss_and_optimizer.py30 self.loss = P.SoftmaxCrossEntropyWithLogits().shard(strategy3)
49 self.matmul = P.MatMul(transpose_a=False, transpose_b=True).shard(strategy1)
50 self.relu = P.ReLU().shard(strategy2)
83 self.matmul = P.MatMul(transpose_a=False, transpose_b=True).shard(strategy1)
84 self.relu = P.ReLU().shard(strategy2)
117 self.matmul = P.MatMul(transpose_a=False, transpose_b=True).shard(strategy1)
118 self.relu = P.ReLU().shard(strategy2)
152 self.matmul = P.MatMul(transpose_a=False, transpose_b=True).shard(strategy1)
153 self.relu = P.ReLU().shard(strategy2)
188 self.matmul = P.MatMul(transpose_a=False, transpose_b=True).shard(strategy1)
[all …]
Dtest_strategy_checkpoint.py54 self.matmul1 = P.MatMul().shard(strategy1)
55 self.matmul2 = P.MatMul().shard(strategy2)
56 self.matmul3 = P.MatMul().shard(strategy3)
57 self.matmul4 = P.MatMul().shard(strategy4)
58 self.matmul5 = P.MatMul().shard(strategy5)
59 self.matmul6 = P.MatMul().shard(strategy6)
118 self.matmul1 = P.MatMul().shard(strategy1)
119 self.matmul3 = P.MatMul().shard(strategy3)
120 self.matmul4 = P.MatMul().shard(strategy4)
121 self.matmul5 = P.MatMul().shard(strategy5)
[all …]
Dtest_split.py28 self.split = P.Split(axis, out_nums).shard(strategy1)
29 self.mul = P.Mul().shard(strategy2)
30 self.matmul = P.MatMul(transpose_b=True).shard(strategy2)
31 self.matmul2 = P.MatMul().shard(strategy3)
45 self.split = P.Split(axis, out_nums).shard(strategy1)
46 self.mul = P.Mul().shard(strategy2)
59 self.split = P.Split(axis, out_nums).shard(strategy1)
60 self.mul = P.Mul().shard(strategy2)
Dtest_batchmm.py28 self.relu = P.ReLU().shard(stra1)
29 self.transpose = P.Transpose().shard(stra2)
31 self.batch_mm = P.BatchMatMul().shard(stra3)
33 self.batch_mm2 = P.BatchMatMul().shard(stra4)
34 self.transpose2 = P.Transpose().shard(stra5)
35 self.relu2 = P.ReLU().shard(stra6)
Dtest_layer_norm_further.py32 self.mul = P.Mul().shard(strategy1)
34 self.begin_norm_axis, self.begin_params_axis).shard(strategy2)
35 self.relu = P.ReLU().shard(strategy3)
56 self.mul = P.Mul().shard(strategy1)
58 self.begin_norm_axis, self.begin_params_axis).shard(strategy2)
59 self.relu = P.ReLU().shard(strategy3)
80 self.mul = P.Mul().shard(strategy1)
82 self.begin_norm_axis, self.begin_params_axis).shard(strategy2)
83 self.relu = P.ReLU().shard(strategy3)
104 self.mul = P.Mul().shard(strategy1)
[all …]
/third_party/mindspore/mindspore/nn/layer/
Dembedding.py258 self.unique = P.Unique().shard(((1,),))
275 self.gatherv2.shard(((get_group_size(), 1), (1, get_group_size())))
276 self.embeddinglookup.shard(((get_group_size(), 1), (1, get_group_size())))
281 self.gather_revert.shard(((1, 1), (get_group_size(),)))
284 self.gatherv2.shard(((get_group_size(), 1), indices_strategy))
285 self.embeddinglookup.shard(((get_group_size(), 1), indices_strategy))
289 self.gather_revert.shard(((1, get_group_size()), (1,)))
292 self.gatherv2.shard(((1, get_group_size()), indices_strategy))
293 self.embeddinglookup.shard(((1, get_group_size()), indices_strategy))
298 self.gatherv2.shard(((1, 1), indices_strategy))
[all …]

12345678