ZhennanQin commented on a change in pull request #14641: [MKLDNN]Improve 
quantizeV2 and dequantize latency
URL: https://github.com/apache/incubator-mxnet/pull/14641#discussion_r276055413
 
 

 ##########
 File path: src/operator/quantization/quantize_v2.cc
 ##########
 @@ -47,6 +47,22 @@ static bool QuantizeV2StorageType(const nnvm::NodeAttrs& 
attrs, const int dev_ma
   return true;
 }
 
+static OpStatePtr CreateQuantizeV2State(const nnvm::NodeAttrs& attrs, Context 
ctx,
+                                        const std::vector<TShape>& in_shapes,
+                                        const std::vector<int>& in_types) {
+  OpStatePtr state;
+  if (ctx.dev_type == kGPU) {
+    state = OpStatePtr::Create<QuantizeV2Operator<gpu>>(attrs);
 
 Review comment:
   Your suggestion will have problem to build mkldnn and cuda together, just as 
the case of mxnet_cu92mkl. for mxnet_cu92mkl, `MXNET_USE_MKLDNN == 1` is 
enabled, but end-user may use GPU only.

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


With regards,
Apache Git Services

Reply via email to