From 59a1305c469b3450a257e0180ab7ba3ba9f3b015 Mon Sep 17 00:00:00 2001 From: Torre Zuk <42548444+TorreZuk@users.noreply.github.com> Date: Fri, 19 Apr 2024 16:53:05 -0600 Subject: [PATCH] use minimal hip includes (#68) * https://rocm.docs.amd.com/projects/HIP/en/docs-6.0.0/user_guide/hip_porting_guide.html#hip-headers-hip-runtime-h-hip-runtime-api-h --- BuildTools/CMake/src/main.cpp | 2 +- Extensions/gemm_ex_bf16_r/gemm_ex_bf16_r.cpp | 2 +- Extensions/gemm_ex_f16_r/gemm_ex_f16_r.cpp | 2 +- Extensions/gemm_ex_f32_r/gemm_ex_f32_r.cpp | 2 +- Extensions/gemm_ex_i8_i32_r/gemm_ex_i8_i32_r.cpp | 2 +- Languages/C/main.c | 2 +- Languages/HIP/main.cpp | 2 +- Level-1/axpy/axpy.cpp | 2 +- Level-1/dot/dot.cpp | 2 +- Level-1/nrm2/nrm2.cpp | 2 +- Level-1/scal/scal.cpp | 2 +- Level-1/swap/swap.cpp | 2 +- Level-2/gemv/gemv.cpp | 2 +- Level-2/her/her.cpp | 2 +- Level-3/gemm/gemm.cpp | 2 +- Level-3/gemm_strided_batched/gemm_strided_batched.cpp | 2 +- Patterns/Multi-device/Multi-device.cpp | 2 +- Patterns/Multi-stream/Multi-stream.cpp | 2 +- common/ArgParser.hpp | 2 +- common/error_macros.h | 2 +- common/memoryHelpers.hpp | 4 +++- common/timers.hpp | 4 +++- 22 files changed, 26 insertions(+), 22 deletions(-) diff --git a/BuildTools/CMake/src/main.cpp b/BuildTools/CMake/src/main.cpp index b2c3f730..3f022e7a 100644 --- a/BuildTools/CMake/src/main.cpp +++ b/BuildTools/CMake/src/main.cpp @@ -22,7 +22,7 @@ #include "error_macros.h" #include -#include +#include #include #include #include diff --git a/Extensions/gemm_ex_bf16_r/gemm_ex_bf16_r.cpp b/Extensions/gemm_ex_bf16_r/gemm_ex_bf16_r.cpp index a3e8f706..f278c13d 100644 --- a/Extensions/gemm_ex_bf16_r/gemm_ex_bf16_r.cpp +++ b/Extensions/gemm_ex_bf16_r/gemm_ex_bf16_r.cpp @@ -21,7 +21,7 @@ * ************************************************************************ */ #include "helpers.hpp" -#include +#include #include #include #include diff --git a/Extensions/gemm_ex_f16_r/gemm_ex_f16_r.cpp b/Extensions/gemm_ex_f16_r/gemm_ex_f16_r.cpp index 934a83c7..f942e70e 100644 --- a/Extensions/gemm_ex_f16_r/gemm_ex_f16_r.cpp +++ b/Extensions/gemm_ex_f16_r/gemm_ex_f16_r.cpp @@ -21,7 +21,7 @@ * ************************************************************************ */ #include "helpers.hpp" #include -#include +#include #include #include #include diff --git a/Extensions/gemm_ex_f32_r/gemm_ex_f32_r.cpp b/Extensions/gemm_ex_f32_r/gemm_ex_f32_r.cpp index 3db8884a..6cd8f46a 100644 --- a/Extensions/gemm_ex_f32_r/gemm_ex_f32_r.cpp +++ b/Extensions/gemm_ex_f32_r/gemm_ex_f32_r.cpp @@ -21,7 +21,7 @@ * ************************************************************************ */ #include "helpers.hpp" -#include +#include #include #include #include diff --git a/Extensions/gemm_ex_i8_i32_r/gemm_ex_i8_i32_r.cpp b/Extensions/gemm_ex_i8_i32_r/gemm_ex_i8_i32_r.cpp index 856f0a41..4b586523 100644 --- a/Extensions/gemm_ex_i8_i32_r/gemm_ex_i8_i32_r.cpp +++ b/Extensions/gemm_ex_i8_i32_r/gemm_ex_i8_i32_r.cpp @@ -21,7 +21,7 @@ * ************************************************************************ */ #include "helpers.hpp" -#include +#include #include #include #include diff --git a/Languages/C/main.c b/Languages/C/main.c index 477dcfd1..a17a8958 100644 --- a/Languages/C/main.c +++ b/Languages/C/main.c @@ -22,7 +22,7 @@ #include "error_macros.h" #include -#include +#include #include #include #include diff --git a/Languages/HIP/main.cpp b/Languages/HIP/main.cpp index bb998d4b..ca7b1a6a 100644 --- a/Languages/HIP/main.cpp +++ b/Languages/HIP/main.cpp @@ -22,7 +22,7 @@ #include "error_macros.h" #include -#include +#include #include #include #include diff --git a/Level-1/axpy/axpy.cpp b/Level-1/axpy/axpy.cpp index 47cb84ce..f66c5161 100644 --- a/Level-1/axpy/axpy.cpp +++ b/Level-1/axpy/axpy.cpp @@ -21,7 +21,7 @@ * ************************************************************************ */ #include "helpers.hpp" -#include +#include #include #include #include diff --git a/Level-1/dot/dot.cpp b/Level-1/dot/dot.cpp index 60b054fa..3d9bd1b2 100644 --- a/Level-1/dot/dot.cpp +++ b/Level-1/dot/dot.cpp @@ -21,7 +21,7 @@ * ************************************************************************ */ #include "helpers.hpp" -#include +#include #include #include #include diff --git a/Level-1/nrm2/nrm2.cpp b/Level-1/nrm2/nrm2.cpp index 4c2d75b9..6edc2cc0 100644 --- a/Level-1/nrm2/nrm2.cpp +++ b/Level-1/nrm2/nrm2.cpp @@ -21,7 +21,7 @@ * ************************************************************************ */ #include "helpers.hpp" -#include +#include #include #include #include diff --git a/Level-1/scal/scal.cpp b/Level-1/scal/scal.cpp index d27c0607..937be81e 100644 --- a/Level-1/scal/scal.cpp +++ b/Level-1/scal/scal.cpp @@ -21,7 +21,7 @@ * ************************************************************************ */ #include "helpers.hpp" -#include +#include #include #include #include diff --git a/Level-1/swap/swap.cpp b/Level-1/swap/swap.cpp index 6f60118b..efee864a 100644 --- a/Level-1/swap/swap.cpp +++ b/Level-1/swap/swap.cpp @@ -21,7 +21,7 @@ * ************************************************************************ */ #include "helpers.hpp" -#include +#include #include #include #include diff --git a/Level-2/gemv/gemv.cpp b/Level-2/gemv/gemv.cpp index 975992a2..ca430e29 100644 --- a/Level-2/gemv/gemv.cpp +++ b/Level-2/gemv/gemv.cpp @@ -21,7 +21,7 @@ * ************************************************************************ */ #include "helpers.hpp" -#include +#include #include #include #include diff --git a/Level-2/her/her.cpp b/Level-2/her/her.cpp index e2b1675e..1cc4769e 100644 --- a/Level-2/her/her.cpp +++ b/Level-2/her/her.cpp @@ -23,7 +23,7 @@ #include "helpers.hpp" #include #include -#include +#include #include #include #include diff --git a/Level-3/gemm/gemm.cpp b/Level-3/gemm/gemm.cpp index 79df2e2b..ae4c6338 100644 --- a/Level-3/gemm/gemm.cpp +++ b/Level-3/gemm/gemm.cpp @@ -21,7 +21,7 @@ * ************************************************************************ */ #include "helpers.hpp" -#include +#include #include #include #include diff --git a/Level-3/gemm_strided_batched/gemm_strided_batched.cpp b/Level-3/gemm_strided_batched/gemm_strided_batched.cpp index d2b25e3a..c94ae38b 100644 --- a/Level-3/gemm_strided_batched/gemm_strided_batched.cpp +++ b/Level-3/gemm_strided_batched/gemm_strided_batched.cpp @@ -21,7 +21,7 @@ * ************************************************************************ */ #include "helpers.hpp" -#include +#include #include #include #include diff --git a/Patterns/Multi-device/Multi-device.cpp b/Patterns/Multi-device/Multi-device.cpp index f75e62b2..549f9e1a 100644 --- a/Patterns/Multi-device/Multi-device.cpp +++ b/Patterns/Multi-device/Multi-device.cpp @@ -21,7 +21,7 @@ * ************************************************************************ */ #include "helpers.hpp" -#include +#include #include #include #include diff --git a/Patterns/Multi-stream/Multi-stream.cpp b/Patterns/Multi-stream/Multi-stream.cpp index 94c7f235..96c91cf3 100644 --- a/Patterns/Multi-stream/Multi-stream.cpp +++ b/Patterns/Multi-stream/Multi-stream.cpp @@ -21,7 +21,7 @@ * ************************************************************************ */ #include "helpers.hpp" -#include +#include #include #include #include diff --git a/common/ArgParser.hpp b/common/ArgParser.hpp index e1d28805..12dec40d 100644 --- a/common/ArgParser.hpp +++ b/common/ArgParser.hpp @@ -22,7 +22,7 @@ #pragma once -#include +#include #include #include #include diff --git a/common/error_macros.h b/common/error_macros.h index 3f66985b..e501d530 100644 --- a/common/error_macros.h +++ b/common/error_macros.h @@ -22,7 +22,7 @@ #pragma once -#include +#include #include #include diff --git a/common/memoryHelpers.hpp b/common/memoryHelpers.hpp index 7cfd1b6c..b897996a 100644 --- a/common/memoryHelpers.hpp +++ b/common/memoryHelpers.hpp @@ -1,3 +1,4 @@ + /* ************************************************************************ * Copyright (C) 2019-2022 Advanced Micro Devices, Inc. All rights reserved. * @@ -22,9 +23,10 @@ #pragma once #include "error_macros.h" +#include #include #include -#include +#include #include #include #include diff --git a/common/timers.hpp b/common/timers.hpp index 28729746..f068b8a6 100644 --- a/common/timers.hpp +++ b/common/timers.hpp @@ -1,3 +1,4 @@ + /* ************************************************************************ * Copyright (C) 2019-2022 Advanced Micro Devices, Inc. All rights reserved. * @@ -19,11 +20,12 @@ * CTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * ************************************************************************ */ + #pragma once #include "error_macros.h" #include #include -#include +#include #include namespace helpers