Repository navigation
ci(rocjitsu): Add missing dependencies on executables - #10960
amd-eochoalo merged 3 commits into
Conversation
❌ PR Check — Action Required
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🚫 Please fix the failed policies before requesting reviews. The following policy checks failed:
The |
atgutier
left a comment
There was a problem hiding this comment.
[MAJOR] emulation/rocjitsu/tests/CMakeLists.txt:1815 — Configure-time KFD permissions can
permanently remove hardware tests
Reasoning: The new AND RJ_HAS_KFD_ACCESS prevents rocm_agent_enumerator from running whenever the
machine performing CMake configuration cannot access /dev/kfd. That conflates target discovery with
permission to execute tests on the configure host.
rocm_agent_enumerator intentionally supports several discovery paths that do not require KFD access:
ROCM_TARGET_LST, a colocated target.lst, sysfs topology, and PCI enumeration. The first two are
explicitly intended for sandboxed and containerized build environments.
When enumeration is skipped, every HAS_*_GPU variable remains false, so the conditional
rj_add_test() calls around lines 1910, 1921, 1941, 2084, 2250, 2442, and 2923 are never executed.
Because rj_add_test() also creates installed CTest entries only when called (tests/
CMakeLists.txt:216-308), a package configured without KFD access permanently omits those tests—even
if it is later installed and tested on a GPU worker with full access.
Evidence:
-
projects/rocminfo/rocm_agent_enumerator:127-144,263-303 performs non-KFD discovery before falling
back to rocminfo. -
projects/rocminfo/README.md:34-44 documents ROCM_TARGET_LST and target.lst specifically for
sandbox/container environments. -
The new condition at tests/CMakeLists.txt:1815 bypasses all those paths.
-
Many affected registrations supply INSTALL_COMMAND, so this changes the installed test manifest as
well as the current build tree.
Suggested fix: Keep architecture discovery independent of /dev/kfd accessibility. Register the
applicable hardware tests based on discovered or explicitly supplied targets, then check KFD access
at test execution time and return a CTest skip result when it is unavailable. If build-tree and
installed-test behavior must differ, separate their registration paths.
Confidence: high. The remaining environmental question is which current CI/package flows configure
and execute on different hosts, but the supported installed-test and ROCM_TARGET_LST workflows are
unambiguously affected.
[MINOR] emulation/rocjitsu/tests/CMakeLists.txt:1065 — The access check misses the earlier gfx1201
hardware-test gate
Reasoning: RJ_HAS_GFX1201_GPU is still derived solely from readable sysfs topology and does not
incorporate the newly computed RJ_HAS_KFD_ACCESS. On a gfx1201 system where topology is visible
but /dev/kfd is not accessible, the six DbtGuestRocminfoTest.* cases under line 1680 remain
registered.
Those tests use guest_gfx950_on_gfx1201.json, which enables hardware-backed DBT guest mode. GuestKfd
then opens the real device with openat(..., "/dev/kfd", O_RDWR | O_CLOEXEC, ...) at
guest_kfd.cpp:587; an access failure propagates through initialization. rocminfo_test.cpp:156-159
treats the resulting nonzero process exit as a test failure rather than a skip.
Suggested fix: Include these earlier gfx1201 registrations in the runtime-access gating described
above. As a smaller immediate fix, require both RJ_HAS_GFX1201_GPU and RJ_HAS_KFD_ACCESS at line
1680.
Confidence: high. The trigger is the common configuration where KFD topology is world-readable but
the device node is unavailable to the current user.
RattataKing
left a comment
There was a problem hiding this comment.
Adding missing deps of ${AMDCXX} and ${CLANG_OFFLOAD_BUNDLER} looks correct to me
This reverts commit 16c270c.
|
@atgutier I removed the code about kfd access, just adding missing dependencies. |
TheRock Submodule Bump ActivityNewest first
|
Motivation
Making rocjitsu tests more portable across different versions of amdclang.
Technical Details
When switching between different nightly builds, tests compiled with amdclang may not be recompiled unless there is a strict dependency.
From the CMake documentation:
Issue Tracking
N/A.
Test Plan
Test on CI.
Test Result
Tests pass on CI.
Submission Checklist