Adding simple HIP Tests, with a simple saxpy.cpp example.
Share the macros using cmake modules with CUDA.
Details
Diff Detail
- Repository
- rT test-suite
Event Timeline
Thanks for putting this together.
if i knew anything about buildbots i would approve it.
but best to defer to an expert.
I've added @beanz as the reviewer who has more cmake know-how.
I'm glad to see HIP support being added to the testsuite. I don't know what your plans are for bringing up an LLVM build/test bot for HIP. If you want, I could probably run a compile-only HIP bot on one of the VMs that run CUDA bots.
cmake/modules/Variant.cmake | ||
---|---|---|
18 | This could use further generalization for ".hip" files. | |
49 | Shared files probably should not rely on variables set somewhere else. Offload should probably be a parameter. If we have to keep some parameters as external variables, at the very least such dependencies on external variables must be clearly documented. |
We are planning to add a hip buildbot to test both compilation and execution using various ROCm installations. This allows us to further add tests and experiment with buildbots, and may add OpenMP AMDGPU target.
cmake/modules/Variant.cmake | ||
---|---|---|
18 | Thanks, adding .hip. | |
49 | Thanks, adding these Variant* variables as parameters, and added some comments about the input and outputs of the macro. |
LGTM overall.
cmake/modules/Variant.cmake | ||
---|---|---|
3 | Maybe we should rename the file to GPUTestVariant to reflect its purpose better. I'd also add a brief description here describing that it provides common functions/macros for External/{CUDA,HIP}. | |
49 | Another thing you may consider is whether it would make sense to switch from macros to functions. Perhaps we could make the macro a private one and instead provide a function using that macro as the public interface. |
LGTM.
cmake/modules/Variant.cmake | ||
---|---|---|
49 |
SGTM. |
Tagging @jdoerfert as HIP CI may be of interest. I wonder if an openmp directory added here could be persuaded to run on nvptx or amdgpu hardware, based on what happens to be in the bot.
Great question! Multiple pieces to the answer so here's a table for the current status.
'hsa' here refers to rocr plus roct which then only needs the linux kernel. Both are easily built via cmake.
'cuda' refers to various pieces of nvidia's toolchain, I'm not clear how the pieces are delimited.
nvptx device | amdgpu device | nvptx host | amdgpu host | |
build | none | none | cuda (optional) | hsa (required) |
execute | cuda | none | cuda | hsa |
The host code also uses a few common linux libraries - libelf, libnuma. In the future amdgpu
openmp execution is expected to depend on math functions from rocm-ocml. Doesn't yet.
Build time dependencies can and probably will be reduced to zero required. Runtime can't be
quite so good because there's a kernel level driver in the stack and llvm doesn't bundle libc.
Maybe we should rename the file to GPUTestVariant to reflect its purpose better.
I'd also add a brief description here describing that it provides common functions/macros for External/{CUDA,HIP}.