Fix build fail by signed integer compare with unsigned (#6804)
author오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Thu, 22 Aug 2019 01:47:33 +0000 (10:47 +0900)
committer이춘석/On-Device Lab(SR)/Staff Engineer/삼성전자 <chunseok.lee@samsung.com>
Thu, 22 Aug 2019 01:47:33 +0000 (10:47 +0900)
Fix build fail by type change of num_elements() to unsigned

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
runtimes/neurun/backend/acl_cl/KernelGenerator.cc

index 7c98131..923f503 100644 (file)
@@ -445,7 +445,8 @@ void KernelGenerator::visit(const model::operation::FullyConnectedNode &node)
     const auto feature_size = _ctx.at(input_index).shape().num_elements();
 
     UNUSED_RELEASE(feature_size);
-    assert(feature_size == batch_size * input_size);
+    assert((batch_size * input_size) >= 0);
+    assert(feature_size == static_cast<uint64_t>(batch_size * input_size));
 
     // for reshaping
     needs_reshape = true;