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

Native LIKWID Instrumentation #1063

Merged
merged 19 commits into from Jul 23, 2022
Merged

Native LIKWID Instrumentation #1063

merged 19 commits into from Jul 23, 2022

Conversation

lukastruemper
Copy link
Contributor

@lukastruemper lukastruemper commented Jul 20, 2022

PR for supporting LIKWID instrumentation in DaCe. The implementation is self-contained in the sense that it does not need to be wrapped by the likwid-perfctr tool.

The available groups (events + metrics) for each architecture can be found in likwid's groups folder, e.g. Skylake

(transfer) ltruemper@davinci:~/Documents/repos/dace/samples/instrumentation$ OMP_NUM_THREADS=2 LIKWID_EVENTS="FLOPS_SP" python matmul_likwid.py
Instrumentation report
SDFG Hash: dc18bdc7f2fb1cff5893ea15c59e78e72d229721826faacc3f6b1e81ae522cd5
---------------------------------------------------------------------------
Element        Runtime (ms)
               Min            Mean           Median         Max
---------------------------------------------------------------------------
SDFG (0)
|-State (0)
| |Thread 0:
| |            840.324        840.324        840.324        840.324
| |Thread 1:
| |            840.371        840.371        840.371        840.371
---------------------------------------------------------------------------
---------------------------------------------------------------------------
Element        Counter
               Min            Mean           Median         Max
---------------------------------------------------------------------------
SDFG (0)
|-State (0)
ACTUAL_CPU_CLOCK
| ||Thread 0:
| |            2855738094     2855738094.0   2855738094.0   2855738094
| ||Thread 1:
| |            2815418695     2815418695.0   2815418695.0   2815418695
|-State (0)
MAX_CPU_CLOCK
| ||Thread 0:
| |            2857518814     2857518814.0   2857518814.0   2857518814
| ||Thread 1:
| |            2817204878     2817204878.0   2817204878.0   2817204878
|-State (0)
RETIRED_INSTRUCTIONS
| ||Thread 0:
| |            1209987678     1209987678.0   1209987678.0   1209987678
| ||Thread 1:
| |            1212349857     1212349857.0   1212349857.0   1212349857
|-State (0)
CPU_CLOCKS_UNHALTED
| ||Thread 0:
| |            2497959017     2497959017.0   2497959017.0   2497959017
| ||Thread 1:
| |            2512811654     2512811654.0   2512811654.0   2512811654
|-State (0)
RETIRED_SSE_AVX_FLOPS_SINGLE_ALL
| ||Thread 0:
| |            134217728      134217728.0    134217728.0    134217728
| ||Thread 1:
| |            134217728      134217728.0    134217728.0    134217728
|-State (0)
MERGE
| ||Thread 0:
| |            0              0.0            0.0            0
| ||Thread 1:
| |            0              0.0            0.0            0
---------------------------------------------------------------------------

@lukastruemper lukastruemper marked this pull request as draft July 20, 2022 11:17
@lukastruemper lukastruemper changed the title Draft: Native LIKWID Instrumentation Native LIKWID Instrumentation Jul 20, 2022
@lukastruemper lukastruemper marked this pull request as ready for review July 20, 2022 18:01
Copy link
Collaborator

@tbennun tbennun left a comment

Choose a reason for hiding this comment

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

In general, looks good. Your PR removed an important feature from instrumentation reporting, though, and the sample / feature is not documented enough.

dace/codegen/instrumentation/likwid.py Show resolved Hide resolved
dace/codegen/instrumentation/likwid.py Outdated Show resolved Hide resolved
dace/codegen/instrumentation/report.py Outdated Show resolved Hide resolved
dace/runtime/include/dace/perf/reporting.h Outdated Show resolved Hide resolved
dace/runtime/include/dace/perf/reporting.h Outdated Show resolved Hide resolved
samples/instrumentation/matmul_likwid.py Show resolved Hide resolved
samples/instrumentation/matmul_likwid.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@tbennun tbennun left a comment

Choose a reason for hiding this comment

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

Looking much better! Minor comments remain.

dace/codegen/instrumentation/likwid.py Outdated Show resolved Hide resolved
samples/instrumentation/matmul_likwid.py Outdated Show resolved Hide resolved
samples/instrumentation/matmul_likwid.py Outdated Show resolved Hide resolved
@lukastruemper
Copy link
Contributor Author

lukastruemper commented Jul 21, 2022

Looking much better! Minor comments remain.

Okay, we're now following stricter contribution guidelines. That's good, the better things can be understood by new people, the better for us

Copy link
Collaborator

@tbennun tbennun left a comment

Choose a reason for hiding this comment

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

LGTM!

@tbennun tbennun merged commit cb8d85c into master Jul 23, 2022
@tbennun tbennun deleted the users/lukas/likwid branch July 23, 2022 08:27
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.

None yet

3 participants