Merge pull request #623 from ROCm-Developer-Tools/tf18

Fix declaration conflict when hip/math_functions.h is included first
Esse commit está contido em:
Maneesh Gupta
2018-08-10 09:36:27 +05:30
commit de GitHub
3 arquivos alterados com 170 adições e 0 exclusões
+11
Ver Arquivo
@@ -31,6 +31,12 @@ THE SOFTWARE.
#include <limits>
#include <stdint.h>
// HCC's own math functions should be included first, otherwise there will
// be conflicts when hip/math_functions.h is included before hip/hip_runtime.h.
#ifdef __HCC__
#include "kalmar_math.h"
#endif
#pragma push_macro("__DEVICE__")
#pragma push_macro("__RETURN_TYPE")
@@ -1332,3 +1338,8 @@ __HIP_OVERLOAD2(double, min)
#pragma pop_macro("__HIP_OVERLOAD2")
#pragma pop_macro("__DEVICE__")
#pragma pop_macro("__RETURN_TYPE")
// For backward compatibility.
// There are HIP applications e.g. TensorFlow, expecting __HIP_ARCH_* macros
// defined after including math_functions.h.
#include <hip/hcc_detail/hip_runtime.h>
+1
Ver Arquivo
@@ -27,6 +27,7 @@ THE SOFTWARE.
// paths to provide a consistent include env and avoid "missing symbol" errors that only appears
// on NVCC path:
#include <hip/hip_common.h>
#if defined(__HIP_PLATFORM_HCC__) && !defined(__HIP_PLATFORM_NVCC__)
#include <hip/hcc_detail/math_functions.h>