Commit Graph

8920 Commits

Author SHA1 Message Date
Ranjith Ramakrishnan b1585c983d SWDEV-369226 - Correct the usage of include file
In the generated header file hsa_prof_str.h , the header file hsa_ostream_ops.h was included using angle brackets
This results in compilation with include path /opt/rocm-ver/include. Corrected the usage by using double quotes

Change-Id: Ie9f1fff78d16a6953a2c99056b2acef42e577204
2022-11-21 16:38:39 -08:00
Shweta Khatri 8751e65b79 Fixed callback method for dl_iterate_phdr api which is called for each loaded shared object
Simplified the callback method. Also fixed the way, loaded shared object were getting appended into a string vector,
which was not being passed to this callback method.

Change-Id: I68661dd73f61a11c42fa92f670e8e7b6ffcb5711
2022-11-21 19:00:34 -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
Johannes Dieterich 94b4b3f0a6 Fix rocminfo when run within docker environments
Currently, rocminfo will fail when executed inside a docker container
due to being unable to lsmod inside docker. This has impacts on
rocprofiler use.

Fix this behavior by querying initstate of the amdgpu module from
/sys/module/amdgpu instead. If initstate is marked "live" everything if
fine - error out with either "not loaded" (initstate file does not
exist) or "not live" (initstate file does not contain "live" string).

Change-Id: I6f2e9655942fd4cf840fd3f56b7d69e893fa84d7
2022-11-21 18:11:31 +00:00
Ranjith Ramakrishnan e7ed902fd6 SWDEV-366823 - 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: I281ad17949435fee4b508a2a7e112b6fa3365838
2022-11-21 01:08:12 -08:00
Ranjith Ramakrishnan 9c4ce805cf SWDEV-366823 - 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: Ib616bf4b7358a0607832a8af423c75e0bf2ab72d
2022-11-21 00:59:02 -08:00
colramos425 d267e98efd Check for failed subprocesses
Signed-off-by: colramos425 <colramos@amd.com>
2022-11-18 12:50:07 -06:00
Mészáros Gergely 2449e7cd46 rocm: Fix compilation with rocm >= 5.3.1 (#214)
* rocm: Fix compilation with rocm >= 5.3.1

Add another version checked initialiation, because:
[roctracer has changed `hsa_ops_properties_t` again in 5.3.1][hsa_ops_properties_t]

[hsa_ops_properties_t]: https://github.com/ROCm-Developer-Tools/roctracer/compare/rocm-5.3.0...rocm-5.3.1#diff-42ffacd4e7f57213868dcd96aeb5c0d47d91d2a1121ba8d67f46caa267c1818cL41

* Fix formatting

* Fix preprocessing directive
2022-11-18 12:12:59 -06:00
Ranjith Ramakrishnan a34804ed3e 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: Ibaedc1873bc764d25f74d9ca9416077d084e332d
2022-11-17 09:38:24 -08:00
Cole Ramos 2a93da7cf5 Merge pull request #35 from AMDResearch/34-roofline-not-installed
Ubuntu roofline binary isn't installed
2022-11-17 09:39:44 -06:00
colramos-amd 63c9167375 Add ubuntu binary to CMake
Signed-off-by: colramos-amd <colramos@amd.com>
2022-11-17 09:20:07 -06:00
David Francis 88934cec2c libhsakmt: Don't close kfd_fd
When hsa is closed, it would close open fds for /dev/kfd but
not for /dev/dri/renderD*. This caused issues with CRIU
checkpoint, which expects that /dev/kfd will be open if
/dev/dri/renderD* is.

As a workaround for the CRIU behaviour, leave /dev/kfd open
when closing hsa.

Signed-off-by: David Francis <David.Francis@amd.com>
Change-Id: Ie1b2d5b1d8986750b0e560ae2934b7c73cff942e
2022-11-17 10:04:24 -05:00
Jonathan R. Madsen 2ebfe3fc30 Perfetto updates (#211)
* Retry support in build-docker-release.sh

* critical-trace perfetto update

- use ::perfetto::Track instead of threads to create rows
- refactor call_chain::generate_perfetto

* Fix backtrace_metrics for perfetto

- get_papi_labels is now properly populated

* Refactor sampling::post_process_perfetto

- include HW counter delta in sample debug annotations
- reduce the amount debug annotation data stored in the call-stack
  - if the data is common to the entire stack, it is only annotated in the first and the last call-stack entry

* exit_gotcha::exit_info

* Improve OMPT shutdown

- cause spurious test failures

* Update source/lib/omnitrace/library/ompt.cpp
2022-11-17 08:43:45 -06:00
Jonathan R. Madsen 589a729702 roctracer: device and stream tracks (#209)
* roctracer: use multiple tracks for HIP streams

Use different perfetto tracks for each stream, and set the name of
these tracks to the stream pointer values. Setting the name like this
matches the args in the API traces.
This fixes overlapping work on multiple streams appearing as a call
stack.

* Fix -pedantic

* Run clang-format

* Add option to disable per stream tracks in perfetto

* Updated scheme for roctracer activity + general roctracer fixes

- Per-device tracks
- Handle HSA OPS in ROCm 5.3
  - the changes in ROCm 5.3 were causing HSA ops to get discarded
- Default for OMNITRACE_ROCTRACER_DISCARD_INVALID is now zero
  - i.e. default behavior is to flip beg_ns and end_ns when beg_ns > end_ns

* Flush perfetto at end of hip_activity_callback

- fixes unterminated regions

* GitHub Actions and run-ci script updates

- improve reliability

* Set OMNITRACE_TMPDIR in testing

- files in /tmp get occasionally deleted during CI

Co-authored-by: Gergely Meszaros <gergely@streamhpc.com>
2022-11-16 15:57:27 -06:00
Karl W. Schulz 29cc4a9477 fix broken link (#33)
Signed-off-by: Karl W. Schulz <karl.schulz@amd.com>
2022-11-16 15:00:19 -06:00
Karl W. Schulz 85d9a81220 enable header anchor generation up to depth=2
Signed-off-by: Karl W. Schulz <karl.schulz@amd.com>
2022-11-16 15:00:05 -06:00
Jonathan R. Madsen 2f16e2ecb1 Optional perfetto annotations (#206)
* Misc tweaks

- C API function print with warning colors
- split region/trace start/stop functions into regions.cpp file

* Config option for disabling perfetto annotations

* Missing checks in roctracer.cpp and sampling.cpp

* Verbose makefile in CI

* run-ci uses -VV

* Fix gcc-7 maybe-uninitialized warning

* Fix push/pop perfetto

- moving perfetto::EventContext was causing errors
2022-11-16 09:48:15 -06:00
Ammar ELWazir d835435b0d Fixing Readme.txt
API Spec Documentation link fixed

Change-Id: I0d0ef52eaa0e66b161cb042704c083e29b0db06f
2022-11-16 00:39:07 -06:00
David Yat Sin b9d1ad8604 Revert "Correct limit query return type to match spec ABI."
This reverts commit 7826d4ca2d.

Changing the parameter sizes breaks backward ABI.

Change-Id: Iff14b7c11294f0931f36fcfd42fff11a492d4205
2022-11-14 19:13:58 -05:00
Nirmal Unnikrishnan e0476629fe : updating the kfdtest packaging version
Change-Id: I4132d1106bd997b64b1496ea268961172a545102
2022-11-14 11:40:45 -06:00
colramos425 021b6c4f03 Add app parameters to profiling output #27
Signed-off-by: colramos425 <colramos@amd.com>
2022-11-14 09:51:48 -06:00
Jonathan R. Madsen 2135f82ab8 Improve sampling allocator (#205)
* Updated sampling

- dynamic sampler is constructed with a shared pointer to an allocator instance
- dynamic allocator handles multiple sampler
  - eliminates need for every per-thread dynamic sampler to start background allocator thread

* Fix usage of tim::popen
2022-11-13 14:37:07 -06:00
Jonathan R. Madsen ab0a3e9d7d CI CPack fix (#204)
- Fixes error in CPack workflow from PR #203
2022-11-13 10:47:09 -06:00
Jonathan R. Madsen e1102a8ba4 CI and testing updates (#203)
* Python implementation of run-ci.sh

* Container workflow update

- retry failed container build to combat network failures

* cpack workflow update

- retry failed base container build to combat network failures

* General CI workflow updates

- retry failed "Install packages" step to combat network failures

* Miscellanous linting fixes

* Formatting workflow update

- improve regex for source formatting

* format user.h

* Add new omnitrace-avail tests

* Make run-ci.py executable

* workflow retry fix

- timeout_seconds -> retry_wait_seconds

* Fix cmake formatting glob

* source formatting

* Handle PRs in run-ci.py

* Specify timeout_minutes in retry steps

* Remove remaining --cmake-args from workflows

* CI warnings about using MPICH headers

* Remove text=True from run-ci.py

- not capturing stdout/sterr so unnecessary

* Fix OpenSUSE step label

* Update omnitrace-avail-write-config tests

- use TWD (Test Working Directory) instead of PWD since PWD might not be build directory

* paths-ignore + workflow_dispatch
2022-11-13 10:42:14 -06:00
colramos425 5fa2dd99bc Add Zenodo badge
Signed-off-by: colramos425 <colramos@amd.com>
2022-11-11 16:53:03 -06:00
colramos425 eb5608b4d2 Add zenodo config file
Signed-off-by: colramos425 <colramos@amd.com>
2022-11-11 16:46:02 -06:00
Karl W. Schulz 065b4b7741 minor changelog edit
Signed-off-by: Karl W. Schulz <karl.schulz@amd.com>
2022-11-11 15:52:00 -06:00
Karl W. Schulz 5a05c73df8 fix typo
Signed-off-by: Karl W. Schulz <karl.schulz@amd.com>
2022-11-11 15:50:46 -06:00
colramos425 502d005154 Update changelog
Signed-off-by: colramos425 <colramos@amd.com>
2022-11-11 15:45:14 -06:00
Cole Ramos 25e5e1073c Merge pull request #28 from AMDResearch/dev
Landing development work in support of 1.0.4 release
2022-11-11 15:36:35 -06:00
Karl W. Schulz a9871f9dad relocate changelog to top-level dir
Signed-off-by: Karl W. Schulz <karl.schulz@amd.com>
2022-11-11 15:25:23 -06:00
Karl W. Schulz 244af54943 inclusion of a changelog
Signed-off-by: Karl W. Schulz <karl.schulz@amd.com>
2022-11-11 15:15:07 -06:00
Karl W. Schulz caae8ec211 docs: heading change
Signed-off-by: Karl W. Schulz <karl.schulz@amd.com>
2022-11-11 15:05:27 -06:00
Karl W. Schulz bbb0073612 setting version for v1.0.4 release
Signed-off-by: Karl W. Schulz <karl.schulz@amd.com>
2022-11-11 15:04:20 -06:00
Karl W. Schulz 4fbe1891f3 updated version query to also include git version info. Delineate
between development mode (git clone) and release version where the git
sha is stored in top-level VERSION.sha file. Closes #20.

Signed-off-by: Karl W. Schulz <karl.schulz@amd.com>
2022-11-11 14:43:00 -06:00
Karl W. Schulz 0d314be72d add capture of git revision into VERSION.sha
Signed-off-by: Karl W. Schulz <karl.schulz@amd.com>
2022-11-11 14:43:00 -06:00
colramos425 7d7687e804 Add min reqs for pandas and numpy
Signed-off-by: colramos425 <colramos@amd.com>
2022-11-11 14:14:03 -06:00
colramos-amd e044d25ec1 Reorder Grafana GUI Import section in GUI
Signed-off-by: colramos-amd <colramos@amd.com>
2022-11-11 13:29:00 -06:00
colramos-amd 35c287e0a3 Enable Google Analytics for docs
Signed-off-by: colramos-amd <colramos@amd.com>
2022-11-11 12:41:06 -06:00
colramos425 55045adc29 Patch versioning for submodes #25
Signed-off-by: colramos425 <colramos@amd.com>
2022-11-11 12:02:51 -06:00
Jonathan R. Madsen 642b6b95ca Support external (i.e. user-defined) trace annotations (#195)
* Support external (i.e. user-defined) trace annotations

- tweaked the python examples to be more balanced
- updated the user-api example to conform to user API changes
- moved the get/set for State and ThreadState to state.{hpp,cpp}
- introduced user-provided trace annotations
- added perfetto python category
- moved coverage impl files around
- created enumerations for mapping category enums to category types
- created enumerations for mapping annotation type enums to annotation values
- moved tracing::add_perfetto_annotations to tracing/annotation.hpp
- utility make_index_sequence_range
- libomnitrace-dl: omnitrace_push_category_region
- libomnitrace-dl: omnitrace_pop_category_region
- libomnitrace-user: omnitrace_user_push_annotated_region
- libomnitrace-user: omnitrace_user_pop_annotated_region
- libpyomnitrace: support extra annotations via annotate_trace config value
  - filename
  - line
  - last attempted instr in bytecode (lasti)
  - argcount
  - num local variables
  - stacksize
- omnitrace-python: -a / --annotate-traces option

* tweak ubuntu-focal workflow

* Fix installation of omnitrace-user headers

* ubuntu-focal-codecov workflow update

- Install texinfo

* Update timemory submodule
2022-11-11 07:31:14 -06:00
Mészáros Gergely 1b8f09aa2d instrumentation: include functions with specific calls (#202)
* instrumentation: include functions with specific calls

Add the option `--caller-include <regex>` or environment variable
`OMNITRACE_REGEX_CALLER_INCLUDE` to instrument functions which contain
call to a set of functions, E.g. `--caller-include foo` instruments any
function which calls `foo`.

* Serialize caller include information

* Add test for caller include

* Tweak to the caller include test

- tweak environment
- tweak pass regexes

* Set rewrite caller example to debug

, to avoid optimizing out the call expressions that it relies on.

Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
2022-11-11 02:32:57 -06:00
colramos-amd 9c3c4e5125 Make device flag in vcopy optional
Signed-off-by: colramos-amd <colramos@amd.com>
2022-11-10 17:30:40 -06:00
Karl W. Schulz 5b33598a2d include version string verbatim in source tarball name
Signed-off-by: Karl W. Schulz <karl.schulz@amd.com>
2022-11-10 16:07:43 -06:00
Karl W. Schulz 526445b859 include additional hostname matches for thera customization (#18)
Signed-off-by: Karl W. Schulz <karl.schulz@amd.com>
2022-11-10 15:57:15 -06:00
Karl W. Schulz 41300ee423 apologize to cmake-format - we are not worthy
Signed-off-by: Karl W. Schulz <karl.schulz@amd.com>
2022-11-10 15:50:44 -06:00
Karl W. Schulz 43416a100c remove additional git related files from release tarball (#13)
Signed-off-by: Karl W. Schulz <karl.schulz@amd.com>
2022-11-10 15:50:44 -06:00
Karl W. Schulz d7a5e40845 a few top-level page name tweaks to streamline the TOC
Signed-off-by: Karl W. Schulz <karl.schulz@amd.com>
2022-11-10 15:14:39 -06:00
Karl W. Schulz 50e46453b7 edit pass for standalone gui analysis
Signed-off-by: Karl W. Schulz <karl.schulz@amd.com>
2022-11-10 14:47:29 -06:00