Fix __HIP_ARCH_* not defined after including math_functions.h

hcc_detail/math_functions.h used to include hcc_detail/hip_runtime.h.

Removing it has caused regression in TensorFlow 1.8.

Put it back for backward compatibiliity.


[ROCm/clr commit: 87de95975a]
Этот коммит содержится в:
Yaxun Sam Liu
2018-08-08 08:55:28 -04:00
родитель 6e153a743f
Коммит d3295e61e2
2 изменённых файлов: 13 добавлений и 0 удалений
+8
Просмотреть файл
@@ -45,6 +45,14 @@ __device__ __host__ inline void throw_std_bad_alloc()
#endif
}
// Test __HIP_ARCH_HAS_WARP_FUNNEL_SHIFT__ and __HIP_ARCH_HAS_DYNAMIC_PARALLEL__
// is defined. Eigen HIP/hcc/Half.h __ldg depends on this.
#if !defined(__HIP_ARCH_HAS_WARP_FUNNEL_SHIFT__) || \
!defined(__HIP_ARCH_HAS_DYNAMIC_PARALLEL__)
#error \
"__HIP_ARCH_HAS_WARP_FUNNEL_SHIFT__ or __HIP_ARCH_HAS_DYNAMIC_PARALLEL__ not defined"
#endif
#include <hip/hip_runtime.h>
#include "test_common.h"