diff --git a/projects/hip/include/hip/hcc_detail/device_functions.h b/projects/hip/include/hip/hcc_detail/device_functions.h index b60a38aeea..b319f26e03 100644 --- a/projects/hip/include/hip/hcc_detail/device_functions.h +++ b/projects/hip/include/hip/hcc_detail/device_functions.h @@ -27,11 +27,12 @@ THE SOFTWARE. #include "math_fwd.h" #include +#include + + #include #include #include -#include - /* Integer Intrinsics */ diff --git a/projects/hip/include/hip/hcc_detail/hip_runtime.h b/projects/hip/include/hip/hcc_detail/hip_runtime.h index d8093e6646..d4207c56fe 100644 --- a/projects/hip/include/hip/hcc_detail/hip_runtime.h +++ b/projects/hip/include/hip/hcc_detail/hip_runtime.h @@ -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: diff --git a/projects/hip/include/hip/hcc_detail/math_functions.h b/projects/hip/include/hip/hcc_detail/math_functions.h index 6c8510fcbb..702c120b86 100644 --- a/projects/hip/include/hip/hcc_detail/math_functions.h +++ b/projects/hip/include/hip/hcc_detail/math_functions.h @@ -22,14 +22,16 @@ THE SOFTWARE. #pragma once -#include "math_fwd.h" - -#include - #include #include #include #include +#include + +#include + +#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.