@@ -58,7 +58,6 @@ ::create(const std::vector<Tensor<X86> *>& inputs,
5858 for (int i = 0 ; i < inputs.size (); i++) {
5959 cblas_int IC = inputs[i]->count_valid (param.axis , inputs[i]->dims ());
6060 packed_weights.push_back (cblas_sgemm_alloc (CblasAMatrix, OC, MB, IC));
61- // LOG(INFO) << "anakin input[" << i << "] alloc passed";
6261 cblas_sgemm_pack (CblasColMajor,
6362 CblasAMatrix,
6463 param.is_transpose_weights ? CblasNoTrans : CblasTrans,
@@ -67,7 +66,6 @@ ::create(const std::vector<Tensor<X86> *>& inputs,
6766 weights + total_IC * OC, IC,
6867 packed_weights[i]);
6968 total_IC += IC;
70- // LOG(INFO) << "anakin input[" << i << "] pack passed";
7169 }
7270
7371 CHECK_EQ (inputs.size (), 1 );
@@ -182,7 +180,6 @@ ::dispatch(const std::vector<Tensor<X86> *>& inputs,
182180 cblas_int IC = inputs[i]->count_valid (param.axis , inputs[i]->dims ());
183181
184182 if (i == 0 ) {
185- // C := alpha * op(A) * op(B) + beta * C
186183 cblas_sgemm_compute (CblasColMajor, // Layout
187184 CblasPacked, // a
188185 CblasNoTrans, // b是否转置
@@ -201,14 +198,6 @@ ::dispatch(const std::vector<Tensor<X86> *>& inputs,
201198 1.0 , // beta
202199 dst, OC); // c, ldc
203200 }
204-
205- // LOG(INFO) << "anakin compute[" << i << "] passed";
206-
207- // LOG(INFO) << "inputs[]:dims: " << inputs[0]->dims();
208- // LOG(INFO) << "inputs:size: " << inputs.size();
209- // LOG(INFO) << "inputs:capacity: " << inputs.capacity();
210- // LOG(INFO) << "output:size: " << outputs.size();
211- // LOG(INFO) << "OC, MB, IC: " << OC << " "<< MB << " " << IC;
212201 }
213202
214203 if (bias) {
@@ -246,7 +235,6 @@ SaberStatus VenderFc<X86, AK_INT8>::create(const std::vector<Tensor<X86> *>& inp
246235 ws_ = nullptr ;
247236 }
248237
249- // LOG(INFO)<<"batch size = "<<_batch_size<<","<<_output_channel;
250238 ws_ = zmalloc (_batch_size * _output_channel * sizeof (int ), 256 );
251239
252240 if (ws_ == nullptr ) {
@@ -291,7 +279,6 @@ SaberStatus VenderFc<X86, AK_INT8>::init(const std::vector<Tensor<X86> *>& input
291279 _need_weights_trans = true ;
292280 _weights_trans.re_alloc (param.weights ->valid_shape (), AK_INT8);
293281 utils::ScaleUtils::scale_fc_weights_to_nchw_host (_weights_trans, *param.weights );
294- // LOG(INFO)<<"input shape "<<inputs[0]->valid_shape()<<" , weights shape "<<param.weights->valid_shape();
295282 }
296283
297284 if (_need_weights_trans) {
@@ -369,18 +356,9 @@ SaberStatus VenderFc<X86, AK_INT8>::dispatch(const std::vector<Tensor<X86> *>& i
369356 auto weight = static_cast <const int8_t *>(param.weights ->data ()) + total_ic * _output_channel;
370357
371358 if (_need_weights_trans) {
372- // LOG(INFO)<<"weights trans";
373359 weight = static_cast <const int8_t *>(_weights_trans.data ()) + total_ic * _output_channel;
374- // print_tensor(_weights_trans);
375360 }
376361
377- // for(auto a:_scale){
378- // LOG(INFO)<<"scale = "<<a;
379- // }
380- // LOG(INFO)<<"m,n,k = "<<_output_channel<<","<<_batch_size<<","<<IC;
381- // print_tensor(_bias_scale);
382- /* c = scale * { op(A) + a_offset_scale * a_offset } *
383- { op(B) + b_offset_scale * b_offset } + beta * C + c_offset */
384362 if (i == 0 ) {
385363 cblas_gemm_s8u8s32 (CblasColMajor, // Layout
386364 _is_transpose_weights, // a need to transpose or not
0 commit comments