Fix hsa_support::timestamp_ns if HSA is not yet initialized

Default to the HSA runtime's hsa_system_get_info if the saved HSA
functions table is not yet initialized.

Change-Id: I3659095a5ad662f7ca8b0d92bd035901c6d66bb0
Этот коммит содержится в:
Laurent Morichetti
2022-09-08 18:30:54 -07:00
родитель db69cc1c9f
Коммит 87ffbd27f4
5 изменённых файлов: 119 добавлений и 8 удалений
+8
Просмотреть файл
@@ -20,6 +20,8 @@
## IN THE SOFTWARE.
################################################################################
get_property(HSA_RUNTIME_INCLUDE_DIRECTORIES TARGET hsa-runtime64::hsa-runtime64 PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
# Set the HIP language runtime link flags as FindHIP does not set them.
set(CMAKE_EXECUTABLE_RUNTIME_HIP_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG})
set(CMAKE_EXECUTABLE_RUNTIME_HIP_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP})
@@ -139,6 +141,12 @@ hip_add_executable(multi_pool_activities directed/multi_pool_activities.cpp)
target_link_libraries(multi_pool_activities roctracer)
add_dependencies(mytest multi_pool_activities)
## Build the dlopen test
add_executable(dlopen directed/dlopen.cpp)
target_include_directories(dlopen PRIVATE ${PROJECT_SOURCE_DIR}/inc ${HSA_RUNTIME_INCLUDE_DIRECTORIES})
target_link_libraries(dlopen dl)
add_dependencies(mytest dlopen)
## Copy the golden traces and test scripts
configure_file(run.sh ${PROJECT_BINARY_DIR} COPYONLY)
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink run.sh ${PROJECT_BINARY_DIR}/run_ci.sh)