You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2021/08/09 17:22:28 UTC

[GitHub] [incubator-mxnet] ptrendx commented on a change in pull request #20470: Fix an array iterator in nnvm_to_onnx

ptrendx commented on a change in pull request #20470:
URL: https://github.com/apache/incubator-mxnet/pull/20470#discussion_r685381910



##########
File path: src/operator/subgraph/tensorrt/nnvm_to_onnx.cc
##########
@@ -776,7 +776,7 @@ void ConvertConstant(
     std::shared_ptr<uint16_t[]> shared_data_ptr(new uint16_t[size]);
     uint16_t* const data_ptr = shared_data_ptr.get();
     nd.SyncCopyToCPU(static_cast<void*>(data_ptr), size);
-    for (size_t blob_idx = 0; blob_idx < size; ++blob_idx) {
+    for (size_t blob_idx = 0; blob_idx < size / 2; ++blob_idx) {

Review comment:
       What if size is odd?




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

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org