From f3cafd58550ba1a2dffa30f9e6e960631dc5c00f Mon Sep 17 00:00:00 2001 From: Rahul Garg Date: Sun, 5 Jan 2020 23:03:23 -0800 Subject: [PATCH] Fix hipcc warning related to hipVersion (#1767) * Fix hipcc warning related to hipVersion * Rename hipVersion.h to hip_version.h * Remove HIP_VERSION splitting * Update .gitignore - Ignore generated include/hip/hip_version.h - Removed some stale entries - Added executables from samples/1_Utils/*/ for consistency with bin/ entries. --- .gitignore | 6 +++--- CMakeLists.txt | 4 ++-- bin/hipcc | 2 -- include/hip/hip_runtime.h | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index c4ed31eb6d..5dd8c447ff 100644 --- a/.gitignore +++ b/.gitignore @@ -3,9 +3,6 @@ *.o *.exe *.swp -*.Po -hip-amdinternal -HIP-Examples lib packages build @@ -14,5 +11,8 @@ bin/hipBusBandwidth bin/hipDispatchLatency bin/hipify-clang include/hip/hcc_detail/hip_prof_str.h +include/hip/hip_version.h tags samples/1_Utils/hipInfo/hipInfo +samples/1_Utils/hipBusBandwidth/hipBusBandwidth +samples/1_Utils/hipDispatchLatency/hipDispatchLatency diff --git a/CMakeLists.txt b/CMakeLists.txt index 22f15fb8ca..53f1060621 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -343,7 +343,7 @@ endif() # Generate .hipVersion file(WRITE "${PROJECT_BINARY_DIR}/.hipVersion" ${_versionInfo}) -# Generate hipVersion.h +# Generate hip_version.h set(_versionInfoHeader "// Auto-generated by cmake\n #ifndef HIP_VERSION_H @@ -354,7 +354,7 @@ set(_versionInfoHeader #define HIP_VERSION (HIP_VERSION_MAJOR * 100 + HIP_VERSION_MINOR)\n #endif\n ") -file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/include/hip/hipVersion.h" ${_versionInfoHeader}) +file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/include/hip/hip_version.h" ${_versionInfoHeader}) # Build doxygen documentation find_program(DOXYGEN_EXE doxygen) diff --git a/bin/hipcc b/bin/hipcc index ece79ab18d..387d18ce94 100755 --- a/bin/hipcc +++ b/bin/hipcc @@ -119,8 +119,6 @@ sub delete_temp_dirs { #HIP_PLATFORM controls whether to use NVCC or HCC for compilation: $HIP_PLATFORM= `$HIP_PATH/bin/hipconfig --platform` // "hcc"; $HIP_VERSION= `$HIP_PATH/bin/hipconfig --version`; -($HIP_VERSION_MAJOR, $HIP_VERSION_MINOR, $HIP_VERSION_PATCH) = split(/\./, $HIP_VERSION); -my ($HIP_VERSION_GITDATE, $HIP_VERSION_GITHASH) = split(/-/, $HIP_VERSION_PATCH); $HIP_COMPILER= $hipConfig{'HIP_COMPILER'}; $HIP_RUNTIME= $hipConfig{'HIP_RUNTIME'}; diff --git a/include/hip/hip_runtime.h b/include/hip/hip_runtime.h index 75ed73ca8d..9af74e8d05 100644 --- a/include/hip/hip_runtime.h +++ b/include/hip/hip_runtime.h @@ -49,7 +49,7 @@ THE SOFTWARE. #include #endif -#include +#include #include #if defined(__HIP_PLATFORM_HCC__) && !defined(__HIP_PLATFORM_NVCC__)