feat(hip-directed): add hip_directed catch2 e2e tests - #57
Conversation
Local validation — quanta MI325 (gfx942), ROCm
|
CI validation — e2e-tests.yml on
|
Port the hip_directed catch2 directed-unit-test suite into the public rocm-tests framework. Clones public ROCm/rocm-systems, builds only the catch2 executables that hold the directed tests (DeviceTest, StreamTest, MemoryTest1, ModuleTest) and runs a curated set of directed Unit_hip* tests via ctest -R (13 rows). Build notes: - Builds just the needed executables (not the whole build_tests meta-target), which skips modules like coopGrpTest that need bleeding-edge HIP headers and keeps the build fast. - Limits GPU visibility during the build so rocm_agent_enumerator returns a single arch (multi-GPU hosts otherwise duplicate --offload-arch -> clang- offload-bundler Duplicate targets). Validated 13/13 on gfx942 (MI325).
Read <rock_dir>/share/therock/therock_manifest.json and clone hip-tests at the rocm-systems pin_sha the installed ROCm was built from (env override + develop fallback). Keeps catch2 source in sync with installed HIP headers. Drop hipModuleLoadFatBinary: its positive test loads build-generated .code fatbins from ALL custom targets not built by the scoped executable build.
…h, bundled numa) - compiler_mode=cxx_hip so CMAKE_HIP_COMPILER is the ROCm clang++ (device libs). - Pin CMAKE_HIP_ARCHITECTURES so the ABI check does not duplicate --offload-arch per GPU via rocm_agent_enumerator on multi-GPU runners. - Resolve libnuma + numa.h from the ROCm-bundled lib/rocm_sysdeps (no host apt); MemoryTest1 loads librocm_sysdeps_numa.so.1 via LD_LIBRARY_PATH. Validated: 12/12 on quanta MI325 and in e2e CI on linux-gfx94x-MI325.
3daad92 to
6a6e66a
Compare
Summary
Ports the
hip_directedcatch2 directed-unit-test suite into the publicrocm-testsframework, mirroring the qa-forgerocm-func-core-hip-catch2-amd/ Rocmtesthip_directedrun.tests/e2e/hip_directed/area (category profile:hw.gpu,layer.runtime,ci.nightly,e2e.stack,os.linux).ROCm/rocm-systemsatdevelop(overridable viaROCM_TEST_ROCM_SYSTEMS_REF), buildsprojects/hip-tests/catch, and runs a curated set of directedUnit_hip*tests viactest -R(13 parametrized rows).tests/e2e/hip_directed/to thee2e-tests.ymlpytest dir list so nightly CI collects it.Directed tests (13)
hipSetValidDevices,hipGetDriverEntryPoint,hipStreamGetId,hipStreamSetAttribute,hipStreamGetAttribute,hipMemPrefetchAsync_v2,hipMemAdvise_v2,hipModuleGetFunctionCount,hipModuleLoadFatBinary,hipMemcpy3DBatchAsync,hipMemcpy3DPeer,hipMemcpyBatchAsync,hipMemsetD2D.Build design
DeviceTest,StreamTest,MemoryTest1,ModuleTest— instead of the wholebuild_testsmeta-target. This skips modules likecoopGrpTest(which need bleeding-edge HIP headers not in every ROCm install) and keeps the build to seconds instead of the full ~4095-test build.ROCR_VISIBLE_DEVICES=0): catch2's CMake auto-detects the offload arch viarocm_agent_enumerator, which returns one entry per visible GPU — on multi-GPU hosts that duplicates--offload-archand tripsclang-offload-bundler: Duplicate targets. A single visible device yields one arch.Test plan
Validated on MI325X (gfx942):
pytest tests/e2e/hip_directed/ --rock-dir <rocm> --gpu-arch gfx942 -q--collect-onlyshows 13 testsruff+black