Fix declaration conflict when hip/math_functions.h is included first

This fixes build failure in TensorFlow 1.8 for HCC
This commit is contained in:
Yaxun Sam Liu
2018-08-07 15:44:59 -04:00
parent ac18a3b701
commit 69bbf45b44
2 changed files with 142 additions and 0 deletions
@@ -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")