This is an automated email from the ASF dual-hosted git repository.

bgawrych pushed a commit to branch take_opt
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git

commit 6ce5ee94c921695b0e7c7d41130cf6ae65ae98f8
Author: Bartlomiej Gawrych <[email protected]>
AuthorDate: Fri Nov 19 15:47:15 2021 +0100

    Fix build
---
 src/operator/tensor/indexing_op.cc | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/operator/tensor/indexing_op.cc 
b/src/operator/tensor/indexing_op.cc
index c46d192..ee2470c 100644
--- a/src/operator/tensor/indexing_op.cc
+++ b/src/operator/tensor/indexing_op.cc
@@ -95,7 +95,12 @@ struct TakeNonzeroAxisCPU {
       }
       size_t in_offset  = i * outer_dim_stride + index * axis_dim_stride;
       size_t out_offset = (i * idx_size + j) * axis_dim_stride;
-      memcpy(out_data + out_offset, in_data + in_offset, axis_dim_stride * 
sizeof(DType));
+      #pragma GCC diagnostic push
+#if __GNUC__ >= 8
+#pragma GCC diagnostic ignored "-Wclass-memaccess"
+#endif
+      std::memcpy(out_data + out_offset, in_data + in_offset, axis_dim_stride 
* sizeof(DType));
+#pragma GCC diagnostic pop
     }
   }
 };

Reply via email to