[rocprofiler-compute] Add database output format to analyze mode (#748)

Analysis data dump

* Add `--output-format` and `--output-name` option to analyze mode

* Remove `--output` and `-save-dfs` option to analyze mode

* Add documentation on `rocpd` output format and analysis database file

* Create sqlite3 database using object relation mapping (ORM) provided
  by sqlalchemy library

* Fix metrics config to remove metrics marked as `null`, fix `Unit` header, add
  missing `title`

* Add test cases to ensure analysis data dump work
This commit is contained in:
vedithal-amd
2025-08-26 14:15:05 -04:00
committed by GitHub
parent 09cfa97156
commit 323d06c79c
41 changed files with 1130 additions and 117 deletions
+22 -10
View File
@@ -633,11 +633,29 @@ Examples:
help="\t\tMode of spatial multiplexing.",
)
analyze_group.add_argument(
"-o",
"--output",
"--output-format",
metavar="",
dest="output_file",
help="\t\tSpecify an output file to save analysis results.",
dest="output_format",
choices=["stdout", "txt", "csv", "db"],
default="stdout",
help=(
"\t\tSet the format of output file or folder containing analysis data.\n"
"\t\tBy default, file or folder created will "
"have the name rocprof_compute_<uuid>.\n"
"\t\tFile or folder name can be overriden using --output-name.\n"
"\t\tDefault output format is stdout which will not "
"generate any file/folder.\n"
),
)
analyze_group.add_argument(
"--output-name",
metavar="",
dest="output_name",
help=(
"\t\tOverride the default output file name rocprof_compue_<uuid> "
"with the specified name.\n"
"\t\tThis is only applicable when --output-format txt/csv/db is used.\n"
),
)
analyze_group.add_argument(
"--gui",
@@ -756,12 +774,6 @@ Examples:
help="\t\tSpecify the directory of customized configs.",
default=rocprof_compute_home.joinpath("rocprof_compute_soc/analysis_configs/"),
)
analyze_advanced_group.add_argument(
"--save-dfs",
dest="df_file_dir",
metavar="",
help="\t\tSpecify the dirctory to save analysis dataframe csv files.",
)
analyze_advanced_group.add_argument(
"--cols",
type=int,