Fixing Tool/Plugin Versioning and adding --version and adding proper documentation for those features
Change-Id: Icdb0d64e02943e638f183ab31759a37736d2dd61
Tá an tiomantas seo le fáil i:
1 tuismitheoir
372fc3910b
tiomantas
32907ff14c
7 comhad athraithe
+143
-30
Níor tháinig aon chomhaid le do chuardach
@@ -47,6 +47,7 @@ install(TARGETS rocprofiler_tool LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/roc
|
||||
|
||||
add_subdirectory(rocsys)
|
||||
add_subdirectory(rocprofv2)
|
||||
add_subdirectory(versioning)
|
||||
|
||||
add_executable(ctrl ctrl.cpp)
|
||||
set_target_properties(
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
# # TODO(aelwazir): To be added later once rocm-core is updated to be rocprofiler dependency
|
||||
|
||||
find_library(ROCM_CORE_LIB rocm-core HINTS ${ROCM_PATH}/lib)
|
||||
|
||||
if(ROCM_CORE_LIB)
|
||||
add_executable(rocprofiler-version version.cpp)
|
||||
target_link_libraries(rocprofiler-version PRIVATE ${ROCM_CORE_LIB})
|
||||
set_target_properties(rocprofiler-version PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/libexec/rocprofiler)
|
||||
target_include_directories(rocprofiler-version PRIVATE ${ROCM_PATH}/include)
|
||||
|
||||
install(TARGETS rocprofiler-version
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/${PROJECT_NAME})
|
||||
endif()
|
||||
@@ -0,0 +1,20 @@
|
||||
#include <rocm-core/rocm_version.h>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
|
||||
int main() {
|
||||
const char* envvar = getenv("ROCPROFILER_LIBRARY_VERSION");
|
||||
uint32_t mj = 0, mn = 0, p = 0;
|
||||
int ret = 0;
|
||||
ret = getROCmVersion(&mj, &mn, &p);
|
||||
if (ret != VerSuccess) {
|
||||
std::cerr << "Error occured while retreiving rocm version!\n";
|
||||
} else {
|
||||
std::cout << "ROCm version: " << mj << "." << mn << "." << p << "\n";
|
||||
if (envvar) std::cout << "ROCProfiler Version: " << envvar << "\n";
|
||||
std::cout << "\nFull Build information for ROCm:\t";
|
||||
printBuildInfo();
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir