Only retain CMakeLists patch. We don't need install.sh, rmake.py Suggested-By: Alessandro Barbieri ================================================================ From 0ffee0626bf987bae6b81183a5c61569a489537a Mon Sep 17 00:00:00 2001 From: Torre Zuk <42548444+TorreZuk@users.noreply.github.com> Date: Thu, 4 Nov 2021 09:21:37 -0600 Subject: [PATCH] Swdev 309014 add jobs arg (#953) * adds -j --jobs argment passing of cpu_threads for build --- CMakeLists.txt | 1 + install.sh | 16 ++++++++++++---- library/src/CMakeLists.txt | 34 +++++++++++++++++++++++++--------- rmake.py | 29 ++++++++++++++++++----------- 4 files changed, 56 insertions(+), 24 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 69cf8d586..40d88ea0a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -244,6 +244,7 @@ if(NOT SKIP_LIBRARY) set( Tensile_CODE_OBJECT_VERSION "V2" CACHE STRING "Tensile code_object_version") set( Tensile_COMPILER "hipcc" CACHE STRING "Tensile compiler") set( Tensile_LIBRARY_FORMAT "msgpack" CACHE STRING "Tensile library format") + set( Tensile_CPU_THREADS "" CACHE STRING "Number of threads for Tensile parallel build") option( Tensile_MERGE_FILES "Tensile to merge kernels and solutions files?" ON ) option( Tensile_SHORT_FILENAMES "Tensile to use short file names? Use if compiler complains they're too long." OFF ) diff --git a/library/src/CMakeLists.txt b/library/src/CMakeLists.txt index 4f5e4572d..dedfe9794 100755 --- a/library/src/CMakeLists.txt +++ b/library/src/CMakeLists.txt @@ -58,15 +58,31 @@ if( BUILD_WITH_TENSILE ) # Add a build target for Tensile kernel library # Runtime language is HIP by default - TensileCreateLibraryFiles( - "${CMAKE_CURRENT_SOURCE_DIR}/blas3/Tensile/Logic/${Tensile_LOGIC}" - "${PROJECT_BINARY_DIR}/Tensile" - ARCHITECTURE ${Tensile_ARCHITECTURE} - CODE_OBJECT_VERSION ${Tensile_CODE_OBJECT_VERSION} - COMPILER ${Tensile_COMPILER} - LIBRARY_FORMAT ${Tensile_LIBRARY_FORMAT} - ${Tensile_Options} - ) + # warning our Tensile_ variables may shadow variable in TensileCreateLibraryFiles + # thus bypassing the function argument parameter system (mainly the options list) and CPU_THREADS + if(Tensile_CPU_THREADS MATCHES "^[0-9]+$") + # only including threads argument if number + TensileCreateLibraryFiles( + "${CMAKE_CURRENT_SOURCE_DIR}/blas3/Tensile/Logic/${Tensile_LOGIC}" + "${PROJECT_BINARY_DIR}/Tensile" + ARCHITECTURE ${Tensile_ARCHITECTURE} + CODE_OBJECT_VERSION ${Tensile_CODE_OBJECT_VERSION} + COMPILER ${Tensile_COMPILER} + LIBRARY_FORMAT ${Tensile_LIBRARY_FORMAT} + CPU_THREADS ${Tensile_CPU_THREADS} + ${Tensile_Options} + ) + else() + TensileCreateLibraryFiles( + "${CMAKE_CURRENT_SOURCE_DIR}/blas3/Tensile/Logic/${Tensile_LOGIC}" + "${PROJECT_BINARY_DIR}/Tensile" + ARCHITECTURE ${Tensile_ARCHITECTURE} + CODE_OBJECT_VERSION ${Tensile_CODE_OBJECT_VERSION} + COMPILER ${Tensile_COMPILER} + LIBRARY_FORMAT ${Tensile_LIBRARY_FORMAT} + ${Tensile_Options} + ) + endif() # Create a unique name for TensileHost compiled for rocBLAS set_target_properties( TensileHost PROPERTIES OUTPUT_NAME rocblas-tensile CXX_EXTENSIONS NO )