diff --git a/projects/hip/include/hip/hcc_detail/math_functions.h b/projects/hip/include/hip/hcc_detail/math_functions.h index c384c5573d..19def9ec7e 100644 --- a/projects/hip/include/hip/hcc_detail/math_functions.h +++ b/projects/hip/include/hip/hcc_detail/math_functions.h @@ -29,7 +29,14 @@ THE SOFTWARE. #include #include + +// assert.h is only for the host version of assert. +// The device version of assert is implemented in hip/hcc_detail/hip_runtime.h. +// Users should include hip_runtime.h for the device version of assert. +#if !__HIP_DEVICE_COMPILE__ #include +#endif + #include #include #include