zheng-da commented on a change in pull request #11129: [MXNET-497]Test kAddTo 
request for mkldnn operators
URL: https://github.com/apache/incubator-mxnet/pull/11129#discussion_r194900964
 
 

 ##########
 File path: tests/cpp/operator/mkldnn.cc
 ##########
 @@ -571,9 +613,8 @@ void VerifyActResult(const std::vector<NDArray *> 
&in_arrs, const NDArray &arr)
   mshadow::default_real_t *d1 = 
static_cast<mshadow::default_real_t*>(blob1.dptr_);
   mshadow::default_real_t *d2 = 
static_cast<mshadow::default_real_t*>(blob2.dptr_);
   EXPECT_EQ(tmp1.shape().Size(), tmp2.shape().Size());
-  for (size_t i = 0; i < tmp1.shape().Size(); i++) {
-    EXPECT_EQ(d1[i], std::fmax(d2[i], 0));
-  }
+  for (size_t i = 0; i < tmp1.shape().Size(); i++)
+    ASSERT_EQ(d2[i], std::fmax(d1[i], 0));
 
 Review comment:
   ASSERT_EQ is defined by mxnet. We should use EXPECT_EQ in the unit test 
because we want to see all failures.

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


With regards,
Apache Git Services

Reply via email to