Enable rocpd output format with rocprofiler sdk (#790)
* Add `rocpd` choice for `--format-rocprof-output` option
* Add rocpd_data.py which defines SQL queries to extract data from rocpd database
* Use sqlite3 package to read the database
* Add `--retain-rocpd-output` option in profile mode to retain raw
rocpd database
* Add warning notice to say `--format-rocprof-output rocpd` will be
default in future release
For rocpd output:
* Use only `pmc_perf.csv` instead of reading individual coll_level results csv files
* Post process csv files using pandas in analysis mode instead of profile mode
* Use ACCUM counters instead of SQ_ACCUM_PREV_HIRES
* Add test cases for rocpd output format
* Fix code formatting issues
* Update CHANGELOG
[ROCm/rocprofiler-compute commit: 03d27c0ba0]
This commit is contained in:
@@ -31,7 +31,7 @@ import pandas as pd
|
||||
import yaml
|
||||
|
||||
import config
|
||||
from utils import schema
|
||||
from utils import rocpd_data, schema
|
||||
from utils.kernel_name_shortener import kernel_name_shortener
|
||||
from utils.logger import console_debug, console_error, console_log, demarcate
|
||||
|
||||
@@ -95,9 +95,7 @@ def load_profiling_config(config_dir):
|
||||
prof_config = yaml.safe_load(file)
|
||||
return prof_config
|
||||
except FileNotFoundError:
|
||||
console_log(
|
||||
f"Could not find profiling_config.yaml in {config_dir} for filtering analysis report"
|
||||
)
|
||||
console_log(f"Could not find profiling_config.yaml in {config_dir}")
|
||||
return dict()
|
||||
|
||||
|
||||
@@ -195,7 +193,7 @@ def create_df_kernel_top_stats(
|
||||
|
||||
@demarcate
|
||||
def create_df_pmc(
|
||||
raw_data_root_dir, nodes, spatial_multiplexing, kernel_verbose, verbose
|
||||
raw_data_root_dir, nodes, spatial_multiplexing, kernel_verbose, verbose, config
|
||||
):
|
||||
"""
|
||||
Load all raw pmc counters and join into one df.
|
||||
@@ -214,6 +212,8 @@ def create_df_pmc(
|
||||
f == schema.pmc_perf_file_prefix + ".csv"
|
||||
):
|
||||
tmp_df = pd.read_csv(str(Path(root).joinpath(f)))
|
||||
if config.get("format_rocprof_output") == "rocpd":
|
||||
tmp_df = rocpd_data.process_rocpd_csv(tmp_df)
|
||||
# Demangle original KernelNames
|
||||
kernel_name_shortener(tmp_df, kernel_verbose)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user