eric-haibin-lin commented on a change in pull request #10025: Language model 
with Google's billion words dataset
URL: https://github.com/apache/incubator-mxnet/pull/10025#discussion_r173073715
 
 

 ##########
 File path: src/operator/nn/fully_connected.cc
 ##########
 @@ -87,8 +90,16 @@ void FullyConnectedComputeExCPU(const nnvm::NodeAttrs& 
attrs,
     return;
   }
   FallBackCompute(FullyConnectedCompute<cpu>, attrs, ctx, inputs, req, 
outputs);
+#else
+  std::vector<TBlob> in_blobs(inputs.size());
+  for (size_t i = 0; i < in_blobs.size(); i++) in_blobs[i] = inputs[i].data();
+  std::vector<TBlob> out_blobs(outputs.size());
+  for (size_t i = 0; i < out_blobs.size(); i++) out_blobs[i] = 
outputs[i].data();
+  FullyConnectedCompute<cpu>(attrs, ctx, in_blobs, req, out_blobs);
+#endif
 
 Review comment:
   When USE_MKL=1,
   I wanted to simply use the non-MKL FCForward with 
   ```
   data.data(),
   weight.data(),
   bias.data(),
   ```
   assuming `data.data()` returns a TBlob with normal cpu layout even if data 
is in MKL layout. `weight.data()` and `bias.data()` should always return normal 
cpu layout if weight and bias are `row_sparse`. Please advice. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to