Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts/cm_test_all_sandia: #1649

Merged
merged 17 commits into from
Apr 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 20 additions & 16 deletions blas/unit_test/Test_Blas3_gemm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,16 +257,15 @@ void impl_test_gemm(const char* TA, const char* TB, int M, int N, int K,
}
}

template <typename Scalar, typename Layout>
void impl_test_stream_gemm(const int M, const int N, const int K,
const Scalar alpha, const Scalar beta) {
using execution_space = TestExecSpace;
using ViewTypeA = Kokkos::View<Scalar**, Layout, TestExecSpace>;
using ViewTypeB = Kokkos::View<Scalar**, Layout, TestExecSpace>;
using ViewTypeC = Kokkos::View<Scalar**, Layout, TestExecSpace>;
using ScalarC = typename ViewTypeC::value_type;
using APT = Kokkos::ArithTraits<ScalarC>;
using mag_type = typename APT::mag_type;
template <typename Scalar, typename Layout, typename execution_space>
void impl_test_stream_gemm_psge2(const int M, const int N, const int K,
const Scalar alpha, const Scalar beta) {
using ViewTypeA = Kokkos::View<Scalar**, Layout, TestExecSpace>;
using ViewTypeB = Kokkos::View<Scalar**, Layout, TestExecSpace>;
using ViewTypeC = Kokkos::View<Scalar**, Layout, TestExecSpace>;
using ScalarC = typename ViewTypeC::value_type;
using APT = Kokkos::ArithTraits<ScalarC>;
using mag_type = typename APT::mag_type;

const char tA[] = {"N"};
const char tB[] = {"N"};
Expand Down Expand Up @@ -372,12 +371,17 @@ void test_gemm() {
}
}
}
Test::impl_test_stream_gemm<Scalar, Layout>(53, 42, 17, 4.5,
3.0); // General code path
Test::impl_test_stream_gemm<Scalar, Layout>(
13, 1, 17, 4.5, 3.0); // gemv based gemm code path
Test::impl_test_stream_gemm<Scalar, Layout>(7, 13, 17, 4.5,
3.0); // dot based gemm code path
auto pool_size = TestExecSpace().concurrency();
if (pool_size >= 2) {
Test::impl_test_stream_gemm_psge2<Scalar, Layout, TestExecSpace>(
53, 42, 17, 4.5,
3.0); // General code path
Test::impl_test_stream_gemm_psge2<Scalar, Layout, TestExecSpace>(
13, 1, 17, 4.5, 3.0); // gemv based gemm code path
Test::impl_test_stream_gemm_psge2<Scalar, Layout, TestExecSpace>(
7, 13, 17, 4.5,
3.0); // dot based gemm code path
}
}

template <typename Scalar>
Expand Down
38 changes: 38 additions & 0 deletions scripts/cm_test_all_sandia
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ if [[ "$HOSTNAME" == *blake* ]]; then # Warning: very generic name
module load git
fi

if [[ "$HOSTNAME" == *solo* ]]; then # Warning: very generic name
MACHINE=solo
fi

if [[ "$HOSTNAME" == kokkos-dev-2* ]]; then
MACHINE=kokkos-dev-2
fi
Expand Down Expand Up @@ -758,6 +762,40 @@ elif [ "$MACHINE" = "blake" ]; then
ARCH_FLAG="--arch=SKX"
fi
SPACK_HOST_ARCH="+skx"
elif [ "$MACHINE" = "solo" ]; then
SKIP_HWLOC=True
export SLURM_TASKS_PER_NODE=32

module load cmake/3.22.3

BASE_MODULE_LIST="cmake/3.22.3,<COMPILER_NAME>/<COMPILER_VERSION>"
BASE_MODULE_LIST_LLVM="cmake/3.22.3,<COMPILER_NAME>/<COMPILER_VERSION>,gnu/10.2.1"
BASE_MODULE_LIST_INTEL="cmake/3.22.3,gnu/8.2.1,<COMPILER_NAME>/<COMPILER_VERSION>"
ONEAPI_WARNING_FLAGS=""

GNU102_MODULE_TPL_LIST="$BASE_MODULE_LIST,openblas/0.3.21"

if [ "$SPOT_CHECK" = "True" ]; then
COMPILERS=(
"gnu/10.2.1 $BASE_MODULE_LIST "Threads_Serial,OpenMP" g++ $GNU_WARNING_FLAGS"
"llvm/10.0.1 $BASE_MODULE_LIST_LLVM "Threads_Serial" clang++ $CLANG_WARNING_FLAGS"
)
elif [ "$SPOT_CHECK_TPLS" = "True" ]; then
COMPILERS=("intel/19.0.5.281 $BASE_MODULE_LIST_INTEL,mkl/19.0.5.281 "OpenMP,Threads" icpc $INTEL_WARNING_FLAGS"
"gnu/10.2.1 $GNU102_MODULE_TPL_LIST "OpenMP_Serial" g++ $GNU_WARNING_FLAGS"
)
else
###"clang/10.0.1 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS"
COMPILERS=(
"gnu/10.2.1 $BASE_MODULE_LIST $GNU_BUILD_LIST g++ $GNU_WARNING_FLAGS"
)

fi

if [ -z "$ARCH_FLAG" ]; then
ARCH_FLAG="--arch=BDW"
fi
SPACK_HOST_ARCH="+bdw"
elif [ "$MACHINE" = "kokkos-dev-2" ]; then
MODULE_ENVIRONMENT="source /projects/sems/modulefiles/utils/sems-archive-modules-init.sh ; module use /home/projects/x86-64/modulefiles/local"
eval "$MODULE_ENVIRONMENT"
Expand Down