Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TMA 4.7 Update #133

Merged
merged 8 commits into from
Feb 8, 2024
Merged

TMA 4.7 Update #133

merged 8 commits into from
Feb 8, 2024

Conversation

calebbiggers
Copy link
Contributor

Updated HSX, BDX, CLX, SKX, ICX, and SPR platforms with TMA 4.7

Updated HSX, BDX, CLX, SKX, ICX, and SPR platforms with TMA 4.7
Copy link
Contributor

@captain5050 captain5050 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, has the substitution of #smt_on in the perf metrics been broken? It looks like "1" is always substituted, e.g.

        "MetricExpr": "( ( IDQ.MITE_CYCLES_ANY - IDQ.MITE_CYCLES_OK ) / ( CPU_CLK_UNHALTED.DISTRIBUTED if ( 1 ) else ( CPU_CLK_UNHALTED.THREAD ) ) / 2 )",
        "MetricGroup": "DSBmiss;FetchBW;TopdownL3;tma_L3_group;tma_fetch_bandwidth_group",
        "MetricName": "tma_mite",

@captain5050
Copy link
Contributor

Hi Caleb, would it be possible to squash thing change into the TMA 4.7 update?

@calebbiggers
Copy link
Contributor Author

Hi Caleb, would it be possible to squash thing change into the TMA 4.7 update?
@captain5050 As I merged some recent changes in-between the two commits, I cannot squash the changes into the original commit. I can close this PR and make a new one that only includes the fixed metrics. Is that preferred?

@edwarddavidbaker
Copy link
Contributor

@captain5050 As I merged some recent changes in-between the two commits, I cannot squash the changes into the original commit. I can close this PR and make a new one that only includes the fixed metrics. Is that preferred?

Your development branch will cleanly rebase on top of main. Try git rebase -i origin/main and select s for the second commit 8dfd9e7 Fix for removal of SMT_on constant. Fixup the combined commit message as necessary.

Updated HSX, BDX, CLX, SKX, ICX, and SPR platforms with TMA 4.7

Fix for removal of SMT_on constant
@edwarddavidbaker
Copy link
Contributor

@calebbiggers I spent a few minutes looking at the current failures.

Creating event json for BDX in /home/runner/work/perfmon/perfmon/scripts/perf/broadwellx
    Mapfile(basepath).to_perf_json(outdir)
  File "/home/runner/work/perfmon/perfmon/scripts/create_perf_json.py", line 1842, in to_perf_json
    model.to_perf_json(modeldir)
  File "/home/runner/work/perfmon/perfmon/scripts/create_perf_json.py", line 1676, in to_perf_json
    csv_metrics = self.extract_tma_metrics(metric_csv, pmu_prefix, events)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/perfmon/perfmon/scripts/create_perf_json.py", line 1514, in extract_tma_metrics
    save_form(em['MetricName'], em['MetricGroup'], em['MetricExpr'],
  File "/home/runner/work/perfmon/perfmon/scripts/create_perf_json.py", line [120](https://github.com/intel/perfmon/actions/runs/7660092214/job/20876636275?pr=133#step:5:121)5, in save_form
    assert v in events or v.upper() in events or v in infoname or v in aux, \
AssertionError: Expected power to be an event in "tma_info_system_power": "( power@energy\-pkg@ * ( 61 ) + 15.6 * power@energy\-ram@ ) / ( ( ( duration_time * 1000 ) / 1000 ) * ( 1000000 ) )" on BDX
Error: Process completed with exit code 1.

I believe we want to skip tma_info_system_power using the existing ignore list.

# metrics redundant with perf or unusable
ignore = {
'tma_info_system_mux': 'MUX',
'tma_info_system_power': 'Power',
'tma_info_system_time': 'Time',
}

A patch similar to the following should work.

@@ -1171,6 +1180,9 @@ class Model:
 
             def save_form(name, group, form, desc, locate, scale_unit, threshold,
                           issues):
+                if name in ignore:
+                    _verboseprint2(f'Dropping {self.shortname} metric {name}.')
+                    return
                 if self.shortname == 'BDW-DE':
                     if name in ['tma_false_sharing']:
                         # Uncore events missing for BDW-DE, so drop.

@captain5050
Copy link
Contributor

I think we want to keep the metrics but need to update the skip here:

if v in ['if', 'then', 'else', 'min', 'max', 'core_wide',
'SMT_on', 'duration_time', 'cmask', 'umask',
'u', 'k', 'cpu', 'cpu_atom', 'cpu_core', 'edge',
'inv', 'TSC', 'filter_opc', 'cha_0', 'event',
'imc_0', 'uncore_cha_0', 'cbox_0', 'arb', 'cbox',
'num_packages', 'num_cores', 'SYSTEM_TSC_FREQ',
'filter_tid', 'TSC', 'cha', 'config1',
'source_count', 'slots', 'thresh', 'has_pmem',
'num_dies', 'num_cpus_online']:

to handle the power metrics case, like it is doing for cpu. The assert assumes the events for the metric are either in that list or are defined in the architecture's event json files.

@1perrytaylor 1perrytaylor merged commit 32a3af9 into main Feb 8, 2024
2 checks passed
@edwarddavidbaker edwarddavidbaker deleted the cbiggers-work-branch branch February 8, 2024 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants