Home
last modified time | relevance | path

Searched refs:batch_ (Results 1 – 25 of 39) sorted by relevance

12

/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/fp32/
Dgru_fp32.c34 bool is_vec = gru_param->batch_ == 1; in GruStepUnit()
40 float *state_reset_gate = state_gate + gru_param->batch_ * gru_param->hidden_size_; in GruStepUnit()
41 float *state_hidden_buffer = state_gate + gru_param->batch_ * gru_param->hidden_size_ * 2; in GruStepUnit()
48 … GruMatMul(state_reset_gate, hidden_state, state_reset_weight, state_reset_bias, gru_param->batch_, in GruStepUnit()
50 …uMatMul(state_update_gate, hidden_state, state_update_weight, state_update_bias, gru_param->batch_, in GruStepUnit()
53 PackLstmInput(hidden_state, packed_state, gru_param->batch_, gru_param->hidden_size_); in GruStepUnit()
54 … GruMatMul(state_reset_gate, packed_state, state_reset_weight, state_reset_bias, gru_param->batch_, in GruStepUnit()
56 …uMatMul(state_update_gate, packed_state, state_update_weight, state_update_bias, gru_param->batch_, in GruStepUnit()
59 …ElementAdd(update_gate, state_update_gate, update_gate, gru_param->batch_ * gru_param->hidden_size… in GruStepUnit()
60 …ElementAdd(reset_gate, state_update_gate + gru_param->batch_ * gru_param->hidden_size_, reset_gate, in GruStepUnit()
[all …]
Dlstm_fp32.c185 bool is_vec = lstm_param->batch_ == 1; in LstmStepUnit()
188 …UpdateLstmGate(state_gate, hidden_state, state_weight, state_bias, lstm_param->batch_, lstm_param-… in LstmStepUnit()
192 PackLstmInput(hidden_state, packed_state, lstm_param->batch_, lstm_param->hidden_size_); in LstmStepUnit()
193 …UpdateLstmGate(state_gate, packed_state, state_weight, state_bias, lstm_param->batch_, lstm_param-… in LstmStepUnit()
196 ElementAdd(input_gate, state_gate, input_gate, lstm_param->batch_ * lstm_param->hidden_size_); in LstmStepUnit()
197 …ElementAdd(forget_gate, state_gate + lstm_param->batch_ * lstm_param->hidden_size_ * 2, forget_gat… in LstmStepUnit()
198 lstm_param->batch_ * lstm_param->hidden_size_); in LstmStepUnit()
199 ElementAdd(cell_gate, state_gate + lstm_param->batch_ * lstm_param->hidden_size_ * 3, cell_gate, in LstmStepUnit()
200 lstm_param->batch_ * lstm_param->hidden_size_); in LstmStepUnit()
201 ElementAdd(output_gate, state_gate + lstm_param->batch_ * lstm_param->hidden_size_, output_gate, in LstmStepUnit()
[all …]
Dattention_fp32.c30 matrix->batch_ = batch; in InitMatrix()
50 return matrix->batch_ * dst_area; in LeftMatrixPackElementSize()
64 return matrix->batch_ * dst_area; in RightMatrixPackElementSize()
79 matrix->packed_data_ = (float *)malloc(dst_area * matrix->batch_ * sizeof(float)); in PackLeftMatrix()
87 memcpy(matrix->packed_data_, matrix->data_, matrix->batch_ * dst_area * sizeof(float)); in PackLeftMatrix()
89 for (int i = 0; i < matrix->batch_; i++) { in PackLeftMatrix()
141 matrix->packed_data_ = (float *)malloc(dst_area * matrix->batch_ * sizeof(float)); in PackRightMatrix()
148 memcpy(matrix->packed_data_, matrix->data_, matrix->batch_ * dst_area * sizeof(float)); in PackRightMatrix()
150 for (int i = 0; i < matrix->batch_; i++) { in PackRightMatrix()
191 if (matrix == NULL || matrix->batch_ != 1 || matrix->row_ != 1 || matrix->data_ == NULL) { in PackAttentionBias()
[all …]
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/fp16/
Dgru_fp16.c28 bool is_vec = gru_param->batch_ == 1; in GruStepUnitFp16()
34 float16_t *state_reset_gate = state_gate + gru_param->batch_ * gru_param->hidden_size_; in GruStepUnitFp16()
35 float16_t *state_hidden_buffer = state_gate + gru_param->batch_ * gru_param->hidden_size_ * 2; in GruStepUnitFp16()
42 …MatMulFp16(state_reset_gate, hidden_state, state_reset_weight, state_reset_bias, gru_param->batch_, in GruStepUnitFp16()
44 …MulFp16(state_update_gate, hidden_state, state_update_weight, state_update_bias, gru_param->batch_, in GruStepUnitFp16()
47 …RowMajor2Col16MajorFp16(hidden_state, packed_state, gru_param->batch_, gru_param->hidden_size_, fa… in GruStepUnitFp16()
48 …MatMulFp16(state_reset_gate, packed_state, state_reset_weight, state_reset_bias, gru_param->batch_, in GruStepUnitFp16()
50 …MulFp16(state_update_gate, packed_state, state_update_weight, state_update_bias, gru_param->batch_, in GruStepUnitFp16()
53 …ElementAddFp16(update_gate, state_update_gate, update_gate, gru_param->batch_ * gru_param->hidden_… in GruStepUnitFp16()
54 …ElementAddFp16(reset_gate, state_update_gate + gru_param->batch_ * gru_param->hidden_size_, reset_… in GruStepUnitFp16()
[all …]
Dlstm_fp16.c199 bool is_vec = lstm_param->batch_ == 1; in LstmStepUnitFp16()
201 …UpdateLstmGateFp16(state_gate, hidden_state, state_weight, state_bias, lstm_param->batch_, lstm_pa… in LstmStepUnitFp16()
205 …RowMajor2Col16MajorFp16(hidden_state, packed_state, lstm_param->batch_, lstm_param->hidden_size_, … in LstmStepUnitFp16()
206 …UpdateLstmGateFp16(state_gate, packed_state, state_weight, state_bias, lstm_param->batch_, lstm_pa… in LstmStepUnitFp16()
209 ElementAddFp16(input_gate, state_gate, input_gate, lstm_param->batch_ * lstm_param->hidden_size_); in LstmStepUnitFp16()
210 …ElementAddFp16(forget_gate, state_gate + lstm_param->batch_ * lstm_param->hidden_size_ * 2, forget… in LstmStepUnitFp16()
211 lstm_param->batch_ * lstm_param->hidden_size_); in LstmStepUnitFp16()
212 …ElementAddFp16(cell_gate, state_gate + lstm_param->batch_ * lstm_param->hidden_size_ * 3, cell_gat… in LstmStepUnitFp16()
213 lstm_param->batch_ * lstm_param->hidden_size_); in LstmStepUnitFp16()
214 …ElementAddFp16(output_gate, state_gate + lstm_param->batch_ * lstm_param->hidden_size_, output_gat… in LstmStepUnitFp16()
[all …]
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/gpu/math/
Dcholesky_trsm_solve_gpu_kernel.h36 : batch_(0), in CholeskyTrsmGpuKernel()
100 size_t input_size = batch_ * m_ * lda_ * unit_size; in InitSizeLists()
102 size_t output_size = batch_ * m_ * lda_ * unit_size; in InitSizeLists()
104 size_t workspace_size = batch_ * sizeof(T *); in InitSizeLists()
106 workspace_size = batch_ * sizeof(T *); in InitSizeLists()
108 workspace_size = batch_ * sizeof(int); in InitSizeLists()
114 size_t output_size = batch_ * m_ * lda_ * unit_size; in InitSizeLists()
116 size_t workspace_size = batch_ * sizeof(T *); in InitSizeLists()
118 workspace_size = batch_ * sizeof(T *); in InitSizeLists()
120 workspace_size = batch_ * sizeof(int); in InitSizeLists()
[all …]
Dcholesky_solve_gpu_kernel.h37 : batch_(0), in CholeskyGpuKernel()
65 for (size_t i = 0; i < batch_; i++) { in Launch()
75 cudaMemcpyAsync(d_array_addr, h_array_.data(), sizeof(T *) * batch_, in Launch()
79 … cudaMemcpyAsync(d_identity_addr, h_identity_.data(), sizeof(T *) * batch_, in Launch()
83 …_node_, cusolverDnSpotrfBatched(handle_, uplo_, m_, d_array_addr, lda_, d_info_array_addr, batch_), in Launch()
90 for (size_t i = 0; i < batch_; i++) { in Launch()
94 …Eye(batch_ * split_dim_ * split_dim_, split_dim_, output_addr, reinterpret_cast<cudaStream_t>(stre… in Launch()
95 … MatrixSplit(batch_ * split_dim_ * split_dim_, split_dim_, width_, input1_addr, d_batch_input_addr, in Launch()
98 cudaMemcpyAsync(d_array_addr, h_array_.data(), sizeof(T *) * batch_, in Launch()
102 … cudaMemcpyAsync(d_identity_addr, h_identity_.data(), sizeof(T *) * batch_, in Launch()
[all …]
Dmatmul_gpu_kernel.h75 if (batch_ == 1) { in Launch()
87 … &beta, output_addr, dtype_c_, ldc, stride_c, batch_, compute_type, algo_), in Launch()
92 << (batch_ == 1 ? "cublasGemmEx" : "cublasGemmStridedBatchedEx"); in Launch()
126 batch_ = 1; in Init()
128 batch_ *= output_shape[i]; in Init()
154 batch_ = 0; in ResetResource()
176 size_t input_size = batch_ * m_ * k_ * unit_size; in InitSizeLists()
179 input_size = batch_ * n_ * k_ * unit_size; in InitSizeLists()
182 size_t output_size = batch_ * m_ * n_ * unit_size; in InitSizeLists()
187 size_t batch_;
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/fp32/
Dlstm_fp32.cc166 lstm_param_->batch_ = in_shape.at(1); in InitParam()
173 …lstm_param_->output_step_ = lstm_param_->bidirectional_ ? 2 * lstm_param_->batch_ * lstm_param_->h… in InitParam()
174 … : lstm_param_->batch_ * lstm_param_->hidden_size_; in InitParam()
176 state_is_vec_ = lstm_param_->batch_ == 1; in InitParam()
191 lstm_param_->input_row_align_ = UP_ROUND(lstm_param_->seq_len_ * lstm_param_->batch_, row_tile_); in InitParam()
206 …lstm_param_->state_row_align_ = state_is_vec_ ? 1 : UP_ROUND(lstm_param_->batch_, state_row_tile_); in InitParam()
268 …gate_num * lstm_param_->seq_len_ * lstm_param_->batch_ * lstm_param_->hidden_size_ * sizeof(float)… in MallocRunBuffer()
284 …ms_context_->allocator->Malloc(gate_num * lstm_param_->batch_ * lstm_param_->hidden_size_ * sizeof… in MallocRunBuffer()
291 auto buffer_size = lstm_param_->batch_ * lstm_param_->hidden_size_ * sizeof(float); in MallocRunBuffer()
299 auto buffer_size = lstm_param_->batch_ * lstm_param_->hidden_size_ * sizeof(float); in MallocRunBuffer()
[all …]
Dcrop_and_resize_fp32.cc51 batch_ = out_tensors_[0]->Batch(); in MallocTmpBuffer()
55 …oms_ = reinterpret_cast<int *>(ms_context_->allocator->Malloc(sizeof(int) * new_height_ * batch_)); in MallocTmpBuffer()
60 …ops_ = reinterpret_cast<int *>(ms_context_->allocator->Malloc(sizeof(int) * new_height_ * batch_)); in MallocTmpBuffer()
65 … = reinterpret_cast<float *>(ms_context_->allocator->Malloc(sizeof(float) * new_height_ * batch_)); in MallocTmpBuffer()
71 …efts_ = reinterpret_cast<int *>(ms_context_->allocator->Malloc(sizeof(int) * new_width_ * batch_)); in MallocTmpBuffer()
76 …ghts_ = reinterpret_cast<int *>(ms_context_->allocator->Malloc(sizeof(int) * new_width_ * batch_)); in MallocTmpBuffer()
81 …_ = reinterpret_cast<float *>(ms_context_->allocator->Malloc(sizeof(float) * new_width_ * batch_)); in MallocTmpBuffer()
Dgru_fp32.cc66 gru_param_->batch_ = in_shape.at(1); in InitParam()
74 …gru_param_->output_step_ = gru_param_->bidirectional_ ? 2 * gru_param_->batch_ * gru_param_->hidde… in InitParam()
75 … : gru_param_->batch_ * gru_param_->hidden_size_; in InitParam()
91 gru_param_->input_row_align_ = UP_ROUND(gru_param_->seq_len_ * gru_param_->batch_, row_tile_); in InitParam()
94 is_vec_ = gru_param_->batch_ == 1; in InitParam()
95 gru_param_->state_row_align_ = is_vec_ ? 1 : UP_ROUND(gru_param_->batch_, row_tile_); in InitParam()
214 … gate_num * gru_param_->seq_len_ * gru_param_->batch_ * gru_param_->hidden_size_ * sizeof(float))); in MallocRunBuffer()
230 …ms_context_->allocator->Malloc(gate_num * gru_param_->batch_ * gru_param_->hidden_size_ * sizeof(f… in MallocRunBuffer()
255 if (!std::equal(seq_len + 1, seq_len + gru_param_->batch_, seq_len)) { in Run()
Dinstance_norm_fp32.cc41 param_->batch_ = in_tensor->Batch(); in ReSize()
91 …PackNHWCToNC4HW4Fp32(src_data_, tmp_src_data_, param_->batch_, param_->inner_size_, param_->channe… in Run()
Drelative_position_attention_fp32.cc238 param_->batch_ = input_q_tensor_->shape().at(kTensorShapeBatchIndex); in PrepareParam()
266 matrix->batch_ = tensor.shape().at(kLeftMatrixBatchDimIndex); in PackLeftTensor()
279 …mat->data_ = reinterpret_cast<float *>(allocator->Malloc(mat->batch_ * mat->row_ * mat->col_ * siz… in MallocLeftTensor()
298 …mat->data_ = reinterpret_cast<float *>(allocator->Malloc(mat->batch_ * mat->row_ * mat->col_ * siz… in MallocRightTensor()
317 matrix->batch_ = 1; in PackRightTensor()
328 matrix->batch_ = 1; in PackBiasTensor()
338 matrix->batch_ = 1; in PackPositionTensor()
590 int batch = param_->batch_; in PackRunBuffers()
/third_party/mindspore/mindspore/lite/micro/coder/opcoders/nnacl/fp32/
Dlstm_fp32_coder.cc95 lstm_param_->batch_ = in_shape.at(1); in InitParam()
102 …lstm_param_->output_step_ = lstm_param_->bidirectional_ ? 2 * lstm_param_->batch_ * lstm_param_->h… in InitParam()
103 … : lstm_param_->batch_ * lstm_param_->hidden_size_; in InitParam()
113 lstm_param_->input_row_align_ = UP_ROUND(lstm_param_->seq_len_ * lstm_param_->batch_, row_tile_); in InitParam()
116 is_vec_ = lstm_param_->batch_ == 1; in InitParam()
117 lstm_param_->state_row_align_ = is_vec_ ? 1 : UP_ROUND(lstm_param_->batch_, row_tile_); in InitParam()
127 …kNumberTypeFloat32, 4 * lstm_param_->seq_len_ * lstm_param_->batch_ * lstm_param_->hidden_size_ * … in MallocRunBuffer()
136 …kNumberTypeFloat32, 4 * lstm_param_->batch_ * lstm_param_->hidden_size_ * sizeof(float), kWorkspac… in MallocRunBuffer()
140 … kNumberTypeFloat32, lstm_param_->batch_ * lstm_param_->hidden_size_ * sizeof(float), kWorkspace)); in MallocRunBuffer()
145 … kNumberTypeFloat32, lstm_param_->batch_ * lstm_param_->hidden_size_ * sizeof(float), kWorkspace)); in MallocRunBuffer()
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/gpu/nn/
Dbatch_norm_grad_gpu_kernel.h37 : batch_(0), in BatchNormGradGpuKernel()
110 …CalBatchNormGrad(x, dy, scale, save_mean, save_variance, dx, dscale, dbias, epsilon_, batch_, chan… in Launch()
249 batch_ = SizeToInt(shape[0]); in SetTensorDescriptor()
255 batch_ = SizeToInt(shape[0]); in SetTensorDescriptor()
261 batch_ = SizeToInt(shape[0]); in SetTensorDescriptor()
270 …cudnnSetTensor4dDescriptor(x_desc_, cudnn_format, cudnn_data_type_, batch_, channel_, height_, wid… in SetTensorDescriptor()
276 …cudnnSetTensor4dDescriptor(y_desc_, cudnn_format, cudnn_data_type_, batch_, channel_, height_, wid… in SetTensorDescriptor()
282 …cudnnSetTensor4dDescriptor(dy_desc_, cudnn_format, cudnn_data_type_, batch_, channel_, height_, wi… in SetTensorDescriptor()
287 …cudnnSetTensor4dDescriptor(dx_desc_, cudnn_format, cudnn_data_type_, batch_, channel_, height_, wi… in SetTensorDescriptor()
293 …cudnnSetTensor4dDescriptor(dz_desc_, cudnn_format, cudnn_data_type_, batch_, channel_, height_, wi… in SetTensorDescriptor()
[all …]
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/fp16/
Dlstm_fp16.cc71 lstm_param_->batch_ = in_shape.at(1); in InitParam()
78 …lstm_param_->output_step_ = lstm_param_->bidirectional_ ? 2 * lstm_param_->batch_ * lstm_param_->h… in InitParam()
79 … : lstm_param_->batch_ * lstm_param_->hidden_size_; in InitParam()
81 lstm_param_->input_row_align_ = UP_ROUND(lstm_param_->seq_len_ * lstm_param_->batch_, C16NUM); in InitParam()
84 is_vec_ = lstm_param_->batch_ == 1; in InitParam()
85 …lstm_param_->state_row_align_ = is_vec_ ? lstm_param_->batch_ : UP_ROUND(lstm_param_->batch_, C16N… in InitParam()
254 …gate_num * lstm_param_->seq_len_ * lstm_param_->batch_ * lstm_param_->hidden_size_ * sizeof(float1… in MallocRunBuffer()
270 …ms_context_->allocator->Malloc(gate_num * lstm_param_->batch_ * lstm_param_->hidden_size_ * sizeof… in MallocRunBuffer()
277 int buffer_size = lstm_param_->batch_ * lstm_param_->hidden_size_ * sizeof(float16_t); in MallocRunBuffer()
285 int buffer_size = lstm_param_->batch_ * lstm_param_->hidden_size_ * sizeof(float16_t); in MallocRunBuffer()
Dgru_fp16.cc65 gru_param_->batch_ = in_shape.at(1); in InitParam()
73 …gru_param_->output_step_ = gru_param_->bidirectional_ ? 2 * gru_param_->batch_ * gru_param_->hidde… in InitParam()
74 … : gru_param_->batch_ * gru_param_->hidden_size_; in InitParam()
76 gru_param_->input_row_align_ = UP_ROUND(gru_param_->seq_len_ * gru_param_->batch_, C16NUM); in InitParam()
79 is_vec_ = gru_param_->batch_ == 1; in InitParam()
80 …gru_param_->state_row_align_ = is_vec_ ? gru_param_->batch_ : UP_ROUND(gru_param_->batch_, C16NUM); in InitParam()
236 …gate_num * gru_param_->seq_len_ * gru_param_->batch_ * gru_param_->hidden_size_ * sizeof(float16_t… in MallocRunBuffer()
252 …ms_context_->allocator->Malloc(gate_num * gru_param_->batch_ * gru_param_->hidden_size_ * sizeof(f… in MallocRunBuffer()
277 if (!std::equal(seq_len + 1, seq_len + gru_param_->batch_, seq_len)) { in Run()
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/gpu/quant/
Dbatchnorm_fold_grad_gpu_kernel.h41 batch_(0), in BatchNormFoldGradGpuKernel()
72 …ThrustFillWith(dx, batch_ * channel_ * height_ * width_, 0.f, reinterpret_cast<cudaStream_t>(strea… in Launch()
75 …CalBatchNormFoldGrad(d_batch_mean, d_batch_std, x, batch_mean, batch_std, batch_, channel_, height… in Launch()
113 batch_ = input_shape[0]; in Init()
118 input_size_ = sizeof(T) * batch_ * channel_ * height_ * width_; in Init()
152 int batch_; variable
Dbatchnorm_fold_gpu_kernel.h39 batch_(0), in BatchNormFoldGpuKernel()
137 batch_ = input_shape[0]; in Init()
142 input_size_ = sizeof(T) * batch_ * channel_ * height_ * width_; in Init()
148 …cudnnSetTensor4dDescriptor(x_desc_, CUDNN_TENSOR_NCHW, cudnnDataType, batch_, channel_, height_, w… in Init()
203 int batch_; variable
/third_party/mindspore/mindspore/lite/test/ut/src/runtime/kernel/arm/fp32/
Dlstm_fp32_tests.cc31 lstm_param->batch_ = 1; in InitLstmParam()
43 input->set_shape({lstm_param->seq_len_, lstm_param->batch_, lstm_param->input_size_}); in InitLstmForwardCreator()
89 state->set_shape({1, lstm_param->batch_, lstm_param->hidden_size_}); in InitLstmForwardCreator()
103 output->set_shape({lstm_param->seq_len_, lstm_param->batch_, lstm_param->hidden_size_}); in InitLstmForwardCreator()
110 cell_state->set_shape({1, lstm_param->batch_, lstm_param->hidden_size_}); in InitLstmForwardCreator()
117 hidden_state->set_shape({1, lstm_param->batch_, lstm_param->hidden_size_}); in InitLstmForwardCreator()
193 input->set_shape({lstm_param->seq_len_, lstm_param->batch_, lstm_param->input_size_}); in InitLstmBackwardCreator()
250 state->set_shape({2, lstm_param->batch_, lstm_param->hidden_size_}); in InitLstmBackwardCreator()
264 output->set_shape({lstm_param->seq_len_, 2, lstm_param->batch_, lstm_param->hidden_size_}); in InitLstmBackwardCreator()
271 cell_state->set_shape({2, lstm_param->batch_, lstm_param->hidden_size_}); in InitLstmBackwardCreator()
[all …]
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/gpu/arrays/
Dcrop_and_resize_gpu_kernel.h39 batch_(0), in CropAndResizeGpuKernel()
61 …CalCropAndResize(size, input_image, input_boxes, input_box_index, batch_, input_height_, input_wid… in Launch()
153 batch_ = output_shape[0]; in Init()
188 int batch_; variable
/third_party/grpc/src/core/ext/filters/client_channel/health/
Dhealth_check_client.cc314 batch_.payload = &payload_; in StartCall()
317 batch_.on_complete = GRPC_CLOSURE_INIT(&on_complete_, OnComplete, this, in StartCall()
332 batch_.send_initial_metadata = true; in StartCall()
336 batch_.send_message = true; in StartCall()
341 batch_.send_trailing_metadata = true; in StartCall()
354 batch_.recv_initial_metadata = true; in StartCall()
361 batch_.recv_message = true; in StartCall()
363 StartBatch(&batch_); in StartCall()
/third_party/grpc/src/cpp/common/
Dchannel_filter.h50 explicit MetadataBatch(grpc_metadata_batch* batch) : batch_(batch) {} in MetadataBatch()
52 grpc_metadata_batch* batch() const { return batch_; } in batch()
98 const_iterator begin() const { return const_iterator(batch_->list.head); } in begin()
102 grpc_metadata_batch* batch_; // Not owned.
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/mkldnn/
Dmatmul_cpu_kernel.cc142 param_.batch = SizeToInt(batch_); in InitArmKernel()
187 batch_ = 1; in InitKernel()
189 batch_ *= a_shape[i]; in InitKernel()
252 for (size_t i = 0; i < batch_; i++) { in LaunchX64()
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/
Dinstance_norm_parameter.h27 int batch_; member

12