-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* initial progress on raja-perf * adding complete experiment.py class * adding dryrun * lint * lint * Fix caliper * adding tioga and ruby dryruns --------- Co-authored-by: august-knox <[email protected]> Co-authored-by: Riyaz Haque <[email protected]>
- Loading branch information
1 parent
32d34d1
commit 9c72b1f
Showing
4 changed files
with
119 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# Copyright 2023 Lawrence Livermore National Security, LLC and other | ||
# Benchpark Project Developers. See the top-level COPYRIGHT file for details. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
from benchpark.directives import variant | ||
from benchpark.experiment import Experiment | ||
from benchpark.scaling import StrongScaling | ||
from benchpark.openmp import OpenMPExperiment | ||
from benchpark.cuda import CudaExperiment | ||
from benchpark.rocm import ROCmExperiment | ||
from benchpark.expr.builtin.caliper import Caliper | ||
|
||
|
||
class RajaPerf( | ||
Experiment, | ||
StrongScaling, | ||
CudaExperiment, | ||
ROCmExperiment, | ||
OpenMPExperiment, | ||
Caliper, | ||
): | ||
variant( | ||
"workload", | ||
default="suite", | ||
description="base Rajaperf suite or other problem", | ||
) | ||
|
||
variant( | ||
"version", | ||
default="develop", | ||
description="app version", | ||
) | ||
|
||
def compute_applications_section(self): | ||
|
||
n_resources = {"n_ranks": 1} | ||
|
||
if self.spec.satisfies("+single_node"): | ||
for pk, pv in n_resources.items(): | ||
n_resources = pv | ||
|
||
elif self.spec.satisfies("+strong"): | ||
scaled_variables = self.generate_strong_scaling_params( | ||
{tuple(n_resources.keys()): list(n_resources.values())}, | ||
int(self.spec.variants["scaling-factor"][0]), | ||
int(self.spec.variants["scaling-iterations"][0]), | ||
) | ||
n_resources = scaled_variables["n_ranks"] | ||
|
||
if self.spec.satisfies("+cuda") or self.spec.satisfies("+rocm"): | ||
self.add_experiment_variable("n_gpus", n_resources, True) | ||
elif self.spec.satisfies("+openmp"): | ||
self.add_experiment_variable("n_ranks", n_resources, True) | ||
self.add_experiment_variable("n_threads_per_proc", 1, True) | ||
else: | ||
self.add_experiment_variable("n_ranks", n_resources, True) | ||
|
||
def compute_spack_section(self): | ||
# get package version | ||
app_version = self.spec.variants["version"][0] | ||
|
||
system_specs = {} | ||
system_specs["compiler"] = "default-compiler" | ||
system_specs["mpi"] = "default-mpi" | ||
|
||
if self.spec.satisfies("+cuda"): | ||
system_specs["cuda_version"] = "{default_cuda_version}" | ||
system_specs["cuda_arch"] = "{cuda_arch}" | ||
if self.spec.satisfies("+rocm"): | ||
system_specs["rocm_arch"] = "{rocm_arch}" | ||
|
||
self.add_spack_spec(system_specs["mpi"]) | ||
|
||
self.add_spack_spec( | ||
self.name, [f"raja-perf@{app_version}", system_specs["compiler"]] | ||
) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -171,9 +171,8 @@ class RajaPerf(CachedCMakePackage, CudaPackage, ROCmPackage): | |
conflicts("~openmp", when="+openmp_target", msg="OpenMP target requires OpenMP") | ||
conflicts("+cuda", when="+openmp_target", msg="Cuda may not be activated when openmp_target is ON") | ||
|
||
depends_on("caliper@master",when="+caliper") | ||
depends_on("caliper@master +cuda",when="+caliper +cuda") | ||
depends_on("caliper@master +rocm",when="+caliper +rocm") | ||
depends_on("caliper", when="+caliper") | ||
depends_on("[email protected]:", when="+caliper") | ||
|
||
depends_on("mpi", when="+mpi") | ||
|
||
|
@@ -352,12 +351,12 @@ def initconfig_package_entries(self): | |
entries.append(cmake_cache_option("ENABLE_TESTS", not "tests=none" in spec or self.run_tests)) | ||
|
||
entries.append(cmake_cache_option("RAJA_PERFSUITE_USE_CALIPER","+caliper" in spec)) | ||
if "caliper" in self.spec: | ||
if "+caliper" in self.spec: | ||
entries.append(cmake_cache_path("caliper_DIR", spec["caliper"].prefix+"/share/cmake/caliper/")) | ||
entries.append(cmake_cache_path("adiak_DIR", spec["adiak"].prefix+"/lib/cmake/adiak/")) | ||
|
||
return entries | ||
|
||
def cmake_args(self): | ||
options = [] | ||
options = [f"-DMPI_CXX_LINK_FLAGS='{self.spec['mpi'].libs.ld_flags}'"] | ||
return options |
This file contains 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