Enable kokkos trace/features from rocprofv3 in rocprof-compute. (#545)

Signed-off-by: Xuan Chen <xuchen@amd.com>
This commit is contained in:
xuchen-amd
2025-01-29 13:14:57 -05:00
committad av GitHub
förälder 0a52e6f19d
incheckning da1bd045ab
2 ändrade filer med 25 tillägg och 1 borttagningar
+16
Visa fil
@@ -139,6 +139,22 @@ Examples:
required=False,
help="\t\t\tSpecify the type of subpath to save workload: node_name, gpu_model.",
)
profile_group.add_argument(
"--hip-trace",
dest="hip_trace",
required=False,
default=False,
action="store_true",
help="\t\t\tHIP trace, execturion trace for the entire application at the HIP level.",
)
profile_group.add_argument(
"--kokkos-trace",
dest="kokkos_trace",
required=False,
default=False,
action="store_true",
help="\t\t\tKokkos trace, traces Kokkos API calls.",
)
profile_group.add_argument(
"-k",
"--kernel",
@@ -42,9 +42,17 @@ class rocprof_v3_profiler(RocProfCompute_Base):
def get_profiler_options(self, fname):
app_cmd = shlex.split(self.get_args().remaining)
trace_option = "--kernel-trace"
rocprof_out_format = "json"
if self.get_args().format_rocprof_output == "csv":
rocprof_out_format = "csv"
if self.get_args().hip_trace:
trace_option += " " + "--hip-trace"
if self.get_args().kokkos_trace:
trace_option += " " + "--kokkos-trace"
args = [
"-E",
os.path.join(
@@ -56,7 +64,7 @@ class rocprof_v3_profiler(RocProfCompute_Base):
# v3 requires output directory argument
"-d",
self.get_args().path + "/" + "out",
"--kernel-trace",
trace_option,
"--output-format",
rocprof_out_format,
"--",