Commit graph

473 Commits

Autor SHA1 Nachricht Datum
Ranjith Ramakrishnan ba5c843b04 Split rocprofiler to runtime and dev/devel package
SWDEV-356024 - Development package name will have suffix dev or devel based on OS
Devel pacakge contents - Header files and non verioned lib file librocprofiler64.so
Runtime package contents - Binaries, xml files, python files , script files, license file, librocprof-tool.so and versioned library files

Change-Id: Id416b11f49a7d0acb917bc4936cc0cba0d101bee
2023-01-13 14:52:02 -08:00
Saurabh Verma 225bddf148 Adding missing MI200 metrics
Change-Id: I410f50e03d38bb03cf43e743318eb1242e7d6518
2023-01-11 18:00:46 +00:00
Ranjith Ramakrishnan b4258de318 Removed the initialization of cmake_install_libdir
The initialization should be controlled from build scripts. Removing the same from source code
Build scripts is initializing  the variable to "lib"

Change-Id: I55b6cf4752e692735c2a0be13b79f5988137e3a6
2022-12-15 23:15:58 -08:00
Kiumars Sabeti a9a82ee107 SWDEV-369023: Added two new counters SQ_INSTS_TEX_LOAD and SQ_INSTS_TEX_STORE for gfx10.These two new counters are replacement for SQ_INSTS_VMEM_RD and SQ_INSTS_VMEM_WR which are not supported in gfx10 architecture
Change-Id: I4c4101eea27f9073492ae42c70a30a002f4d8834
2022-12-09 20:41:45 -05:00
Ranjith Ramakrishnan aae692c674 SWDEV-368058 - Change pragma message to warning
File reorganization feature was implemented with backward compatibility
The backward compatibility support will be deprecated in future release.
Changed the #pragma message to #warning for a smooth transition

Change-Id: Ieb7726ef219af20b9260c1e35444813a36cd8508
2022-11-21 16:22:09 -05:00
Ammar ELWazir 553a4c7ee7 GPU Index to use HSA AMD Agent Driver Node ID
Change-Id: Ia814f64419615f1d77fc09fc88f11bbaf75afd45
2022-11-21 14:05:33 -05:00
Ammar ELWazir bbbd177dd7 Suppressing the hipGraphLaunch issue
hipGraphs acts as a separate activity group as they have their own memory copies and their kernel dispatches and more activities, currently hip api that roctracer depend on doesn't have a way to represent this type, so we are temporarily suppressing the issue up till we have a complete support for the hipGraphs

Change-Id: I5d889be05c9414530672c781e5a712d572ea4104
2022-11-01 23:29:05 -05:00
Ammar ELWazir 7e8df53c44 Fixing merge_traces.sh
merge_traces.sh was depending on tblextr.py, and the location of tblextr.py changed from bin to libexec/rocprofiler

Change-Id: I76f1a0f41ffcff26e6a1119dacfb8b2ebd56d17d
2022-10-28 10:28:36 -05:00
Laurent Morichetti 3b61d6bd8c SWDEV-362165 - Escape argument strings in the JSON file
"a_string\x000" -> \"a_string\\x000\"

Change-Id: I8bf054702b34577f84080080d9538b16abc996fe
2022-10-18 01:47:46 -04:00
Sriraksha Nagaraj 3bb853c56d SWDEV-359118 - fix for misrepresentation for stream ids in Json file
Some trace entries report the stream argument as 'stream=' and some report it as 'hStream='.
Change-Id: I9e7c7af162db72ddadf6f2a3fe4f44a04bf77ed6
2022-10-13 21:48:48 -04:00
Sriraksha Nagaraj 316404ef08 SWDEV-356279: Adding backward compatibility in installing gfx_metrics.xml
Change-Id: If8e796103def0ec17866bd6d9c2ff7460d8a2594
2022-09-16 17:40:20 +00:00
Kiumars Sabeti b53fd84ade SWDEV-302380: [ROCm QA][Mainline][Navi21] 6 tests are failing in rocprofiler-stg2
This is an attempt to support basic and derived counters for navi21.  This code will not work correctly unless we add navi counters to metrics.xml and gfx_metrics.xml

Change-Id: Ied06a81345a6fbb02fa0fde1889d94bbe64e9a03
2022-08-05 17:31:37 -04:00
Laurent Morichetti 5fd1c7e8e3 Fix vgpr count calculation for gfx90a and gfx940
Read accum_offset from compute_pgm_rsrc3 to report both the arch vgprs
and the accum vgprs

Change-Id: I99e746d54a6a1671e343da5658cc6ce970f79939
2022-08-03 14:02:36 -07:00
Saurabh Verma 18dedbaee8 SWDEV-297195: Corrected units for some counters. Units changed to quad-cycles units where required.
Change-Id: Ia6b0387ac6ec4210bb9482d85ae5635fc7c3c9d0
2022-07-21 17:22:17 -05:00
Ranjith Ramakrishnan e7eb195924 SWDEV-345870 - Correct include paths for new directory layout
Use hsa header files from /opt/rocm-ver/include rather than using wrapper files from /opt/rocm-ver/hsa/include/hsa

Change-Id: Id7a9bde19447cd2a0fd6e03b11c08471f09c2a46
2022-07-14 16:08:41 -07:00
Sriraksha Nagaraj c565e2f329 SWDEV-287352 - Changing the description for timestamp option
Change-Id: Ie1d942f7560838efbc38394b21facf04df9bbda5
2022-07-07 15:08:53 -04:00
Sriraksha Nagaraj b0152e0091 SWDEV-323976 - changes in the scripts to display copy activity in the trace output
Change-Id: If8f7df3668c075a8f21508c796220693be9b40d3
2022-07-05 16:24:45 -04:00
Sriraksha Nagaraj c9efa4891e SWDEV-287352: Fixing typos in the rocprof --help description
Change-Id: I39739e53e477c9e621da1b686e248b5d7aff5ad2
2022-06-29 16:26:25 +00:00
Ammar ELWazir 6f97e15d55 Enabling ROCP_STATS_OPT
Enabling the new methodology of ROCP_STATS_OPT of getting HIP activities while the application is running

Change-Id: I19d09e2f2abe16e6528240bf55d6048645aaa09f
2022-06-21 19:30:38 -05:00
Ammar ELWazir 57fb3abb31 SWDEV-341811: backward compatibility fix for metrics.xml
Change-Id: Idd0535d399e211664a64390ebc97036495d02511
2022-06-17 13:29:09 -04:00
Ammar ELWazir 93a79eb99a Google-Chrome Tracer parser attaching flow events to the wrong time slice
This issue happens when we have slices that have overlapping
timestamp values (i.e. start_ts + dur = start_ts of next slice)
and the flow event references that shared timestamp value.
The google chrome parser sorts all the events
and just taking the most recent one.
Rocprof is outputting flow attachment points as start+dur;
the end ts of the slice that can overlap with the next slice
if no gap between them.

Solution proposal by Michael Steffen (Michael.Steffen@amd.com)

Change-Id: Ifcde142144033c9012b01a78c95f047384f972dd
2022-06-13 14:53:14 -04:00
Icarus Sparry 22f2e593c2 Adding missing commits
Adding commits found in mainline and not in staging: Add dependency on rocm-core

Signed-off-by: Icarus Sparry <icarus.sparry@amd.com>
Change-Id: Icb935e9230888fd005d9ca3617e28f6173173cc8
2022-06-01 13:21:04 -04:00
Ammar ELWazir 0be6306cae SWDEV-338186: Fixing Roctracer tool name, path
Using libroctracer_tool.so instead of libtracer_tool.so and fixing the paths for the tracer tool

Change-Id: I9b3ca885f3ca5385b106d5376894b1b4054f9c1d
2022-05-20 05:26:33 -04:00
Ranjith Ramakrishnan 44cbb66a16 Merge "SWDEV-321112: Use GNUInstallDirs" into amd-staging 2022-05-19 14:11:17 -04:00
Ranjith Ramakrishnan b24e05e138 SWDEV-321112: Use GNUInstallDirs
Use GNUInstallDirs variables to determine the location of BINDIR,
LIBDIR, INCLUDEDIR, DOCDIR, LIBEXECDIR and SYSCONFDIR.

Note that CMAKE_INSTALL_LIBDIR is overriden, since the default for RHEL
is lib64, but ROCm packaging wants it to be lib always. Distros or users
can easily override this.
Project name changed from rocprofiler64 to rocprofiler,since CMAKE_INSTALL_DOCDIR uses the project name

Change-Id: Iff2622b4bfc38ce5caea270e6e44ba74485cb9e4
2022-05-19 14:07:42 -04:00
Saurabh Verma 6d233c65d7 SWDEV-298750:Approval to make internal profile counters public
Added approved HW counters for MI200. Also added derived metrics for the same

Change-Id: I1c6abfdfde4e4fd4ba8bd5eec0557ad08fd71c77
2022-05-17 16:44:16 -05:00
Laurent Morichetti 0123aa61fa Register the tracer API as a tool library
In a future change, the tracer API library (libroctracer64.so) will be
automatically registered as a tool library. Until then, explicitly
register it by adding it to the HSA_TOOLS_LIB environment variable.

Change-Id: I44d78ac38608e6da5edf04b498a73485f5609d06
2022-05-04 19:19:34 -07:00
Ammar ELWazir 0faaa83de7 SWDEV-296010: Fixing RPATH & CMAKE files
Fixing the RPATH skip & Removed the export line from the build.sh as we have find_library with giving it a path to /opt/rocm & easy to use build.sh

Change-Id: I1ac5b51eafb54ef0359bf6fb55f2fe2d39a6cafa
2022-05-03 20:13:02 -05:00
Kiumars Sabeti 94004e592c Merge "SWDEV-320429: wrapping the comma-containing names in the .csv in double quotes at the time the .csv is generated" into amd-staging 2022-04-29 17:37:41 -04:00
Kiumars Sabeti 4d99f8d8e5 SWDEV-320429: wrapping the comma-containing names in the .csv in double quotes at the time the .csv is generated
Change-Id: I62f94a1cf8895eb324080f8aacac3f13c02d7050
2022-04-27 20:45:51 -04:00
Ammar ELWazir 1f5b02f9c8 Fixing header file location
prof_protocol.h is now located in /opt/rocm/include/roctracer/ext instead /opt/rocm/roctracer/include/ext

Change-Id: I98623dcf3c2e6bcef128c1ef35959ef0a4a1d63f
2022-04-23 13:22:36 +00:00
Sriraksha Nagaraj 071379be99 SWDEV-311412: Fixing rocprof application runs fail. Added a check in cmake_modules/env.cmake to check if aqlprofile library is found.
Change-Id: I9ff702bc0b4074101cca7beb78e711ce417308cd
2022-04-18 17:38:49 -04:00
Ammar ELWazir 1f925b3f16 SWDEV-332635: Fixing the effect of roctx-rename feature
HIP/HSA traces were asked to access range_data list, however, it was not initialized because roctx tracing was not enabled, moved lists initialization before roctx check

Change-Id: I9942876445cb1b2f69c6bb0d8986d6d9234f1441
2022-04-13 12:58:31 +00:00
Laurent Morichetti 1078a088e9 SWDEV-318682: Using roctx to rename long kernel names to shorter ones.
To enable this feature use the --roctx-rename rocprof option. This
implementation records all messages received in roctxPush calls and
use them to replace corresponding kernel names.

Tested with the following HIP program:

\#include <hip/hip_runtime.h>
\#include <roctracer/roctx.h>

__global__ void
ThisIsALongKernelName ()
{
}

int
main (int argc, char* argv[])
{
  hipSetDevice (0);

  // Not in a roctx range.
  ThisIsALongKernelName<<<1, 1>>> ();

  roctxRangePush ("A");
  // In a simple first level roctx range.
  ThisIsALongKernelName<<<1, 1>>> ();
  roctxRangePop ();

  roctxRangePush ("B");
  roctxRangePush ("C");
  // In a nested roctx range.
  ThisIsALongKernelName<<<1, 1>>> ();
  roctxRangePop ();
  roctxRangePop ();

  roctxRangePush ("D");
  roctxRangePush ("E");
  roctxRangePop ();
  // In a first level roctx range, but after a nested range.
  ThisIsALongKernelName<<<1, 1>>> ();
  roctxRangePop ();

  hipDeviceSynchronize ();
  return 0;
}

Change-Id: I629312234468daff8b017caa5cb0773707d98cce
2022-04-07 18:03:03 -07:00
Ammar ELWazir 46c4e5045a SWDEV-329270: fixed the multiline input.txt issue
In a previous change the key for the var_table in tblextr.py script has been changed from one value to a tuple without changing the usage of the var_table in the rest of the script

Change-Id: I38964f61afad5323d1ca9b64d538cec426298842
2022-03-25 05:09:52 +00:00
Ammar ELWazir fd4767d954 SWDEV-329261: Fix for Post-Processing HSA Memcopy Async Activities
The Post-Processing script was depending HSA API call for async mem copies to correlate it with the HSA Async Memcpy Activity, now if user decided to include input file with filtering HSA Api calls without adding HSA Memcpy, then all the correlation data will be dropped and the Async activity will be reported with the information given from the HSA async activity result file

Change-Id: I5123a5acab9b35a4c25793e7953fdfb74929c999
2022-03-24 10:22:52 -04:00
Saravanan Solaiyappan a1dde130de Merge "rocprofiler: Consider apt upgrade operation check in package scripts." into amd-staging 2022-03-22 12:40:31 -04:00
MarkDavid Laws 4998b150ee Merge "SWDEV-283957 : Emit correct group name for rocprof split metrics" into amd-staging 2022-03-22 11:52:47 -04:00
Saravanan Solaiyappan 39ca27d923 rocprofiler: Consider apt upgrade operation check in package scripts.
Include the upgrade operation check in the prerm script
in package.

Signed-off-by: Saravanan Solaiyappan <saravanan.solaiyappan@amd.com>
Change-Id: Ia2bf70bc3c8ce4ddb099ac58f32e165a0fe58824
2022-03-21 23:38:14 -04:00
Chun Yang 26c479c72a SWDEV-324379 : Expose FP64 and FP32 performance counters on on AMD profilers for MI200
Change-Id: I2c38ccc297872dfc1896314ceadbed98dc761766
2022-03-17 14:06:24 -07:00
Ranjith Ramakrishnan d891915a16 Merge "File Reorganization with backward compatibility" into amd-staging 2022-03-08 14:09:13 -05:00
Ranjith Ramakrishnan 015697db74 File Reorganization with backward compatibility
Package files installed in /opt/rocm
Wrapper header files and library soft links installed in/opt/rocm/rocprofiler
Test tools library and binaries renamed
Internal binaries installed in /opt/rocm/libexec/rocprofiler
run.sh updated with file reorg changes

Change-Id: I927d1a0dcd814764ebf0f473d0a64883906d5457
2022-03-05 14:49:41 -08:00
Ammar ELWazir 7a9692766d SWDEV-326120: Fix for Staging
'merge_traces script from rocprof fails to include GPU / HSA / ROCTX activity in merged trace' change was missing tuple addition to the second for loop causing issues on gfx908 and gfx906 | change NO: 628475

Change-Id: Ic0b6140d4372eb109fdf7bdc8d58c0d84239196d
2022-03-04 12:22:37 -05:00
Mark Laws a11ac0a632 SWDEV-283957 : Emit correct group name for rocprof split metrics
Change-Id: Id096edd03bb5be9c8082296fdb659845f2b9c7a6
2022-03-01 11:16:00 -06:00
Saurabh Verma 7a7c73b7d8 SWDEV-299902: merge_traces script from rocprof fails to include GPU / HSA / ROCTX activity in merged trace
Change-Id: I29cfd6cfaf34bfa588bd90774db6d8ac501e8aa8
2022-02-18 16:11:08 -06:00
kiumars 5693e1a140 replace the set of CMAKE_SHARED_LINKER_FLAGS with add_link_options.
Change-Id: Iaf8fc1d7680196662d610f34979ded07c6287df9
2022-02-03 12:31:45 -05:00
Ammar ELWazir c19cfbfffd SWDEV-318551: Adding License file for profiler
Making the new License file, Adding support in the CMakeLists.txt

Change-Id: I785035a780fbfc59951fc27d45f9c1869ffb4fb3
2022-01-26 13:38:42 -05:00
Icarus Sparry 6676d60516 Allow owner write permission
If we are packaging debug information then we need to edit the created
libraries and executables to extract the debug information. Due to a
bug in the tooling this requires write access to the created files.

Allow generation of only rpm and only deb files is specified on the
command line.

Signed-off-by: Icarus Sparry <icarus.sparry@amd.com>
Change-Id: I9a9df81102770ba681b1e7e0b5f704990f5435bb
2021-11-24 20:59:34 +00:00
Icarus Sparry 39a11d7dc4 Merge "Allow creation of just deb or rpm" into amd-staging 2021-11-15 23:03:57 -05:00
Icarus Sparry f4c7309592 Allow creation of just deb or rpm
Remove hard code of generating both deb and rpm, allow the user to
specify what is desired and cache that choice.

Create executable with owner write permission to work around binutils
bug.

Change-Id: I67655e5d351b227d1a8db4645228300d2bb83f9a
Signed-off-by: Icarus Sparry <icarus.sparry@amd.com>
2021-11-16 00:14:14 +00:00