Added option to build only tests and link to an external rocshmem library (#43)

* Rearrange CMakefile

* Enable linking to external rocshmem library

* Minor fix for the functional test driver

* ROCSHMEM_HOME detection fixed
This commit is contained in:
Yiltan
2025-03-13 15:49:50 -04:00
committed by GitHub
parent eb5a38e806
commit 96424a59a8
7 changed files with 321 additions and 191 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ cmake \
-DUSE_WF_COAL=OFF \
-DUSE_SINGLE_NODE=ON \
-DUSE_HOST_SIDE_HDP_FLUSH=OFF \
-DBUILD_LOCAL_GPU_TARGET_ONLY=ON \
-DBUILD_LOCAL_GPU_TARGET_ONLY=OFF \
$src_path
cmake --build . --parallel 8
cmake --install .
+37
View File
@@ -0,0 +1,37 @@
#!/bin/bash
# Copyright (c) 2024 Advanced Micro Devices, Inc. All rights reserved.
set -e
if [ -z $1 ]
then
install_path=~/rocshmem
else
install_path=$1
fi
if [ -z $1 ] && [ -z $ROCSHMEM_HOME ]
then
export ROCSHMEM_HOME=/opt/rocm/
fi
src_path=$(dirname "$(realpath $0)")/../../
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$install_path \
-DCMAKE_VERBOSE_MAKEFILE=OFF \
-DDEBUG=OFF \
-DPROFILE=OFF \
-DUSE_GPU_IB=OFF \
-DUSE_RO=OFF \
-DUSE_DC=OFF \
-DUSE_IPC=ON \
-DUSE_COHERENT_HEAP=ON \
-DUSE_THREADS=OFF \
-DUSE_WF_COAL=OFF \
-DUSE_SINGLE_NODE=ON \
-DUSE_HOST_SIDE_HDP_FLUSH=OFF \
-DBUILD_LOCAL_GPU_TARGET_ONLY=OFF \
-DBUILD_TESTS_ONLY=ON \
$src_path
cmake --build . --parallel 8
+12 -3
View File
@@ -322,9 +322,9 @@ TestOther() {
ValidateInput() {
INPUT_COUNT=$1
if [ $INPUT_COUNT -eq 0 ] ; then
echo "This script must be run with at least 2 arguments."
echo 'Usage: ${0} argument1 argument2 [argument3] [argument4]'
if [ $INPUT_COUNT -lt 3 ] ; then
echo "This script must be run with at least 3 arguments."
echo 'Usage: ${0} argument1 argument2 argument3 [argument4]'
echo " argument1 : path to the tester driver"
echo " argument2 : test type to run, e.g put"
echo " argument3 : directory to put the output logs"
@@ -333,6 +333,14 @@ ValidateInput() {
fi
}
ValidateLogDir() {
if [ ! -d $1 ]; then
echo "LOG_DIR=$1 does not exist"
mkdir -p $1
echo "Created $1"
fi
}
APP=$1
TEST=$2
LOG_DIR=$3
@@ -341,6 +349,7 @@ HOSTFILE=$4
DRIVER_RETURN_STATUS=0
ValidateInput $#
ValidateLogDir $LOG_DIR
case $TEST in
*"all")