SWDEV-305766 - Added new debug APIs to get build information

Change-Id: Ibbf0c010cd8f7e6e659f2c4ba932cc8436574431


[ROCm/clr commit: e90cb3b07b]
Esse commit está contido em:
anusha GodavarthySurya
2021-11-25 00:33:26 -08:00
commit de Anusha Godavarthy Surya
commit 7cac13e36e
6 arquivos alterados com 63 adições e 1 exclusões
+5 -1
Ver Arquivo
@@ -124,6 +124,8 @@ if(GIT_FOUND)
set(HIP_VERSION_GITHASH ${git_output})
endif()
set(HIP_VERSION_BUILD_ID 0)
set(HIP_VERSION_BUILD_NAME "")
if(NOT DEFINED ENV{HIP_OFFICIAL_BUILD} AND NOT HIP_OFFICIAL_BUILD)
set(HIP_VERSION_PATCH ${HIP_VERSION_GITDATE})
endif()
@@ -284,7 +286,9 @@ set(_versionInfoHeader
#define HIP_VERSION_MAJOR ${HIP_VERSION_MAJOR}
#define HIP_VERSION_MINOR ${HIP_VERSION_MINOR}
#define HIP_VERSION_PATCH ${HIP_VERSION_PATCH}
#define HIP_VERSION_GITHASH ${HIP_VERSION_GITHASH}
#define HIP_VERSION_GITHASH \"${HIP_VERSION_GITHASH}\"
#define HIP_VERSION_BUILD_ID ${HIP_VERSION_BUILD_ID}
#define HIP_VERSION_BUILD_NAME \"${HIP_VERSION_BUILD_NAME}\"
#define HIP_VERSION (HIP_VERSION_MAJOR * 10000000 + HIP_VERSION_MINOR * 100000 + HIP_VERSION_PATCH)\n
#define __HIP_HAS_GET_PCH ${_pchStatus}\n
#endif\n
@@ -31,6 +31,42 @@ THE SOFTWARE.
#include <hip/amd_detail/amd_hip_common.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Query the installed library build name.
*
* This function can be used even when the library is not initialized.
*
* @returns Returns a string describing the build version of the library. The
* string is owned by the library.
*/
const char* amd_dbgapi_get_build_name();
/**
* @brief Query the installed library git hash.
*
* This function can be used even when the library is not initialized.
*
* @returns Returns git hash of the library.
*/
const char* amd_dbgapi_get_git_hash();
/**
* @brief Query the installed library build ID.
*
* This function can be used even when the library is not initialized.
*
* @returns Returns build ID of the library.
*/
size_t amd_dbgapi_get_build_id();
#ifdef __cplusplus
} /* extern "c" */
#endif
//---
// Top part of file can be compiled with any compiler
+3
Ver Arquivo
@@ -347,3 +347,6 @@ hipGraphExecHostNodeSetParams
hipGraphExecUpdate
hipGraphInstantiateWithFlags
hipGraphExecMemsetNodeSetParams
amd_dbgapi_get_build_name
amd_dbgapi_get_git_hash
amd_dbgapi_get_build_id
+13
Ver Arquivo
@@ -4,6 +4,19 @@
#include "hip_internal.hpp"
#include "hip_code_object.hpp"
#include "platform/program.hpp"
#include <hip/hip_version.h>
const char* amd_dbgapi_get_build_name(void) {
return HIP_VERSION_BUILD_NAME;
}
const char* amd_dbgapi_get_git_hash() {
return HIP_VERSION_GITHASH;
}
size_t amd_dbgapi_get_build_id() {
return HIP_VERSION_BUILD_ID;
}
#ifdef __HIP_ENABLE_PCH
extern const char __hip_pch[];
+3
Ver Arquivo
@@ -345,3 +345,6 @@ hipGraphExecHostNodeSetParams
hipGraphExecUpdate
hipGraphInstantiateWithFlags
hipGraphExecMemsetNodeSetParams
amd_dbgapi_get_build_name
amd_dbgapi_get_git_hash
amd_dbgapi_get_build_id
+3
Ver Arquivo
@@ -377,6 +377,9 @@ global:
hipGraphExecUpdate;
hipGraphInstantiateWithFlags;
hipGraphExecMemsetNodeSetParams;
amd_dbgapi_get_build_name;
amd_dbgapi_get_git_hash;
amd_dbgapi_get_build_id;
local:
*;
} hip_4.4;