-
Notifications
You must be signed in to change notification settings - Fork 277
(feat): [AILIKFD-40] add kfdtest to TheRock CI #6334
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -632,3 +632,63 @@ if(THEROCK_BUILD_TESTING AND THEROCK_ENABLE_CORE_RUNTIME_TESTS) | |
| rocrtst | ||
| ) | ||
| endif(THEROCK_BUILD_TESTING AND THEROCK_ENABLE_CORE_RUNTIME_TESTS) | ||
|
|
||
| if(THEROCK_BUILD_TESTING AND THEROCK_ENABLE_CORE_KFDTESTS) | ||
|
|
||
| # kfdtest statically links libhsakmt and LLVM (AMDGPUAsmParser, Core, Support). | ||
| # It needs LLVM headers at build time and libhsakmt.a for linking. | ||
| set(_kfdtest_build_deps | ||
| amd-llvm | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why include amd-llvm in both BUILD_DEPS and RUNTIME_DEPS? |
||
| ROCR-Runtime | ||
| therock-yaml-cpp | ||
| ) | ||
|
|
||
| # Get the ROCR-Runtime binary directory to locate libhsakmt | ||
| get_target_property(_rocr_binary_dir ROCR-Runtime THEROCK_BINARY_DIR) | ||
|
|
||
| therock_cmake_subproject_declare(kfdtest | ||
| USE_TEST_AMDGPU_TARGETS | ||
| EXTERNAL_SOURCE_DIR "${THEROCK_ROCM_SYSTEMS_SOURCE_DIR}/projects/rocr-runtime/libhsakmt/tests/kfdtest" | ||
| BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/kfdtest" | ||
| BACKGROUND_BUILD | ||
| CMAKE_ARGS | ||
| "-DCMAKE_PREFIX_PATH=" | ||
| "-DLLVM_DIR=" | ||
| "-DROCM_DIR=" | ||
| "-DLIBHSAKMT_PATH=${_rocr_binary_dir}/libhsakmt" | ||
| "-DCMAKE_EXE_LINKER_FLAGS=-ldl" | ||
| "-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON" | ||
|
Comment on lines
+655
to
+660
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The fact we need to pass some of these flags seems to point towards kfdtest's build system having to be reworked prior to integrating into TheRock. We should really not be passing things like CMAKE_EXE_LINKER_FLAGS, LIBHSAKMT_PATH, LLVM_DIR, ROCM_DIR and CMAKE_PREFIX_PATH. KFDtest's build system should be able to figure all of these out on its own instead of having this fragile mechanism of passing CMAKE_ARGS. |
||
| COMPILER_TOOLCHAIN | ||
| "${_system_toolchain}" | ||
| BUILD_DEPS | ||
| ${_kfdtest_build_deps} | ||
| RUNTIME_DEPS | ||
| amd-llvm | ||
| ${THEROCK_BUNDLED_LIBDRM} | ||
| ${THEROCK_BUNDLED_NUMACTL} | ||
| ${THEROCK_BUNDLED_ZLIB} | ||
| ${THEROCK_BUNDLED_ZSTD} | ||
| INTERFACE_LINK_DIRS | ||
| "lib" | ||
| "lib/rocm_sysdeps/lib" | ||
| INTERFACE_INSTALL_RPATH_DIRS | ||
| "lib" | ||
| "lib/rocm_sysdeps/lib" | ||
| ) | ||
| therock_cmake_subproject_glob_c_sources(kfdtest SUBDIRS .) | ||
| therock_cmake_subproject_activate(kfdtest) | ||
|
|
||
| therock_provide_artifact(kfdtest | ||
| TARGET_NEUTRAL | ||
| DESCRIPTOR artifact-core-kfdtest.toml | ||
| COMPONENTS | ||
| dbg | ||
| dev | ||
| doc | ||
| lib | ||
| run | ||
| test | ||
| SUBPROJECT_DEPS | ||
| kfdtest | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't this depend on anything else other than itself? |
||
| ) | ||
| endif(THEROCK_BUILD_TESTING AND THEROCK_ENABLE_CORE_KFDTESTS) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # kfdtest | ||
| [components.run."core/kfdtest/stage"] | ||
| exclude = [ | ||
| "bin/**", | ||
| "share/kfdtest/**", | ||
| ] | ||
| [components.dbg."core/kfdtest/stage"] | ||
| [components.dev."core/kfdtest/stage"] | ||
| [components.doc."core/kfdtest/stage"] | ||
| [components.test."core/kfdtest/stage"] | ||
|
Comment on lines
+7
to
+10
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are these artifact categories being used at all? |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make it sorted alphabetically as the other entries seem to be.