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

Replicate RAJAPerf Experiments #599

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from
Draft
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
41 changes: 41 additions & 0 deletions experiments/raja-perf/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,33 @@ class RajaPerf(
description="app version",
)

variant(
"total_size",
default=1048576,
description="total problem size (will be divided by ranks)",
)

variant(
"repfact",
default=1,
description="Multiplier on number of repitions to run each kernel",
)

# variant(
# "variants",
# default="None",
# )

# variant(
# "tunings",
# default="None",
# )

def compute_applications_section(self):

n_resources = {"n_ranks": 1}
total_size = int(self.spec.variants["total_size"][0])
execute = "raja-perf.exe"

if self.spec.satisfies("+single_node"):
for pk, pv in n_resources.items():
Expand All @@ -56,6 +80,23 @@ def compute_applications_section(self):
else:
self.add_experiment_variable("n_ranks", n_resources, True)

if isinstance(n_resources, list):
size = [int(total_size / res) for res in n_resources]
else:
size = total_size
self.add_experiment_variable("size", size, True)

self.add_experiment_variable("repfact", self.spec.variants["repfact"][0], True)

# rajaperf_variants = self.spec.variants["variants"][0].replace("-", " ")
# rajaperf_tunings = self.spec.variants["tunings"][0].replace("-", " ")
# if rajaperf_variants != "None":
# execute += " --variants " + rajaperf_variants
# if rajaperf_tunings != "None":
# execute += " --tunings " + rajaperf_tunings

self.add_experiment_variable("execute", execute, True)

def compute_spack_section(self):
# get package version
app_version = self.spec.variants["version"][0]
Expand Down
68 changes: 59 additions & 9 deletions repo/raja-perf/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,68 @@

class RajaPerf(ExecutableApplication):
"""RAJA Performance suite"""

name = "raja-perf"

tags = ['asc','single-node','sub-node','structured-grid',
'atomics','simd','vectorization','register-pressure',
'high-memory-bandwidth','regular-memory-access',
'mpi','network-point-to-point','network-latency-bound',
'c++','raja','cuda','hip','openmp','sycl']
tags = [
"asc",
"single-node",
"sub-node",
"structured-grid",
"atomics",
"simd",
"vectorization",
"register-pressure",
"high-memory-bandwidth",
"regular-memory-access",
"mpi",
"network-point-to-point",
"network-latency-bound",
"c++",
"raja",
"cuda",
"hip",
"openmp",
"sycl",
]

executable(
"run",
template=["{execute}" + " --size {size}" + " --repfact {repfact}"],
use_mpi=True
)

# executable(
# "run",
# template=["{execute}" + " --size {size}" + " --repfact {repfact}" + " {additional_args}"],
# use_mpi=True
# )

workload("suite", executables=["run"])

# workload_variable(
# "additional_args",
# default="--variants {variants} --tunings {tunings}",
# workloads=["suite"],
# description="",
# )

# workload_variable("variants", default="", workloads=["suite"], description="")

executable('run', 'raja-perf.exe', use_mpi=True)
# workload_variable("tunings", default="", workloads=["suite"], description="")
Comment on lines +44 to +61
Copy link
Collaborator Author

@michaelmckinsey1 michaelmckinsey1 Feb 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to have the option for --variants and --tunings instead of having to manually edit the execute_experiment files. The problem with this code is that when no argument is provided, the arguments are still injected, e.g. raja-perf.exe --repfact 5 ... --variants --tunings, when ideally they should not appear if not provided raja-perf.exe --repfact 5 ...

This can be done by checking in experiment.py, but that code results in the arguments appearing into experiment_run_dir (e.g. ...raja-perf.exe/raja-perf_suite_strong_1_33554432_5 --variants RAJA_CUDA --tunings block_256 ...) since execute is an experiment variable.


workload('suite', executables=['run'])

figure_of_merit('All tests pass', log_file='{experiment_run_dir}/{experiment_name}.out', fom_regex=r'(?P<tpass>DONE)!!!...', group_name='tpass', units='')
figure_of_merit(
"All tests pass",
log_file="{experiment_run_dir}/{experiment_name}.out",
fom_regex=r"(?P<tpass>DONE)!!!...",
group_name="tpass",
units="",
)

success_criteria('pass', mode='string', match=r'DONE!!!....', file='{experiment_run_dir}/{experiment_name}.out')
success_criteria(
"pass",
mode="string",
match=r"DONE!!!....",
file="{experiment_run_dir}/{experiment_name}.out",
)
1 change: 1 addition & 0 deletions repo/raja-perf/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ class RajaPerf(CachedCMakePackage, CudaPackage, ROCmPackage):

version("develop", branch="develop", submodules="True")
version("main", branch="main", submodules="True")
version("2024.07.0", tag="v2024.07.0", submodules="True")
version("2022.10.0", tag="v2022.10.0", submodules="True")
version("0.12.0", tag="v0.12.0", submodules="True")
version("0.11.0", tag="v0.11.0", submodules="True")
Expand Down
Loading