Skip to content

Commit

Permalink
caliper cuda modifier (#194)
Browse files Browse the repository at this point in the history
caliper cuda modifier implementation

Co-authored-by: Riyaz Haque <[email protected]>
Co-authored-by: pearce8 <[email protected]>
  • Loading branch information
3 people authored Apr 16, 2024
1 parent ee63482 commit cc7e69e
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
18 changes: 18 additions & 0 deletions modifiers/caliper-cuda/configs/modifier.yaml
Original file line number Diff line number Diff line change
@@ -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}

27 changes: 27 additions & 0 deletions modifiers/caliper-cuda/modifier.py
Original file line number Diff line number Diff line change
@@ -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"],
)

0 comments on commit cc7e69e

Please sign in to comment.