Skip to content

Commit

Permalink
Preliminary support for the base component on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottTodd committed Feb 6, 2025
1 parent 7ba9eba commit 51e938a
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 11 deletions.
21 changes: 13 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,19 @@ endif()
# don't be fooled).
add_subdirectory(third-party)
add_subdirectory(base)
add_subdirectory(compiler)
add_subdirectory(core)
add_subdirectory(comm-libs)
if(THEROCK_ENABLE_MATH_LIBS)
add_subdirectory(math-libs)
endif()
if(THEROCK_ENABLE_ML_LIBS)
add_subdirectory(ml-libs)

if(NOT WIN32)
add_subdirectory(compiler)
add_subdirectory(core)
add_subdirectory(comm-libs)
if(THEROCK_ENABLE_MATH_LIBS)
add_subdirectory(math-libs)
endif()
if(THEROCK_ENABLE_ML_LIBS)
add_subdirectory(ml-libs)
endif()
else()
# TODO(#36): Enable more project builds on Windows and/or make the full list configurable.
endif()


Expand Down
26 changes: 23 additions & 3 deletions base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,16 @@ therock_cmake_subproject_activate(rocm-cmake)
# rocm-core
################################################################################

if(WIN32)
set(_shared_libs_arg "OFF")
else()
set(_shared_libs_arg "ON")
endif()

therock_cmake_subproject_declare(rocm-core
EXTERNAL_SOURCE_DIR "rocm-core"
CMAKE_ARGS
"-DBUILD_SHARED_LIBS=ON"
"-DBUILD_SHARED_LIBS=${_shared_libs_arg}"
"-DROCM_VERSION=${ROCM_MAJOR_VERSION}.${ROCM_MINOR_VERSION}.${ROCM_PATCH_VERSION}"
)
therock_cmake_subproject_glob_c_sources(rocm-core
Expand All @@ -33,6 +39,8 @@ therock_cmake_subproject_activate(rocm-core)
# rocm_smi_lib
################################################################################

if(NOT WIN32) # TODO(#36): Enable on Windows and/or make subproject inclusion generally optional

therock_cmake_subproject_declare(rocm_smi_lib
EXTERNAL_SOURCE_DIR "rocm_smi_lib"
INTERFACE_LINK_DIRS
Expand All @@ -46,12 +54,16 @@ therock_cmake_subproject_glob_c_sources(rocm_smi_lib
therock_cmake_subproject_provide_package(rocm_smi_lib rocm_smi lib/cmake/rocm_smi)
therock_cmake_subproject_activate(rocm_smi_lib)

endif()


################################################################################
# rocprofiler-register
# This is a stub that helps runtime libraries and profiles rendezvous
################################################################################

if(NOT WIN32) # TODO(#36): Enable on Windows and/or make subproject inclusion generally optional

therock_cmake_subproject_declare(rocprofiler-register
EXTERNAL_SOURCE_DIR "rocprofiler-register"
INTERFACE_LINK_DIRS
Expand All @@ -66,6 +78,8 @@ therock_cmake_subproject_provide_package(rocprofiler-register
rocprofiler-register lib/cmake/rocprofiler-register)
therock_cmake_subproject_activate(rocprofiler-register)

endif()


################################################################################
# rocm-half
Expand All @@ -87,6 +101,13 @@ therock_cmake_subproject_activate(rocm-half)
# Artifacts
################################################################################

set(_optional_subproject_deps)
if(NOT WIN32)
# TODO(#36): Enable on Windows and/or make subproject inclusion generally optional
list(APPEND _optional_subproject_deps rocm_smi_lib)
list(APPEND _optional_subproject_deps rocprofiler-register)
endif()

therock_provide_artifact(base
TARGET_NEUTRAL
DESCRIPTOR artifact.toml
Expand All @@ -98,9 +119,8 @@ therock_provide_artifact(base
run
test
SUBPROJECT_DEPS
${_optional_subproject_deps}
rocm-cmake
rocm-core
rocm_smi_lib
rocprofiler-register
rocm-half
)

0 comments on commit 51e938a

Please sign in to comment.