Fix build failure of hipTestHalf and hipTestIncludeMath for hip-clang

[ROCm/clr commit: 781f0d97b5]
This commit is contained in:
Yaxun Sam Liu
2018-08-17 11:34:45 -04:00
orang tua 814ac65527
melakukan 445697cfe3
3 mengubah file dengan 10 tambahan dan 7 penghapusan
@@ -27,11 +27,12 @@ THE SOFTWARE.
#include "math_fwd.h"
#include <hip/hip_runtime_api.h>
#include <stddef.h>
#include <hip/hip_vector_types.h>
#include <hip/hcc_detail/device_library_decls.h>
#include <hip/hcc_detail/llvm_intrinsics.h>
#include <stddef.h>
/*
Integer Intrinsics
*/
@@ -131,7 +131,7 @@ extern int HIP_TRACE_API;
// Feature tests:
#if defined(__HCC_ACCELERATOR__) && (__HCC_ACCELERATOR__ != 0)
#if (defined(__HCC_ACCELERATOR__) && (__HCC_ACCELERATOR__ != 0)) || __HIP_DEVICE_COMPILE__
// Device compile and not host compile:
// 32-bit Atomics:
@@ -22,14 +22,16 @@ THE SOFTWARE.
#pragma once
#include "math_fwd.h"
#include <hip/hcc_detail/host_defines.h>
#include <assert.h>
#include <limits.h>
#include <limits>
#include <stdint.h>
#include <algorithm>
#include <hip/hcc_detail/host_defines.h>
#include "hip_fp16_math_fwd.h"
#include "math_fwd.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.