Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 13 additions & 22 deletions shared/tensile/Tensile/cmake/TensileConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -215,24 +215,21 @@ function(TensileCreateLibraryFiles
set(Options ${Options} "--architecture=${archString}")
endif()

# We do not need to do device enumeration at library build time.
set(Options ${Options} "--no-enumerate")
Comment on lines -218 to -219
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the comment says, there should be no need to enumerate devices at build time. Removing this line broke Windows builds in TheRock (ROCm/TheRock#1195 (comment)), where we don't yet build hipInfo.exe (ROCm/TheRock#600).

More root cause analysis is needed for this "reported performance regression". What actually changed, and why did removing this flag help? For benchmarks, are the libraries built on the same machines they are being run on? That could explain them expecting to be built with specific options, instead of using a more robust method of enumerating devices at test/benchmark time (on a test machine that might not be the same as the build machine).


set(CommandLine ${Script} ${Options} ${Tensile_LOGIC_PATH} ${Tensile_OUTPUT_PATH} HIP)
if (WIN32 OR (VIRTUALENV_BIN_DIR AND VIRTUALENV_PYTHON_EXENAME))
set(CommandLine ${VIRTUALENV_BIN_DIR}/${VIRTUALENV_PYTHON_EXENAME} ${CommandLine})
endif()
# Tensile relies on the tools from the path, so capture the configure time
# path. It would be better if this were explicit, but that would be a pretty
# big change.
set(ESC_PATH "$ENV{PATH}")
if(WIN32)
string(REPLACE ";" "$<SEMICOLON>" ESC_PATH "${ESC_PATH}")

if (NOT WIN32)
# This removed for windows as breaking rocBLAS compilation
#
# Tensile relies on the tools from the path, so capture the configure time
# path. It would be better if this were explicit, but that would be a pretty
# big change.
set(CommandLine
"${CMAKE_COMMAND}" -E env "'PATH=$ENV{PATH}'" --
${CommandLine})
endif()
set(ENV_PATH_ARG "PATH=${ESC_PATH}")
set(CommandLine
"${CMAKE_COMMAND}" -E env "PATH=${ESC_PATH}" --
${CommandLine})
message(STATUS "Tensile_CREATE_COMMAND: ${CommandLine}")

if(Tensile_EMBED_LIBRARY)
Expand Down Expand Up @@ -266,17 +263,12 @@ function(TensileCreateLibraryFiles
OUTPUT "${Tensile_OUTPUT_PATH}/library"
DEPENDS ${Tensile_LOGIC_PATH}
COMMAND ${CommandLine}
COMMENT "Generating libraries with TensileCreateLibrary"
# To normalize special command line char handling between platforms.
VERBATIM
# To see progress vs buffering when built with ninja.
USES_TERMINAL)
COMMENT "Generating libraries with TensileCreateLibrary")

add_custom_target(${Tensile_VAR_PREFIX}_LIBRARY_TARGET
DEPENDS "${Tensile_OUTPUT_PATH}/library"
COMMAND ${CommandLine} "--verify-manifest"
COMMENT "Verifying files in ${Tensile_MANIFEST_FILE_PATH} were generated"
VERBATIM)
COMMENT "Verifying files in ${Tensile_MANIFEST_FILE_PATH} were generated")
endif()

if(Tensile_EMBED_LIBRARY)
Expand All @@ -292,8 +284,7 @@ function(TensileCreateLibraryFiles
COMMAND ${CMAKE_COMMAND} -E copy
${Tensile_EMBED_LIBRARY_SOURCE}
"${Tensile_OUTPUT_PATH}/library"
DEPENDS ${Tensile_EMBED_LIBRARY_SOURCE}
VERBATIM)
DEPENDS ${Tensile_EMBED_LIBRARY_SOURCE})
endif()

endfunction()
Expand Down