rocprofv3: PC Sampling Support (#14)
* Adding tool pc sampling support
Fixing merge issue
tool support on SDKupdates
link amd-comgr
Sanitizer failure fix
fix format
Addressing review comments
misc fix
Adding dispatch id to the CSV output
AddingCHANGELOG
[ROCProfV3][PC Sampling] Initial ROCProfV3 PC sampling tests for JSON and CSV formats (#17)
ROCProfV3 initial tests for JSON and CSV output.
Simple kernels that simplify the verification of samples to instruction decoding
has been introduced.
removing option to enable pc sampling explicitly
Adding documentation
no pc-sampling option in tests anymore
Addressing review comments
Updating docs
an option for choosing whether all units must be sampled
try ignoring PC sampling tests (#36)
* run pc-sampling tests on MI2xx runners
* use v_fmac_f32 instead of s_nop 0 in tests
* fixing docs
[ROCm/rocprofiler-sdk commit: 50b185b9ac]
This commit is contained in:
committed by
GitHub
parent
5ec8560fab
commit
9cfbfb5060
@@ -4,6 +4,7 @@ import os
|
||||
import sys
|
||||
import argparse
|
||||
import subprocess
|
||||
import numpy
|
||||
|
||||
|
||||
class dotdict(dict):
|
||||
@@ -167,6 +168,30 @@ For MPI applications (or other job launchers such as SLURM), place rocprofv3 ins
|
||||
help="Collect tracing data for HIP API, HSA API, Marker (ROCTx) API, RCCL API, Memory operations (copies, scratch, and allocations), and Kernel dispatches.",
|
||||
)
|
||||
|
||||
pc_sampling_options = parser.add_argument_group("PC sampling options")
|
||||
|
||||
pc_sampling_options.add_argument(
|
||||
"--pc-sampling-unit",
|
||||
help="",
|
||||
default=None,
|
||||
type=str.lower,
|
||||
choices=("instructions", "cycles", "time"),
|
||||
)
|
||||
|
||||
pc_sampling_options.add_argument(
|
||||
"--pc-sampling-method",
|
||||
help="",
|
||||
default=None,
|
||||
type=str.lower,
|
||||
choices=("stochastic", "host_trap"),
|
||||
)
|
||||
|
||||
pc_sampling_options.add_argument(
|
||||
"--pc-sampling-interval",
|
||||
help="",
|
||||
default=None,
|
||||
type=numpy.uint64,
|
||||
)
|
||||
basic_tracing_options = parser.add_argument_group("Basic tracing options")
|
||||
|
||||
# Add the arguments
|
||||
@@ -904,6 +929,18 @@ def run(app_args, args, **kwargs):
|
||||
if args.log_level in ("info", "trace", "env"):
|
||||
log_config(app_env)
|
||||
|
||||
if args.pc_sampling_unit or args.pc_sampling_method or args.pc_sampling_method:
|
||||
if not (
|
||||
args.pc_sampling_unit and args.pc_sampling_method and args.pc_sampling_method
|
||||
):
|
||||
fatal_error("All three PC sampling configurations need to be set")
|
||||
|
||||
update_env("ROCPROFILER_PC_SAMPLING_BETA_ENABLED", "ON")
|
||||
update_env("ROCPROF_PC_SAMPLING_UNIT", args.pc_sampling_unit)
|
||||
update_env("ROCPROF_PC_SAMPLING_METHOD", args.pc_sampling_method)
|
||||
update_env("ROCPROF_PC_SAMPLING_INTERVAL", args.pc_sampling_interval)
|
||||
update_env("ROCPROF_ENABLE_PC_SAMPLING", args.pc_sampling)
|
||||
|
||||
if use_execv:
|
||||
# does not return
|
||||
os.execvpe(app_args[0], app_args, env=app_env)
|
||||
|
||||
Reference in New Issue
Block a user