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 2020/01/28 19:55:23 UTC
[GitHub] [incubator-mxnet] larroy commented on a change in pull request
#16884: [Backport][v1.6.x] Fix the wrong result of sum, mean, argmin,
argmax when inputs contain inf or nan
larroy commented on a change in pull request #16884: [Backport][v1.6.x] Fix the wrong result of sum, mean, argmin, argmax when inputs contain inf or nan
URL: https://github.com/apache/incubator-mxnet/pull/16884#discussion_r372023139
##########
File path: 3rdparty/mshadow/mshadow/base.h
##########
@@ -606,6 +606,64 @@ struct divto {
typedef op::div OPType;
};
} // namespace sv
+
+#ifndef __CUDA_ARCH__
+using std::isnan;
+using std::isinf;
+#endif
+
+/*! \brief
+ * determines if the given floating point
+ * number is not a number */
+namespace isnan_typed {
+ template<typename DType>
+ MSHADOW_XINLINE bool IsNan(volatile DType val) {
Review comment:
what's the point of volatile here?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services