Fix for excluding JPEG and VCN activity test. (#135)
JPEG activity recording is currently only supported on MI300 serries. VCN activity is supported in MI100 also but there is a bug currently being fixed by FW. - Currently only testing the Activity verification tests for MI300 - Also moves the Jpeg image copying code to after the package is found.
This commit is contained in:
@@ -57,33 +57,35 @@ if(ROCPROFSYS_DISABLE_EXAMPLES)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Copy image files to build directory
|
||||
if(EXISTS "${ROCmVersion_DIR}/share/rocjpeg/images")
|
||||
if(NOT EXISTS "${CMAKE_BINARY_DIR}/images")
|
||||
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/images")
|
||||
endif()
|
||||
|
||||
file(GLOB_RECURSE image_files "${ROCmVersion_DIR}/share/rocjpeg/images/*")
|
||||
file(COPY ${image_files} DESTINATION ${CMAKE_BINARY_DIR}/images)
|
||||
set(NUM_COPIES 20)
|
||||
|
||||
# Loop over each file and make additional copies
|
||||
foreach(file ${image_files})
|
||||
get_filename_component(filename ${file} NAME)
|
||||
foreach(i RANGE 1 ${NUM_COPIES})
|
||||
file(COPY ${file}
|
||||
DESTINATION ${CMAKE_BINARY_DIR}/images/${filename}_copy${i}.jpg)
|
||||
endforeach()
|
||||
endforeach()
|
||||
else()
|
||||
message(
|
||||
AUTHOR_WARNING
|
||||
"Source directory ${ROCmVersion_DIR}/share/rocjpeg/images does not exist")
|
||||
endif()
|
||||
|
||||
find_package(rocJPEG QUIET)
|
||||
find_package(rocprofiler-register QUIET)
|
||||
|
||||
# Copy image files to build directory
|
||||
function(copy_image_files_and_make_copies)
|
||||
if(EXISTS "${ROCmVersion_DIR}/share/rocjpeg/images")
|
||||
if(NOT EXISTS "${CMAKE_BINARY_DIR}/images")
|
||||
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/images")
|
||||
endif()
|
||||
|
||||
file(GLOB_RECURSE image_files "${ROCmVersion_DIR}/share/rocjpeg/images/*")
|
||||
file(COPY ${image_files} DESTINATION ${CMAKE_BINARY_DIR}/images)
|
||||
set(NUM_COPIES 20)
|
||||
|
||||
# Loop over each file and make additional copies
|
||||
foreach(file ${image_files})
|
||||
get_filename_component(filename ${file} NAME)
|
||||
foreach(i RANGE 1 ${NUM_COPIES})
|
||||
file(COPY ${file}
|
||||
DESTINATION ${CMAKE_BINARY_DIR}/images/${filename}_copy${i}.jpg)
|
||||
endforeach()
|
||||
endforeach()
|
||||
else()
|
||||
message(
|
||||
AUTHOR_WARNING
|
||||
"Source directory ${ROCmVersion_DIR}/share/rocjpeg/images does not exist")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# threads
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
@@ -109,6 +111,7 @@ if(HIP_FOUND
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++17")
|
||||
target_link_libraries(jpegdecode ${LINK_LIBRARY_LIST})
|
||||
target_compile_options(jpegdecode PRIVATE ${_FLAGS})
|
||||
copy_image_files_and_make_copies()
|
||||
|
||||
if(ROCPROFSYS_INSTALL_EXAMPLES)
|
||||
install(
|
||||
|
||||
Reference in New Issue
Block a user