blob: c7672e96a1173e191bcc082f0def20be32f66512 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
--- a/driver/reducecalculation_driver.hpp
+++ b/driver/reducecalculation_driver.hpp
@@ -34,6 +34,7 @@
#include <algorithm>
#include <cfloat>
#include <cstdlib>
+#include <cmath>
#include <memory>
#include <miopen/miopen.h>
#include <miopen/tensor.hpp>
@@ -77,7 +78,7 @@ int32_t mloReduceCalculationForwardRunHost(miopenTensorDescriptor_t inputDesc,
for(size_t i = 0; i < reduce_size; ++i)
{
Tcheck val = static_cast<Tcheck>(input[input_idx]);
- if(nanPropagation && isnan(val))
+ if(nanPropagation && std::isnan(val))
{
val = 0.0f;
}
|