-
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.
caliper cuda modifier implementation Co-authored-by: Riyaz Haque <[email protected]> Co-authored-by: pearce8 <[email protected]>
- Loading branch information
1 parent
ee63482
commit cc7e69e
Showing
2 changed files
with
45 additions
and
0 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
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} | ||
|
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,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"], | ||
) |