Skip to content
Open
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
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@
url = https://github.com/ROCm/SPIRV-LLVM-Translator.git
branch = amd-mainline
[submodule "amdsmi"]
path = base/amdsmi
path = core/amdsmi
url = https://github.com/ROCm/amdsmi.git
branch = amd-staging
28 changes: 0 additions & 28 deletions base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,33 +52,6 @@ therock_cmake_subproject_provide_package(rocm-core rocm-core lib/cmake/rocm-core
therock_cmake_subproject_activate(rocm-core)


################################################################################
# amdsmi
################################################################################

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

therock_cmake_subproject_declare(amdsmi
EXTERNAL_SOURCE_DIR "amdsmi"
USE_DIST_AMDGPU_TARGETS
BACKGROUND_BUILD
CMAKE_ARGS
# TODO: Enable tests
# -DBUILD_TESTS=${THEROCK_BUILD_TESTING}
"-DCMAKE_VERBOSE_MAKEFILE=OFF"
BUILD_DEPS
therock-googletest
RUNTIME_DEPS
rocm-core
${THEROCK_BUNDLED_LIBDRM}
)
therock_cmake_subproject_provide_package(amdsmi
amd_smi lib/cmake)
therock_cmake_subproject_activate(amdsmi)

endif()


################################################################################
# rocm_smi_lib
################################################################################
Expand Down Expand Up @@ -172,7 +145,6 @@ therock_cmake_subproject_activate(rocm-half)
set(_optional_subproject_deps)
if(NOT WIN32)
# TODO(#36): Enable on Windows and/or make subproject inclusion generally optional
list(APPEND _optional_subproject_deps amdsmi)
list(APPEND _optional_subproject_deps rocm_smi_lib)
list(APPEND _optional_subproject_deps rocprofiler-register)
endif()
Expand Down
16 changes: 0 additions & 16 deletions base/artifact.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,6 @@
[components.dev."base/half/stage"]
[components.doc."base/half/stage"]

# amdsmi
[components.dbg."base/amdsmi/stage"]
optional = "windows"
[components.dev."base/amdsmi/stage"]
optional = "windows"
[components.doc."base/amdsmi/stage"]
optional = "windows"
[components.lib."base/amdsmi/stage"]
optional = "windows"
[components.run."base/amdsmi/stage"]
optional = "windows"
include = [
"bin/**",
"libexec/**",
"share/amd_smi/**",
]

# rocm_smi_lib
[components.dbg."base/rocm_smi_lib/stage"]
Expand Down
43 changes: 43 additions & 0 deletions core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,36 @@ if(THEROCK_ENABLE_CORE_RUNTIME)
set(_system_toolchain "")
endif()


################################################################################
# amdsmi
################################################################################

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

therock_cmake_subproject_declare(amdsmi
EXTERNAL_SOURCE_DIR "amdsmi"
USE_DIST_AMDGPU_TARGETS
BACKGROUND_BUILD
COMPILER_TOOLCHAIN
"${_system_toolchain}"
CMAKE_ARGS
# TODO: Enable tests
# -DBUILD_TESTS=${THEROCK_BUILD_TESTING}
"-DCMAKE_VERBOSE_MAKEFILE=OFF"
BUILD_DEPS
therock-googletest
RUNTIME_DEPS
rocm-core
${THEROCK_BUNDLED_LIBDRM}
)
therock_cmake_subproject_provide_package(amdsmi
amd_smi lib/cmake)
therock_cmake_subproject_activate(amdsmi)

endif()


##############################################################################
# ROCR-Runtime
##############################################################################
Expand Down Expand Up @@ -81,6 +111,19 @@ if(THEROCK_ENABLE_CORE_RUNTIME)
rocminfo
)

therock_provide_artifact(amdsmi
TARGET_NEUTRAL
DESCRIPTOR artifact-amdsmi.toml
COMPONENTS
dbg
dev
doc
lib
run
SUBPROJECT_DEPS
amdsmi
)

endif(THEROCK_ENABLE_CORE_RUNTIME)

if(THEROCK_ENABLE_HIP_RUNTIME)
Expand Down
Copy link
Member

Choose a reason for hiding this comment

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

I'm not opposed to the move, but moving submodules around is annoying/messy. Any reason why amdsmi isn't in rocm-systems yet? Doing that first would be the logical first step.

Is amdsmi migrated now? I see it in https://github.com/ROCm/rocm-systems/tree/develop/projects/amdsmi, but https://github.com/ROCm/rocm-systems/?tab=readme-ov-file#super-repo-status-and-ci-health still lists it as "pending".

I also see that our rocm-systems submodule in TheRock has some sources for amdsmi. Can we first switch the existing amdsmi subproject to the new source and then proceed with this PR?

  1. Delete the amdsmi submodule
  2. Point this code at ${THEROCK_ROCM_SYSTEMS_SOURCE_DIR}/projects/amdsmi:
    EXTERNAL_SOURCE_DIR "amdsmi"
  3. Send that as one PR
  4. Rebase this PR after that

21 changes: 21 additions & 0 deletions core/artifact-amdsmi.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# amdsmi core artifact

[components.dbg."core/amdsmi/stage"]
optional = "windows"

[components.dev."core/amdsmi/stage"]
optional = "windows"

[components.doc."core/amdsmi/stage"]
optional = "windows"

[components.lib."core/amdsmi/stage"]
optional = "windows"

[components.run."core/amdsmi/stage"]
optional = "windows"
include = [
"bin/**",
"libexec/**",
"share/amd_smi/**",
]
1 change: 1 addition & 0 deletions docs/development/artifacts.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ These artifacts are built if any project features requiring them are enabled:

### Core Artifacts

- `amdsmi`: AMD System Management Interface library, packaged as a standalone core artifact.
- `base`: Base ROCM tools and structural components. ROCM sub-projects that do not depend on anything outside of this set are included here so that everything can depend on them.
- `core-runtime`: Low level runtime components used for interfacing with kernel drivers.
- `core-hip`: HIP runtime, compiler interface, and build tools.
Expand Down
2 changes: 1 addition & 1 deletion docs/development/windows_support.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ mainline, in open source, using MSVC, etc.).
| Component subset | Subproject | Supported | Notes |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------ | --------- | --------------------------------------------- |
| base | aux-overlay | ✅ | |
| base | [amdsmi](https://github.com/ROCm/amdsmi) | ❌ | Unsupported |
| base | [rocm-cmake](https://github.com/ROCm/rocm-cmake) | ✅ | |
| base | [rocm-core](https://github.com/ROCm/rocm-core) | ✅ | |
| base | [rocm_smi_lib](https://github.com/ROCm/rocm_smi_lib) | ❌ | Unsupported |
Expand All @@ -38,6 +37,7 @@ mainline, in open source, using MSVC, etc.).
| compiler | [hipcc](https://github.com/ROCm/llvm-project/tree/amd-staging/amd/hipcc) | ✅ | |
| compiler | [hipify](https://github.com/ROCm/HIPIFY) | ✅ | |
| | | | |
| core | [amdsmi](https://github.com/ROCm/amdsmi) | ❌ | Unsupported |
| core | [ROCR-Runtime](https://github.com/ROCm/ROCR-Runtime) | ❌ | Unsupported |
| core | [rocminfo](https://github.com/ROCm/rocminfo) | ❌ | Unsupported |
| core | [hipInfo from hip-tests](https://github.com/ROCm/hip-tests) | ✅ | |
Expand Down
Loading