[LLVM Test Suite] Adds run script for simple HIP tests#1973
[LLVM Test Suite] Adds run script for simple HIP tests#1973jplehr wants to merge 5 commits intoROCm:aomp-devfrom
Conversation
This enables to automatically run the simple HIP tests from the LLVM test suite.
Kewen12
left a comment
There was a problem hiding this comment.
lgtm!
It would be helpful if we could document the usage of this script.
|
What sort of documentation would you like to see? A more general statement about what these I personally feel that the help text that this script produces is helpful enough, when you know what it is meant to achieve in general. But, of course, I cannot speak for others. |
Just a general guidance about this script? like what it does or when people should run it, etc. |
| echo "Using AOMP installation for HIP tests: ${ROCM_FOR_TESTS}" | ||
| else | ||
| # Fallback to system ROCm if AOMP doesn't have HIP libraries | ||
| : "${ROCM:=/opt/rocm}" |
There was a problem hiding this comment.
nit: Would have expected this at the top, with the other defaults.
(If yes, I'd also adapt the help message to actually print that var.)
| if [ ! -d "${LLVMTS_EXTERNAL_DIR}" ]; then | ||
| mkdir -p "${LLVMTS_EXTERNAL_DIR}" | ||
| fi |
There was a problem hiding this comment.
nit: This is redundant. mkdir -p "${LLVMTS_EXTERNAL_DIR}/hip" is performed later and there's no check in-between.
Remove?
| mkdir -p "${LLVMTS_EXTERNAL_DIR}" | ||
| fi | ||
|
|
||
| # Create hip subdirectory and symlink to ROCm installation |
There was a problem hiding this comment.
Q: What symlink? I guess ${ROCM_LINK} -> ${ROCM_FOR_TESTS}
Maybe move directly above the symlink creation? There's no usage until that or success check anyways.
| ROCM_VERSION_FILE=$(dpkg -l rocm-core | grep rocm-core | awk '{print $3}' | cut -d- -f1) | ||
| else | ||
| # Default fallback version | ||
| ROCM_VERSION_FILE="6.0.0" |
There was a problem hiding this comment.
nit: Would have expected this at the top, with the other defaults.
But on the other hand this behaves differently from : "${ROCM_VERSION_FILE:=6.0.0}"
That makes sense to me, but we need to be careful how specific that information is. Currently, I would not exactly know how to use this and e.g. consult: https://llvm.org/docs/TestSuiteGuide.html |
Enables running the LLVM Test Suite External HIP simple tests.
The tests are a handful of simple HIP applications. We run these tests also in the upstream buildbots.
Eventually, we want to make this be able to run all of the HIP tests.