wuxun-zhang commented on a change in pull request #15038: [C++] fix type 
inconsistent issue when loading quantized parameters
URL: https://github.com/apache/incubator-mxnet/pull/15038#discussion_r287225942
 
 

 ##########
 File path: cpp-package/include/mxnet-cpp/ndarray.hpp
 ##########
 @@ -47,17 +47,18 @@ inline NDArray::NDArray(const NDArrayHandle &handle) {
   blob_ptr_ = std::make_shared<NDBlob>(handle);
 }
 inline NDArray::NDArray(const std::vector<mx_uint> &shape, const Context 
&context,
-                        bool delay_alloc) {
+                        bool delay_alloc, int dtype) {
   NDArrayHandle handle;
-  CHECK_EQ(MXNDArrayCreate(shape.data(), shape.size(), context.GetDeviceType(),
-                           context.GetDeviceId(), delay_alloc, &handle),
+  CHECK_EQ(MXNDArrayCreateEx(shape.data(), shape.size(), 
context.GetDeviceType(),
+                           context.GetDeviceId(), delay_alloc, dtype, &handle),
 
 Review comment:
   Fixed

----------------------------------------------------------------
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