[tests] Generalize alpaka tests over backends and implement the hip build - #55
Draft
harz05 wants to merge 1 commit into
Draft
[tests] Generalize alpaka tests over backends and implement the hip build#55harz05 wants to merge 1 commit into
harz05 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The alpaka tests were hardcoded for the CUDA backend even though the generated code and the CMake
ALPAKA_BACKENDoption are already backend-agnostic. This PR makes the test sources compile for any alpaka backend and also wires the hip build.Changes
test/alpaka/TestAlpakaCommon.h: the accelerator tag (TestTag) is now picked from theALPAKA_ACC_GPU_*_ENABLEDmacro the build defines, and the fixture types (TestAcc,TestDev,TestQueue) derive from it viaalpaka::TagToAcc. Removed thecuda_runtime.hinclude and an unusednvml.hinclude.Session<alpaka::TagGpuCudaRt>becomesSession<TestTag>, andcudaDeviceSynchronize()becomesalpaka::wait(device). The device-wide wait is kept rather than removed because the generated Session owns its own queue, so waiting on the test queue alone is not enough.test/CMakeLists.txt: the source list and target definition are shared across backends, with only the toolchain, flags and libraries selected per backend.ALPAKA_BACKEND=hipnow builds aTestCustomModelsFromONNXForAlpakaHiptarget (LANGUAGE HIP, linkshipblaslt hipblas amdhip64) instead of failing with "not implemented". The cuda build is unchanged: same target name, flags and libraries as before.Test names are unchanged, so existing CI and logs stay comparable. The cpu and sycl stubs are left as they were.
Testing