diff --git a/modifiers/caliper-cuda/configs/modifier.yaml b/modifiers/caliper-cuda/configs/modifier.yaml new file mode 100644 index 000000000..7b5434837 --- /dev/null +++ b/modifiers/caliper-cuda/configs/modifier.yaml @@ -0,0 +1,18 @@ +# 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 + +variables: + modifier_package_name: 'caliper-cuda' + modifier_spack_variant: '+caliper' + +modifiers: + - name: caliper-cuda + mode: cuda + +spack: + packages: + caliper-cuda: + spack_spec: caliper+adiak+mpi~libunwind~libdw~papi+cuda cuda_arch=={cuda_arch} + diff --git a/modifiers/caliper-cuda/modifier.py b/modifiers/caliper-cuda/modifier.py new file mode 100644 index 000000000..7761a467e --- /dev/null +++ b/modifiers/caliper-cuda/modifier.py @@ -0,0 +1,27 @@ +# 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 ramble.modkit import * +from ramble.mod.benchpark.caliper import Caliper as CaliperBase + + +class CaliperCuda(CaliperBase): + """Define a modifier for Caliper""" + + name = "caliper-cuda" + + mode( + "cuda", + description="Profile CUDA API functions", + ) + + _cali_datafile = CaliperBase._cali_datafile + + env_var_modification( + "CALI_CONFIG", + "spot(output={}, profile.cuda)".format(_cali_datafile), + method="set", + modes=["cuda"], + )