Граф коммитов

209 Коммитов

Автор SHA1 Сообщение Дата
Nicholas Curtis 047d7771f3 Add fix for case where we pass a single 'nan' value to to_avg
This is triggered by doing e.g., analyze -p <whatever> -k <kernel> -n per_kernel -b 17 18
Manifests as e.g.:

```
  ERROR [analysis] 'float' object has no attribute 'empty'
```

because of:

https://github.com/ROCm/omniperf/blob/d1ee2ec8709b21f2e72536cc14dba8ac2f8621ab/src/utils/parser.py#L135

Instead, we first check whether numpy thinks the whole array is nan's, and bail early if so

Signed-off-by: Nicholas Curtis <nicurtis@amd.com>
2024-05-28 15:34:00 -05:00
coleramos425 1f370c9fe7 Format CMake and Python
Signed-off-by: coleramos425 <colramos@amd.com>
2024-05-10 09:07:40 -06:00
coleramos425 dba868973b Add support for --quiet flag to roofline
Signed-off-by: coleramos425 <colramos@amd.com>
2024-05-10 09:07:40 -06:00
coleramos425 519bcb9b3e Update from https://github.com/ROCm/mibench/commit/b704bd3ec439f8cbece6713852fcafc855c5b07e 2024-05-10 09:07:40 -06:00
coleramos425 7d34e80567 Replace deprecated roofline warning with logging helper function
Signed-off-by: coleramos425 <colramos@amd.com>
2024-04-25 18:43:20 +00:00
Karl W Schulz b5011ff0ae additional mod needed to support roofline binaries potentially
executing from two different locations

Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-04-22 09:00:18 -05:00
Karl W Schulz 093a4511ee update logic to detect roofline binaries in two alternate paths
depending on whether user is running within local clone or from form
install.

Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-04-21 14:53:14 -05:00
Karl W Schulz 3c562588ff update logic to detect VERSION file to accommodate rocm packaging;
check two locations to cover case where user is running within local
git clone directly or alternatively, from package install.

Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-04-21 14:53:14 -05:00
Karl W Schulz 65967658e9 fix execution error when OMNIPERF_COLOR env is set; update coloring to
support four modes:

(0) - no coloring and no loglevel delimiters
(1) - colored loglevel delimiters
(2) - non-colored loglevel delimiters
(3) - fully colored messages for all levels besides INFO

Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-04-04 14:44:51 -05:00
coleramos425 e0556f32ab Move dispatch id patch to proper util func in utils. Enable in rocprofv2 post-processing
Signed-off-by: coleramos425 <colramos@amd.com>
2024-04-01 14:30:21 -05:00
colramos-amd 6cc8f0154f Restore OMNIPERF_COLOR global to disable default log coloring
Signed-off-by: colramos-amd <colramos@amd.com>
2024-04-01 14:30:21 -05:00
colramos-amd b1d0b3905c Extending log coloring to message text. Enable by default.
Signed-off-by: colramos-amd <colramos@amd.com>
2024-04-01 14:30:21 -05:00
colramos-amd f47b8d2547 Throw more helpful warning on missing csv in analyze mode (#313)
Signed-off-by: colramos-amd <colramos@amd.com>
2024-04-01 14:30:21 -05:00
coleramos425 706afa7f37 Register TRACE loglevel ahead of parse_args to avoid error in --specs printout
Signed-off-by: coleramos425 <colramos@amd.com>
2024-04-01 14:30:21 -05:00
Cole Ramos f7394bf272 Revert #333 deterministic ordering (#337)
* Revert "formatting"

This reverts commit e387561791898467371b6219921f10447d3486b3.

* Revert "Implement deterministic ordering of perfmon"

This reverts commit 2a24600a37c8002838145962a957cea447555b0c.
2024-04-01 14:30:21 -05:00
Nicholas Curtis f6f6165379 formatting
Signed-off-by: Nicholas Curtis <nicurtis@amd.com>
2024-04-01 14:30:21 -05:00
colramos-amd 3928f36d5e Adding redirect to help button in standalone GUI
Signed-off-by: colramos-amd <colramos@amd.com>
2024-04-01 14:30:21 -05:00
colramos-amd 33e763178e Removing unused modules
Signed-off-by: colramos-amd <colramos@amd.com>
2024-04-01 14:30:21 -05:00
colramos-amd cf36fb7fbf Implementing docs feedback with typos and minor enhancements
Co-authored-by: Jose Santos <josantos@amd.com>
Signed-off-by: colramos-amd <colramos@amd.com>
2024-04-01 14:30:21 -05:00
Nick Curtis d72ef52208 Fix for #300 (#331)
On some versions of numpy/pandas, applying a str map to an empty series doesn't change the type.
As a result, when adding a float to a string, sometimes numpy dies with a uadd error.
We fix this by explicitly casting to a str first

Signed-off-by: Nicholas Curtis <nicurtis@amd.com>
Co-authored-by: Nicholas Curtis <nicurtis@amd.com>
2024-04-01 14:30:21 -05:00
colramos-amd 62221383a7 Fixing visualization for Compute Pipeline SOL. Need to consider 'Pct of Peak' rather than 'Avg'
Signed-off-by: colramos-amd <colramos@amd.com>
2024-03-18 14:28:14 -05:00
Karl W Schulz 4fc30eb5c4 apply formatter
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-15 16:40:13 -05:00
Karl W Schulz f4070e3654 apply formatter
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-15 14:04:49 -05:00
colramos-amd 2dcad38028 Update roofline distro_map for Ubuntu22.04 (#319)
Signed-off-by: colramos-amd <colramos@amd.com>
2024-03-15 12:47:30 -05:00
Karl W Schulz 69de978d35 tweak logger formatter to suppor OMNIPERF_COLOR=2 which includes the
loglevel name in output, but without color

Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-15 09:31:22 -05:00
Karl W Schulz c29f28e25e bug fix for df tracing output - add more function demarcation
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-15 09:31:22 -05:00
Karl W Schulz 76121f20a9 enable more function demarcation for analyze tracing
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-15 09:31:22 -05:00
Karl W Schulz 3438bc9d0f logger update: assign color for TRACE level
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-14 17:37:30 -05:00
Karl W Schulz 69af2ffc83 update logging formatter handling for consistent behavior with error messsages
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-14 17:37:30 -05:00
colramos-amd e7cc326d5a Fix missing argv in console_warning()
Signed-off-by: colramos-amd <colramos@amd.com>
2024-03-12 16:44:02 -05:00
JoseSantosAMD efb8f131ec change stubbed values to hbm bw (#302)
* change stubbed values to hbm bw

Signed-off-by: Jose Santos <josantos@amd.com>

* Reformat

Signed-off-by: Jose Santos <josantos@amd.com>

* Update analysis_webui.py

remove print statements

Signed-off-by: JoseSantosAMD <87447437+JoseSantosAMD@users.noreply.github.com>

* Update src/omniperf_analyze/analysis_webui.py

Co-authored-by: Cole Ramos <colramos@amd.com>
Signed-off-by: JoseSantosAMD <87447437+JoseSantosAMD@users.noreply.github.com>

* Update src/omniperf_analyze/analysis_webui.py

Co-authored-by: Cole Ramos <colramos@amd.com>
Signed-off-by: JoseSantosAMD <87447437+JoseSantosAMD@users.noreply.github.com>

---------

Signed-off-by: Jose Santos <josantos@amd.com>
Signed-off-by: JoseSantosAMD <87447437+JoseSantosAMD@users.noreply.github.com>
Co-authored-by: Cole Ramos <colramos@amd.com>
2024-03-12 16:08:30 -05:00
JoseSantosAMD 4424f320ad Kernel no overwrite (#303)
* Removing kernel name shortener from profile

-  Kernel name shortener now in analyze
-  db import uses pymongo to import

Signed-off-by: Jose Santos <josantos@amd.com>

* collections now added using pymongo

Signed-off-by: JoseSantosAMD <Jose.Santos@amd.com>

* kernel_name_shortener shortens dataframes and not a workload

-  argparser: --kernel-verbose to connection group
-  analysis_cli, profiler_rocprof_v2: remove kernel_name_shortener, so that it doesnt overwrite workload
-  db_import: demangle kernel_name dfs

Signed-off-by: JoseSantosAMD <Jose.Santos@amd.com>

* fix db name in pymongo command

Signed-off-by: JoseSantosAMD <Jose.Santos@amd.com>

* reformat

Signed-off-by: JoseSantosAMD <Jose.Santos@amd.com>

* fix typo

Signed-off-by: JoseSantosAMD <Jose.Santos@amd.com>

* remove checker for verbose in profiler_base

Signed-off-by: Jose Santos <josantos@amd.com>

* kernel_name_shortener now called in create_df_kerenel_top_stats and
create_df_pmc

Signed-off-by: Jose Santos <josantos@amd.com>

* add kernel_verbose to analysis_webui, remove stubbed values

Signed-off-by: JoseSantosAMD <Jose.Santos@amd.com>

* Update src/utils/kernel_name_shortener.py

keep console_debug

Co-authored-by: Cole Ramos <colramos@amd.com>
Signed-off-by: JoseSantosAMD <87447437+JoseSantosAMD@users.noreply.github.com>

* Update src/utils/kernel_name_shortener.py

Co-authored-by: Cole Ramos <colramos@amd.com>
Signed-off-by: JoseSantosAMD <87447437+JoseSantosAMD@users.noreply.github.com>

---------

Signed-off-by: Jose Santos <josantos@amd.com>
Signed-off-by: JoseSantosAMD <Jose.Santos@amd.com>
Signed-off-by: JoseSantosAMD <87447437+JoseSantosAMD@users.noreply.github.com>
Co-authored-by: Cole Ramos <colramos@amd.com>
2024-03-12 15:54:52 -05:00
colramos-amd 706d3bb9f0 Update DB module for new sysinfo keys
Signed-off-by: colramos-amd <colramos@amd.com>
2024-03-12 12:24:49 -05:00
Karl W Schulz e85037fdfb move set_locale_encoding() to occur after logging is setup - allows
function to use console_error() directly (https://github.com/AMDResearch/omniperf/pull/308#discussion_r1519914083)

Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-11 14:19:01 -05:00
Karl W. Schulz 5e21dc35fd Update src/utils/utils.py
Co-authored-by: Cole Ramos <colramos@amd.com>
Signed-off-by: Karl W. Schulz <koomie@users.noreply.github.com>
2024-03-11 14:19:01 -05:00
Karl W. Schulz ebc9108da0 Update src/utils/db_connector.py
Co-authored-by: Cole Ramos <colramos@amd.com>
Signed-off-by: Karl W. Schulz <koomie@users.noreply.github.com>
2024-03-11 14:19:01 -05:00
Karl W. Schulz 523639a7fd Update src/utils/db_connector.py
Co-authored-by: Cole Ramos <colramos@amd.com>
Signed-off-by: Karl W. Schulz <koomie@users.noreply.github.com>
2024-03-11 14:19:01 -05:00
Karl W. Schulz 8e45cc897f Update src/utils/utils.py
Co-authored-by: Cole Ramos <colramos@amd.com>
Signed-off-by: Karl W. Schulz <koomie@users.noreply.github.com>
2024-03-11 14:19:01 -05:00
Karl W Schulz 34070394eb allow color formatter via env variable OMNIPERF_COLOR=1
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-11 14:19:01 -05:00
Karl W Schulz 27a57bdafb refactor setting of local encoding; remove from top-level omniperf
wrapper and push into base class via a companion utility function

Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-11 14:19:01 -05:00
Karl W Schulz 15c86ba424 update print_status() to use console logger; convert some info logs to debug logs
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-11 14:19:01 -05:00
Karl W Schulz 505e263279 rework of logger.py setup to introduce another setup_file_handler() -
this function enables file-based logger output for use with profile
mode

Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-11 14:19:01 -05:00
Karl W Schulz e24e6c35a5 refactor logging initialization into two steps:
(1) setup_logging_handler -> called prior to arg parsing
(2) setup_logging_priority -> called after arg parsing

Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-11 14:19:01 -05:00
Karl W Schulz abd3d20cb2 add quietmode option to setup_logging function
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-11 14:19:01 -05:00
Karl W Schulz 2b24375e8d add a exit keyword to console_error function; allows multiple error
lines prior to code exit

Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-11 14:19:01 -05:00
Karl W Schulz 377c642ac2 updates for run_prof() routine:
* add a profileMode keyword option, used to indent profiling output

* update logic if forked process is not successful, output is
  displayed directly with INFO logging or lower; also dispaly output
  in ERROR mode if the process fails

Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-11 14:19:01 -05:00
Karl W Schulz dcdef37c34 remove duplicate process output within run_prof()
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-11 14:19:01 -05:00
Karl W Schulz 61267ee262 include ERROR delimiter directly for console_error() messsages
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-11 14:19:01 -05:00
Karl W Schulz cc7a725ae8 add a profileMode option to capture_subprocess_output() - includes
indented output with profiler selection when enabled

Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-11 14:19:01 -05:00
Karl W Schulz 6bb4210d94 minor refactor of print_status()
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-11 14:19:01 -05:00