Home
last modified time | relevance | path

Searched refs:seq_len (Results 1 – 25 of 57) sorted by relevance

123

/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/gpu/cuda_impl/
Dreverse_sequence_impl.cu56 __global__ void ReverseSequence(const size_t size, const T *input, const S *seq_len, const int64_t … in ReverseSequence() argument
68 cur_slice_seq_len = seq_len[cur_slice]; in ReverseSequence()
87 void CalReverseSequence(const size_t size, const T *input, const S *seq_len, const int64_t batch_di… in CalReverseSequence() argument
92 …size, input, seq_len, batch_dim, seq_dim, cur_pos_arr, input_shape_ptr, input_shape_cum_ptr, shape… in CalReverseSequence()
96 …te void CalReverseSequence<int8_t, int>(const size_t size, const int8_t *input, const int *seq_len,
100 …CalReverseSequence<int8_t, int64_t>(const size_t size, const int8_t *input, const int64_t *seq_len,
104 … void CalReverseSequence<int16_t, int>(const size_t size, const int16_t *input, const int *seq_len,
108 …lReverseSequence<int16_t, int64_t>(const size_t size, const int16_t *input, const int64_t *seq_len,
112 template void CalReverseSequence<int, int>(const size_t size, const int *input, const int *seq_len,
116 … void CalReverseSequence<int, int64_t>(const size_t size, const int *input, const int64_t *seq_len,
[all …]
Dreverse_sequence_impl.cuh23 void CalReverseSequence(const size_t size, const T *input, const S *seq_len, const int64_t batch_di…
/third_party/mindspore/tests/st/ops/ascend/
Dtest_sparse_attention.py13 seq_len = 1024 # this op is designed for seq_len = 1024
18 q = np.random.rand(bs, seq_len, heads * size_per_head)
20 k = np.random.rand(bs, seq_len, heads * size_per_head)
22 v = np.random.rand(bs, seq_len, heads * size_per_head)
24 attention_mask = np.ones((bs, seq_len, seq_len), dtype=np.float32)
/third_party/mindspore/tests/st/ops/gpu/
Dtest_lstm_op.py32 …def __init__(self, seq_len, batch_size, input_size, hidden_size, num_layers, has_bias, bidirection… argument
57 … self.x = Parameter(initializer(Tensor(input_np), [seq_len, batch_size, input_size]), name='x')
112 seq_len = 5
126 …net = LstmNet(seq_len, batch_size, input_size, hidden_size, num_layers, has_bias, bidirectional, d…
164 …def __init__(self, seq_len, batch_size, input_size, hidden_size, num_layers, has_bias, bidirection… argument
189 … self.x = Parameter(initializer(Tensor(input_np), [seq_len, batch_size, input_size]), name='x')
262 seq_len = 5
276 …net = BiLstmNet(seq_len, batch_size, input_size, hidden_size, num_layers, has_bias, bidirectional,…
321 …def __init__(self, seq_len, batch_size, input_size, hidden_size, num_layers, has_bias, bidirection… argument
346 … self.x = Parameter(initializer(Tensor(input_np), [seq_len, batch_size, input_size]), name='x')
[all …]
/third_party/mindspore/mindspore/ops/_op_impl/_custom_op/
Dmatmul_dds_grad_impl.py73 seq_len = shape_q[1] * shape_q[2] // bs
74 block_num = seq_len // block_size
78 mat_q = tik_inst.Tensor("float16", (size_per_head * heads // 16, bs * seq_len // 16, 16, 16),
81 mat_k = tik_inst.Tensor("float16", (size_per_head * heads // 16, bs * seq_len // 16, 16, 16),
96 mat_dq = tik_inst.Tensor("float16", (size_per_head * heads // 16, bs * seq_len // 16, 16, 16),
99 mat_dk = tik_inst.Tensor("float16", (bs * seq_len // 16, size_per_head * heads // 16, 16, 16),
145 head * size_per_head // 16, b * seq_len // 16 +
147 0, size_per_head // 16, 16, bs * seq_len - 16, 0)
308 mat_k[head * size_per_head // 16, b * seq_len // 16 + (
310 0, size_per_head // 16, 16, bs * seq_len - 16, 0)
[all …]
Ddsd_impl.py58 seq_len = input_v_shape[0] * 16 // batch_size
61 cpt_time = seq_len//512
68 v_gm = tik_inst.Tensor('float16', (batch_size*seq_len//16,
71 …output_gm = tik_inst.Tensor('float16', (batch_size, head, v_embedding // 16, seq_len//16, 16, 16),…
99 tik_inst.data_move(v_global_l1[0, 0, 0, 0], v_gm[bs_idx * seq_len // 16 + global_idx,
100 … head_idx * v_embedding // 16, 0, 0], 0, seq_len // (4 * 16),
137 v_gm[bs_idx * seq_len//16 + w_idx * 4, head_idx *
157 (seq_len - block_size)*16*2//block_bite_size)
Dmatmul_dds_impl.py70 seq_len = shape_q[1] * shape_q[2] // bs
74 block_num = seq_len // block_size # block number only support 16 for now
75 global_size = seq_len // 4 # global size only support 256 for now
79 mat_q = tik_inst.Tensor("float16", (size_per_head * heads // 16, bs * seq_len // 16, 16, 16),
82 mat_k = tik_inst.Tensor("float16", (size_per_head * heads // 16, bs * seq_len // 16, 16, 16),
88 mat_gm = tik_inst.Tensor("float32", (bs * global_size // 16, seq_len // 16, 16, 16),
137 b * seq_len // 16 + global_idx, 0, 0],
174 mat_k[head * size_per_head // 16, b * seq_len // 16 + (
176 0, size_per_head // 16, block_size, bs * seq_len - block_size, 0)
191 mat_q[head * size_per_head // 16, b * seq_len // 16 + (
[all …]
Ddsd_back_impl.py65 seq_len = input_v_shape[0] * 16 // batch_size
82 (batch_size*seq_len//16, head*v_embedding//16, 16, 16),
89 16, seq_len // 16, 16, 16),
97 16, seq_len // 16, 16, 16),
119 (batch_size*seq_len//16, head*v_embedding//16, 16, 16),
133 d_a_l1 = tik_inst.Tensor('float16', (seq_len // 16, v_embedding // 16, 16, 16),
138 seq_len//16, 16*16*2//block_bite_size,
229 tik_inst.data_move(d_v_gm[bs_idx*seq_len//16+w_idx * (block_size // 16) + h_idx,
261 v_gm[bs_idx*seq_len//16+w_idx *
291 v_gm[bs_idx*seq_len//16 + (
/third_party/mindspore/mindspore/lite/test/ut/nnacl/infer/
Dlstm_infer_test.cc29 int seq_len = 2; in TEST_F() local
35 inputs[0]->shape_[0] = seq_len; in TEST_F()
57 ASSERT_EQ(outputs[0]->shape_[0], seq_len); in TEST_F()
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/fp32/
Dgru_fp32.cc253 auto seq_len = reinterpret_cast<int *>(in_tensors_.at(5)->data()); in Run() local
254 CHECK_NULL_RETURN(seq_len); in Run()
255 if (!std::equal(seq_len + 1, seq_len + gru_param_->batch_, seq_len)) { in Run()
259 check_seq_len = MSMIN(check_seq_len, MSMAX(0, seq_len[0])); in Run()
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/fp16/
Dgru_fp16.cc275 int *seq_len = reinterpret_cast<int *>(in_tensors_.at(5)->data()); in Run() local
276 MS_ASSERT(seq_len != nullptr); in Run()
277 if (!std::equal(seq_len + 1, seq_len + gru_param_->batch_, seq_len)) { in Run()
281 check_seq_len = MSMIN(check_seq_len, MSMAX(0, seq_len[0])); in Run()
/third_party/mindspore/tests/st/ops/cpu/
Dtest_lstm_op.py155 seq_len = 5
191 error_y = np.ones([seq_len, batch_size, hidden_size]) * 1.0e-4
293 …def __init__(self, seq_len, batch_size, input_size, hidden_size, num_layers, has_bias, bidirection… argument
305 … self.x = Parameter(initializer(Tensor(input_np), [seq_len, batch_size, input_size]), name='x')
352 seq_len = 5
360 …net = Grad(Net(seq_len, batch_size, input_size, hidden_size, num_layers, has_bias, bidirectional, …
/third_party/mindspore/tests/ut/python/parallel/
Dtest_dsd_matmul.py50 self.seq_len = 1024
53 self.block_num = self.seq_len // self.block_size
93 dsd = self.reshape(dsd, (-1, self.seq_len, self.v_embedding * self.num_heads))
Dtest_cus_matmul_dds.py46 self.seq_len = 1024
48 self.block_num = self.seq_len // self.block_size
53 …self.global_mask = Tensor(np.ones((batch_size * self.global_size // 16, self.seq_len // 16, 16, 16…
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/gpu/arrays/
Dreverse_sequence_gpu_kernel.h54 S *seq_len = GetDeviceAddress<S>(inputs, 1); in Launch() local
63 …CalReverseSequence(input_size_, input, seq_len, batch_dim_, seq_dim_, cur_pos_arr, input_shape_ptr, in Launch()
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/drivers/
Ddriver_privsep.c218 size_t seq_len = params->seq_len; in wpa_driver_privsep_set_key() local
234 if (seq && seq_len > 0 && seq_len < sizeof(cmd.seq)) { in wpa_driver_privsep_set_key()
235 os_memcpy(cmd.seq, seq, seq_len); in wpa_driver_privsep_set_key()
236 cmd.seq_len = seq_len; in wpa_driver_privsep_set_key()
Ddriver_wext.c1719 size_t seq_len, in wpa_driver_wext_set_key_ext() argument
1728 if (seq_len > IW_ENCODE_SEQ_MAX_SIZE) { in wpa_driver_wext_set_key_ext()
1730 __FUNCTION__, (unsigned long) seq_len); in wpa_driver_wext_set_key_ext()
1787 if (seq && seq_len) { in wpa_driver_wext_set_key_ext()
1789 os_memcpy(ext->rx_seq, seq, seq_len); in wpa_driver_wext_set_key_ext()
1831 size_t seq_len = params->seq_len; in wpa_driver_wext_set_key() local
1838 (unsigned long) seq_len, (unsigned long) key_len); in wpa_driver_wext_set_key()
1841 seq, seq_len, key, key_len, key_flag); in wpa_driver_wext_set_key()
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/drivers/
Ddriver_privsep.c211 const u8 *seq, size_t seq_len, in wpa_driver_privsep_set_key() argument
228 if (seq && seq_len > 0 && seq_len < sizeof(cmd.seq)) { in wpa_driver_privsep_set_key()
229 os_memcpy(cmd.seq, seq, seq_len); in wpa_driver_privsep_set_key()
230 cmd.seq_len = seq_len; in wpa_driver_privsep_set_key()
Ddriver_wext.h57 int set_tx, const u8 *seq, size_t seq_len,
Ddriver_openbsd.c74 size_t seq_len, const u8 *key, size_t key_len) in wpa_driver_openbsd_set_key() argument
/third_party/mindspore/mindspore/ops/operations/
D_inner_ops.py1282 seq_len = input_v_shape[0] * 16 // batch_size
1283 return (batch_size, head, v_embedding // 16, seq_len // 16, 16, 16)
1301 seq_len = local_mask[0] * local_mask[-1]
1302 bs = q[1] * q[2] // seq_len
1303 global_size = seq_len // 4
1307 block_num = seq_len // block_size
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/common/
Dprivsep_commands.h82 size_t seq_len; member
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/common/
Dprivsep_commands.h82 size_t seq_len; member
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/
Dctcloss_cpu_kernel.cc225 void CTCLossCPUKernel::GenLabelWithBlank(const uint32_t *seq_len, const std::vector<std::vector<uin… in GenLabelWithBlank() argument
243 if (!ignore_longer_outputs_than_inputs_ && l.size() > seq_len[b]) { in GenLabelWithBlank()
245 << seq_len[b] << "< " << l.size(); in GenLabelWithBlank()
Dctcloss_cpu_kernel.h42 …void GenLabelWithBlank(const uint32_t *seq_len, const std::vector<std::vector<uint32_t>> &batch_la…

123