Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build system improvements #1597

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

ellosel
Copy link
Contributor

@ellosel ellosel commented Jan 24, 2025

The hipblaslt build system was inherited from rocblas. However, the physical design of the project is different. In particular, tensile is embedded in hipblalt, rather than being a separate project. Nevertheless, all of the machinery to install tensile into a python virtual environment is still in the hipblaslt build system. This has several consequences:

  • Changes to Tensile source files are not observable by the build system so when making a change and attempting to rebuild make is unable to detect that anything changes.
  • The Tensile source files consumed by the hipblaslt build system are those installed into the virtual environment so after making a change to Tensile one must force a reconfigure and build which currently requires completely rebuilding the tensile gemm libraries and the cpp interface which is very time consuming.
  • The behavior of the build system is not conventional so users with idomatic CMake experience are confused or surprised.

This PR reconciles these issues by taking initial steps to properly include tensile into the hipblaslt build system. To begin, Tensile is no longer pip installed through the execute_process API. Rather, we use and add_subdirectory call which ensures that source file changes in Tensile are observable and executing make in the build directory will retrigger a rebuild of the necessary targets. Further, ALL is removed from the custom target for generating the gemm libraries with TensileCrateLibrary so that they are no longer unconditionally rebuilt every time make is executed. These changes will significantly reduce build times for developers that are only working on the cpp interfaces in hipblaslt.

In addition, we made some changes to source files to resolve compiler warnings.

We will include documentation updates for building hipblaslt.

@ellosel ellosel self-assigned this Jan 24, 2025
@@ -26,7 +26,7 @@ function(virtualenv_create)
endfunction()

function(virtualenv_install)
virtualenv_create()
virtualenv_create()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

restore whitespace

@@ -82,7 +82,7 @@ include(cmake/Dependencies.cmake)

# Append our library helper cmake path and the cmake path for hip (for convenience)
# Users may override HIP path by specifying their own in CMAKE_MODULE_PATH
list( APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${ROCM_PATH}/lib/cmake/hip /opt/rocm/lib/cmake/hip ${HIP_PATH}/cmake )
list( APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${ROCM_PATH}/lib/cmake/hip /opt/rocm/lib/cmake/hip ${HIP_PATH}/cmake ${CMAKE_CURRENT_SOURCE_DIR}/tensilelite/Tensile/cmake)

Choose a reason for hiding this comment

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

lets not include /opt/rocm anywhere. It will cause hard fails but it is easy to fix.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In what way does it cause a hard failure?

@@ -153,12 +153,11 @@ if (LINK_BLIS)
endif()

if (USE_CUDA)
find_package( CUDA REQUIRED )
find_package( CUDA REQUIRED )

Choose a reason for hiding this comment

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

whitespace change ?

@solaslin solaslin added the noCI Disable testing on supported CI systems: math libraries CI has this feature enabled.. label Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
noCI Disable testing on supported CI systems: math libraries CI has this feature enabled..
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants