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

Add automation for producing artifact slices. #37

Merged
merged 3 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
12 changes: 7 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(CMakeDependentOption)
include(ExternalProject)
include(therock_amdgpu_targets)
include(therock_artifacts)
include(therock_subproject)
include(therock_job_pools)

Expand Down Expand Up @@ -83,22 +84,22 @@ configure_file(HIP_VERSION.in ${ROCM_GIT_DIR}/HIP/VERSION)

set(STAGING_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/staging_install")

################################################################################
# External project setup
################################################################################

# On some distributions, this will install to lib64. We would like
# consistency in built packages, so hard-code it.
set(CMAKE_INSTALL_LIBDIR "lib")


if(CMAKE_C_VISIBILITY_PRESET)
list(APPEND DEFAULT_CMAKE_ARGS ${CMAKE_C_VISIBILITY_PRESET})
endif()
if(CMAKE_CXX_VISIBILITY_PRESET)
list(APPEND DEFAULT_CMAKE_ARGS ${CMAKE_CXX_VISIBILITY_PRESET})
endif()


################################################################################
# External project setup
################################################################################

# Add subdirectories in dependency DAG order (which happens to be semi-alpha:
# don't be fooled).
add_subdirectory(third-party)
Expand All @@ -113,6 +114,7 @@ if(THEROCK_ENABLE_ML_FRAMEWORKS)
add_subdirectory(ml-frameworks)
endif()


# ################################################################################
# # Testing
# ################################################################################
Expand Down
22 changes: 22 additions & 0 deletions base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,25 @@ therock_cmake_subproject_glob_c_sources(rocm-half
include
)
therock_cmake_subproject_activate(rocm-half)


################################################################################
# Artifacts
################################################################################

therock_provide_artifact(base
TARGET_NEUTRAL
DESCRIPTOR artifact.toml
COMPONENTS
run
dev
dbg
doc
test
SUBPROJECT_DEPS
rocm-cmake
rocm-core
rocm_smi_lib
Comment on lines +99 to +102
Copy link
Member

Choose a reason for hiding this comment

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

For Windows support (#36), it would help to make some of these deps optional. For example, I don't expect rocm_smi_lib (or the successor project, https://github.com/ROCm/amdsmi) to compile on Windows.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, we probably need some loose cmake to make some of them conditional as something like:

set(optional_artifact_deps)
if(NOT WIN32)
  list(APPEND optional_artifact_deps rocm_smi_lib)
endif()

...
  SUBPROJECT_DEPS
    ${optional_artifact_deps}

Could try to make it more automagical, but for this stuff, I generally prefer the readability of loose branchiness.

rocprofiler-register
rocm-half
)
35 changes: 35 additions & 0 deletions base/artifact.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# half
[components.dev."base/half/stage"]
[components.doc."base/half/stage"]

# rocm_smi_lib
[components.dev."base/rocm_smi_lib/stage"]
[components.doc."base/rocm_smi_lib/stage"]
[components.run."base/rocm_smi_lib/stage"]
include = [
"bin/**",
"libexec/**",
]

# rocm-cmake
[components.dev."base/rocm-cmake/stage"]
[components.doc."base/rocm-cmake/stage"]

# rocm-core
[components.dev."base/rocm-core/stage"]
include = "include/**"
[components.doc."base/rocm-core/stage"]
[components.run."base/rocm-core/stage"]
include = [
"libexec/**",
"lib/rocmmod",
]

# rocprofiler-register
[components.dev."base/rocprofiler-register/stage"]
[components.doc."base/rocprofiler-register/stage"]
[components.run."base/rocprofiler-register/stage"]
[components.test."base/rocprofiler-register/stage"]
include = [
"share/rocprofiler-register/tests/**",
]
Loading