nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 31 lines 1.1 kB view raw
1From 17f67e0aa31cd2f1c1cb012d3858abf6956acc72 Mon Sep 17 00:00:00 2001 2From: "Sv. Lockal" <lockalsash@gmail.com> 3Date: Tue, 24 Dec 2024 14:43:10 +0000 4Subject: [PATCH] Fix missing isnan definition on libstdc++ >=14 systems 5 6Closes #3441 7--- 8 driver/reducecalculation_driver.hpp | 3 ++- 9 1 file changed, 2 insertions(+), 1 deletion(-) 10 11diff --git a/driver/reducecalculation_driver.hpp b/driver/reducecalculation_driver.hpp 12index 8226b3c953..2001969509 100644 13--- a/driver/reducecalculation_driver.hpp 14+++ b/driver/reducecalculation_driver.hpp 15@@ -33,6 +33,7 @@ 16 #include "random.hpp" 17 #include <algorithm> 18 #include <cfloat> 19+#include <cmath> 20 #include <cstdlib> 21 #include <memory> 22 #include <miopen/miopen.h> 23@@ -77,7 +78,7 @@ int32_t mloReduceCalculationForwardRunHost(miopenTensorDescriptor_t inputDesc, 24 for(size_t i = 0; i < reduce_size; ++i) 25 { 26 Tcheck val = static_cast<Tcheck>(input[input_idx]); 27- if(nanPropagation && isnan(val)) 28+ if(nanPropagation && std::isnan(val)) 29 { 30 val = 0.0f; 31 }