Commit gráf

218 Commit-ok

Szerző SHA1 Üzenet Dátum
Jonathan R. Madsen 8ec308e9dc Fix Findlibdw.cmake and Findlibelf.cmake (#764)
- improve pkg-config and explicit search fallback

[ROCm/rocprofiler-sdk commit: d766034c06]
2024-04-15 15:35:07 -05:00
Ammar ELWazir 1bdf62348e Fixing Markdown and Docs (#759)
* Update README.md

* Update index.md

* Update installation.md

* Update rocprofv3.md

* Update tool_library_overview.md

* Update CMakeLists.txt

* Update upload-image-to-github.py

* Update upload-image-to-github.py

---------

Co-authored-by: Gopesh Bhardwaj <gopesh.bhardwaj@amd.com>

[ROCm/rocprofiler-sdk commit: 3ec628e004]
2024-04-14 14:35:00 -05:00
Benjamin Welton 6f0c1958da Removal of HSA from counter collection (#697)
* Minor fix

Removal of HSA from counter collection

Tests for AQL

Updated counter collection client to build profiles in tool init

* Rebased

* Debug printing

* Formatting

* More format

* fix shadowing

---------

Co-authored-by: Jonathan R. Madsen <jrmadsen@users.noreply.github.com>

[ROCm/rocprofiler-sdk commit: c2f659ab5c]
2024-04-12 18:46:10 -07:00
Jonathan R. Madsen 2aef3c3d15 rocprofiler_kernel_dispatch_info_t + header record for buffered counter collection (#758)
* Update include/rocprofiler-sdk

- defines.h
  - ROCPROFILER_VERSION_10_0 -> ROCPROFILER_SDK_VERSION_0_0
- fwd.h
  - rocprofiler_counter_record_kind_t
  - rocprofiler_kernel_dispatch_info_t
  - rocprofiler_record_counter_t
    - has dispatch id instead of correlation id
  - rocprofiler_counter_info_v0_t
    - added rocprofiler_counter_id_t field
    - added is_constant field
    - reordered better packing
- dispatch_profile.h
  - added rocprofiler_profile_counting_dispatch_record_t for use as a header record for rocprofiler_profile_counting_dispatch_data_t
- callback_tracing.h
  - rocprofiler_callback_tracing_kernel_dispatch_data_t uses rocprofiler_kernel_dispatch_info_t
- buffer_tracing.h
  - rocprofiler_buffer_tracing_kernel_dispatch_record_t uses rocprofiler_kernel_dispatch_info_t

* Update lib/rocprofiler-sdk/*

- transition to rocprofiler_kernel_dispatch_info_t
- set id and is_constant values for rocprofiler_counter_info_v0_t in rocprofiler_query_counter_info

* Update lib/rocprofiler-sdk-tool

- transition to rocprofiler_kernel_dispatch_info_t

* Update lib/rocprofiler-sdk/counters/tests/core.cpp

- transition to rocprofiler_kernel_dispatch_info_t

* Update samples

- transition to rocprofiler_kernel_dispatch_info_t
- transition to rocprofiler_counter_record_kind_t

* Update tests

- transition to rocprofiler_kernel_dispatch_info_t
- transition to rocprofiler_counter_record_kind_t
- improve integration test validation for counter-collection
- update serialization for new/additional types

* Fix tests/counter-collection/validate.py

- loosen restrictions on the length of counter description

* Update include/rocprofiler-sdk/buffer_tracing.h

- remove accidental packed attribute

* Update lib/rocprofiler-sdk/counters/xml/derived_counters.xml

- Add description for TCC_TAG_STALL_sum (reference: https://rocm.docs.amd.com/en/develop/conceptual/gpu-arch/mi300-mi200-performance-counters.html)

* Update tests/page-migration/validate.py

[ROCm/rocprofiler-sdk commit: 07537b6231]
2024-04-12 17:30:34 -05:00
Mythreya 4f99edbad5 Page migration reporting (#651)
* Page migration reporting support

* Page migration: Update parser and reporting

Container does not lave latest KFD header, so CI might fail

* Add kfd_ioctl.h

* Formatting

* Update get_key

- get key was not used (and shouldn't be), so delete it

* clang-tidy fixes

* Tests for page migration

* Apply suggestions from code review

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update tests/bin/page-migration/CMakeLists.txt

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update page-migration test app

- add hipHostRegister to register mmap'ed allocation with HIP
- misc cleanup and reorg
- remove HSA_XNACK=1 from test env

* Update lib/rocprofiler-sdk/tests/page_migration.cpp

- fix compilation error

* Minor updates (reorg, rename)

* Page migration reporting support

* Page migration: Update parser and reporting

Container does not lave latest KFD header, so CI might fail

* Update page migration tests, fix trigger types

* Page Migration Tracing Support Refactoring (#753)

* Reorganization

* Update page migration init/fini

* Formatting

* Update page_migration.cpp

- change logging severity

* Skip test if KFD does not support page migration reporting

* Rework skipping test if KFD does not support page migration

* Fix event trigger enum values

* Fix clang-diagnostic-unused-const-variable

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
Co-authored-by: Jonathan R. Madsen <jrmadsen@users.noreply.github.com>

[ROCm/rocprofiler-sdk commit: fd3d97287c]
2024-04-12 15:51:44 -05:00
Jonathan R. Madsen c732857784 Update docs workflow (#760)
* Update docs workflow

- Switch from s-weigand/setup-conda to conda-incubator/setup-miniconda

* Update docs workflow

- Update shell for steps using conda
- Add build-docs-from-source job

* Update docs workflow

- fix run command for build-docs-from-source

* Update docs workflow

- fix run command for build-docs-from-source

* Update docs workflow

- configure, build, install, and package

* Update continuous_integration.yml workflow

- Disable building the docs in the core workflow

[ROCm/rocprofiler-sdk commit: 0e83f48cd5]
2024-04-12 14:55:13 -05:00
Jonathan R. Madsen b0fd633c2f Minor fixes + correlation id files + compute_runtime_sizeof (#757)
* Update lib/rocprofiler-sdk/context/*

- create correlation_id.{hpp,cpp} and moved implementation into these files instead of in context.{hpp,cpp}

* Update lib/rocprofiler-sdk/thread_trace/att_core.hpp

- fixed header includes

* Update lib/common/utility.hpp (runtime sizeof)

- added compute_runtime_sizeof<T>() function to set the "size" field to be the offset of the "reserved_padding" field if one exists

* Fix to compute_runtime_sizeof

[ROCm/rocprofiler-sdk commit: d6bb50cae1]
2024-04-12 12:34:00 -05:00
Jonathan R. Madsen 03fb9ace21 CTest Environment Update (#756)
* Update test/tools/json-tool.cpp

- push/pop ppid as external correlation id instead of pid

* Update environment variables for tests and samples

* Revert to old CDash dashboard in run-ci.py

* Revert to new CDash dashboard in run-ci.py

[ROCm/rocprofiler-sdk commit: 3eaa678054]
2024-04-12 08:40:00 -05:00
lancesix cf1767b3d2 rocprofiler-sdk-codeobj: use pkg-config to find libdw / libelf (#749)
* rocprofiler-sdk-codeobj: use pkg-config to find libdw / libelf

The current version of source/lib/rocprofiler-sdk-codeobj/CMakeLists.txt
adds -ldw and -lelf to target_link_libraries. However, on a system where
libdw-dev / libelf-dev is missing, the cmake configuration phase will
run properly and a compile time error will eventually be raised.

This patch changes the CMakelists.txt to search for libelf libdw and
configures the target as needed.  Systems missing the required support
should report an error when running cmake instead of in the middle of
the compilation.

* Use INTERFACE targets

* Resolve issues with Findlib{dw,elf}

---------

Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>

[ROCm/rocprofiler-sdk commit: 066e659d6e]
2024-04-12 03:48:35 -05:00
Jonathan R. Madsen 26b17b6f11 Update lib/rocprofiler-sdk-tool (#755)
- questionable data race within std::regex in CI
- simplify rocprofiler::tool::format
- set config::tmp_directory to default to output_path
- fs::create_directories for tmp_file
- rework get_file_name(...) and compose_tmp_file_name(...) in tool.cpp

[ROCm/rocprofiler-sdk commit: 87490d0018]
2024-04-12 03:48:02 -05:00
Jonathan R. Madsen 3c680fdca8 Bump version to 0.3.0 (#754)
[ROCm/rocprofiler-sdk commit: 7ef9e1ea8c]
2024-04-12 02:56:12 -05:00
Jonathan R. Madsen 5e8a3b4f16 Callback tracing for kernel dispatches + External correlation ID request service (#682)
* Support ROCPROFILER_CALLBACK_TRACING_KERNEL_DISPATCH

* Fix doxygen

* Update callback tracing

- temporary hacks for kind operation name and iterate kind operations

* Update source/include/rocprofiler-sdk

- introduce sequence id for kernel dispatches

* Update lib/rocprofiler-sdk (seq id)

- support sequence id passing

* Update tests (seq id)

- testing for sequence ids

* Cleanup include/rocprofiler-sdk/fwd.h

* Misc cleanup

* External Correlation ID Request Service (#699)

* External correlation ID request service

- callback requesting an external correlation ID instead of fetching from top of pushed external correlation ID stack

* Update external correlation id request support

- pass internal correlation ID in callback
- async copy generates a correlation ID if none already exists
- added external correlation ID request support for scratch memory tracing
- updated scratch memory tracing to use tracing:: functions

* Update hsa/queue.hpp

- new line at EOF

* Misc tweaks

- remove unnecessary logging in agent.cpp
- correlation_id::add_ref_count check for retirement
- finalization check in HSA queue AsyncSignalHandler

* Improve assertion failure logging in misc tests

* Update include/rocprofiler-sdk/fwd.h

- remove rocprofiler_record_counter_header_t

* Move lib/rocprofiler-sdk/tracing.hpp into lib/rocprofiler-sdk/tracing/ folder

* Update lib/rocprofiler-sdk/hsa/*

- hsa::get_hsa_status_string
- queue_info_session.hpp header
- rocprofiler_packet.hpp

* Update lib/rocprofiler-sdk/{counters,hip,marker}

- execute_phase_exit_callbacks tweaks
- queue_info_session tweaks

* Move rocprofiler_kernel_dispatch_operation_t to include/rocprofiler-sdk/fwd.h

* Update rocprofiler_buffer_tracing_kernel_dispatch_record_t

- add operation field and thread_id field

* Add lib/rocprofiler-sdk/kernel_dispatch

- enum <-> string mapping for kernel dispatch
- tracing implementations

* Update lib/rocprofiler-sdk/CMakeLists.txt

- tracing and kernel dispatch sub-directories

* Update lib/rocprofiler-sdk/{buffer,callback}_tracing.cpp

- invoke rocprofiler::kernel_tracing functions

* Update tests/common/serialization.hpp

- support operation and thread_id fields for rocprofiler_buffer_tracing_kernel_dispatch_record_t

* Update tests/tools/json-tool.cpp

- use external correlation id request service

* Rename sequence_id to dispatch_id

[ROCm/rocprofiler-sdk commit: 56030018dc]
2024-04-11 19:49:49 -05:00
Jonathan R. Madsen 95acc01042 Fix code_object_operation_t and memory_copy_operation_t enums (#751)
- enums for operations should not contain callback/buffer tracing categorization
- e.g. ROCPROFILER_CALLBACK_TRACING_CODE_OBJECT_LOAD should be ROCPROIFLER_CODE_OBJECT_LOAD

[ROCm/rocprofiler-sdk commit: 0f5c575435]
2024-04-11 18:52:13 -05:00
Jonathan R. Madsen beec57376a Add support for hsa_amd_queue_get_info (#752)
* Add support for hsa_amd_queue_get_info

- HSA_AMD_EXT_API_TABLE_STEP_VERSION == 0x02

* Suppress unused-but-set-parameter warnings

[ROCm/rocprofiler-sdk commit: 3c005b81b1]
2024-04-11 18:29:22 -05:00
Gopesh Bhardwaj 6076c751a3 hsa multiqueue application (#618)
* hsa multiqueuw application

* cmake formatting (cmake-format) (#619)

Co-authored-by: bgopesh <7112102+bgopesh@users.noreply.github.com>

* source formatting (clang-format v11) (#620)

Co-authored-by: bgopesh <7112102+bgopesh@users.noreply.github.com>

* comppialtion fix

* Update tests/bin/CMakeLists.txt

Reorder `add_subdirectory` to fix (recurrent) issues with ROCTx in `CMAKE_BUILD_RPATH`

* addressing early feedback

* cmake updates

* more cmake updates

* adding queue dependency test

* updating test

* test updates

* removed hsa_api_trace header

* reformating headers to prevent clang from reordering

* Fixing packaging

* Fixes for hangs

* source formatting (clang-format v11) (#676)

Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com>

* cmake formatting (cmake-format) (#673)

Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com>

* structure change

* cmake formatting (cmake-format) (#680)

Co-authored-by: bgopesh <7112102+bgopesh@users.noreply.github.com>

* Adding kernel trace to test hang fix

* rebased and fixed kernel-trace test

* rhel clang fixes

* source formatting (clang-format v11) (#685)

Co-authored-by: bgopesh <7112102+bgopesh@users.noreply.github.com>

* Update lib/rocprofiler-sdk-tool/helper.hpp

- remove suppression of -Wshadow

* Update tests/bin/hsa-queue-dependency/CMakeLists.txt

- cleanup unnecessary code
- GPU_LIST -> GPU_TARGETS

* GPU_LIST -> GPU_TARGETS

* Remove installation of test executable and libraries

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: bgopesh <7112102+bgopesh@users.noreply.github.com>
Co-authored-by: Jonathan R. Madsen <jrmadsen@users.noreply.github.com>
Co-authored-by: Benjamin Welton <bewelton@amd.com>
Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com>
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>

[ROCm/rocprofiler-sdk commit: 348d740388]
2024-04-09 10:19:16 -05:00
Jonathan R. Madsen 73ff4f2502 Update HSA async copy active signals handling (#732)
* Enable INFO logging on retried CI jobs

* Update lib/rocprofiler-sdk/async_copy.cpp

- rework active_signals
  - make hsa_signal_t member variable
  - remove sync from destructor
  - replace _is_set with atomic counter
  - timeout of 30 seconds hsa_signal_wait
  - switch from relaxed to scacquire/screlease memory ordering
- improve logging and error handling
- destroy hsa signal in active_signals in async_fini

* Update lib/rocprofiler-sdk/async_copy.cpp

- active_signals::create
- change initial value of signal to 1 instead of value of completion signal
- change condition trigger of signal callback

* Update tests/counter-collection/validate.py

* Update lib/rocprofiler-sdk/async_copy.cpp

- improved logging
- fix hsa_signal_wait_scacquire_fn check

* Cleanup tests/lib/transpose/transpose.cpp

- remove huge comment block

* Appears to be working on MI200

Dependency Versions:

clr: f7b1398361  - compile mode: release

hsa-runtime: 4cd6c62f25dbbdbaa8580dd4ad8f388c98c508da - compile mode: RelWithDebug

* Update source/lib/rocprofiler-sdk/hsa/async_copy.cpp

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Format fix

---------

Co-authored-by: Benjamin Welton <bewelton@amd.com>
Co-authored-by: Ammar ELWazir <ammar.elwazir@amd.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ammar ELWazir <aelwazir@hpe6u-21.amd.com>

[ROCm/rocprofiler-sdk commit: 8c5399a68a]
2024-04-09 08:31:08 -05:00
Gopesh Bhardwaj e2c30bd438 adding pandas and pytest to rquirements.txt (#748)
* adding pandas and pytest to rquirements.txt

* setting up requrements.txt

* Update requirements

- formatting packages
- remove packages not directly used by rocprofiler-sdk

* Update cmake formatting, linting, and options

- if BUILD_CI -> force BUILD_DEVELOPER and BUILD_WERROR
- support python installed clang-format and python installed clang-tidy

* Update build.sh

- split into install-deps.sh and install-apt-deps.sh

* Improve code coverage

---------

Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>

[ROCm/rocprofiler-sdk commit: e2d8ccad4b]
2024-04-09 07:24:40 -05:00
dependabot[bot] 3311f70156 Bump googleapis/code-suggester from 2 to 4 (#745)
Bumps [googleapis/code-suggester](https://github.com/googleapis/code-suggester) from 2 to 4.
- [Release notes](https://github.com/googleapis/code-suggester/releases)
- [Changelog](https://github.com/googleapis/code-suggester/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/code-suggester/compare/v2...v4)

---
updated-dependencies:
- dependency-name: googleapis/code-suggester
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

[ROCm/rocprofiler-sdk commit: 68aca98406]
2024-04-09 05:25:56 -05:00
SrirakshaNag 21fcf46d6d rocprofiler-sdk-tool library intermediate binary output (#734)
* Support for binary temporary files

* clang formatting

* formating ring buffer.hpp

* Update source/lib/common/container/ring_buffer.hpp

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fixing bugs

* fix loop range

* Fix for v3 test failures

* bug fix

* fix bug

* fix memory leaks

* destructing agent_info

* Update CMakeLists.txt

* clang-tidy fixes

* Fix data race on destructor of rocprofiler_agent_t map in rocprofiler-sdk-tool library

* Create lib/rocproifler-sdk-tool/tmp_file.*

- move tmp_file class into separate header/implementation

* Agent Info CSV in rocprofiler-sdk-tool

- update tests to use agent_info.csv instead of rocminfo

* Update lib/rocprofiler-sdk-tool/tool.cpp

- use logical_node_id instead of node_id

* Adding stats file

* Adding tests for stats

* Update scratch memory support

- convert scratch memory support to use binary output

* Tool Update: scratch memory stats + extended statistics

- replace generate_*_csv with generate_csv overloads
- added generate_csv for scratch memory
- enable stats for scratch memory
- replace ROCPROF_*_STATS env variables with ROCPROF_STATS env variable

* rocprofv3 update

- simple --stats option
- add scratch memory trace to --sys-trace

* Update tests/rocprofv3/tracing-hip-in-libraries

- extend validate.py to test stats data
- fix conftest.py for memory_copy_stats_data

* Code coverage fixes

- invoke __gcov_dump to ensure that code coverage is flushed after finalization

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ammar ELWazir <ammar.elwazir@amd.com>
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>

[ROCm/rocprofiler-sdk commit: bef14ad1b2]
2024-04-09 05:25:28 -05:00
Giovanni Lenzi Baraldi 2cd198a7e7 Gbaraldi/threadtrace2 (#724)
* Added first ATT API

* Finalizing thread trace API

* Fixing more rebase conflicts

* Added codeobj disassembly sample

* Fixing merge issues with rebase [2]

* Adding ATT packets

* Implemented thread trace intercept

* Moved codeobj parser to same repo as rocprofiler

* Moved thread trace to new API

* Fixing merge conflicts

* Fixing more merge conflicts

* Adding thread trace packet reuse

* Merged aql_profile_v2 headers

* Linked ATT sample to aqlprofile

* Updated decoder to include non-loaded codeobjs

* Implemented ISA decoder into ATT sample

* Added marker_id to vaddr

* Updating aql_profile_v2 API to memcpy

* Updating thread trace API to include 64bit markers. Using the result of ISA matching.

* Added instruction type and cycles summary

* Updated sample with selection of kernel by kernel_object

* Added option to copy from memory kernels

* Moved tool_data in thread_trace to dynamic alloc

* Restoring hsa.cpp

* Fixed ATT sample crash. General improvements.

* Moved codeobj library to outside src/

* Updated license header

* Moved codeobj_capture to camelcase

* Solving some more merge conflicts

* Update samples/advanced_thread_trace/CMakeLists.txt

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update samples/advanced_thread_trace/CMakeLists.txt

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update samples/code_object_isa_decode/CMakeLists.txt

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update source/lib/rocprofiler-sdk/thread_trace/CMakeLists.txt

* Removing unused parameter check

* Adding const to isEmpty

* Removing unused warning

* Adding libdw-dev to requirements

* Running clang-format

* Commenting out new aql calls

* Clang format

* Unused variable fix

* Adding codeobj-decoder coverage

* Commenting out threadtrace

* Update samples/CMakeLists.txt

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* P

* WOverloaded

* Addressing clang-tidy

* Virtual destructor on ttracer class

* Corr id

* Fixing code source format

* Update CMakeLists.txt

* Build fixes

* Update source/lib/rocprofiler-sdk-codeobj/code_object_track.cpp

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Fix shadowing

* Update CMakeLists.txt

* Update samples/CMakeLists.txt

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ammar ELWazir <ammar.elwazir@amd.com>
Co-authored-by: Ammar ELWazir <aelwazir@amd.com>
Co-authored-by: Benjamin Welton <bewelton@amd.com>

[ROCm/rocprofiler-sdk commit: 69b8a43dc6]
2024-04-08 12:43:02 -07:00
Gopesh Bhardwaj b501f25ba0 adding missing tool options (#746)
[ROCm/rocprofiler-sdk commit: d2bad14bf6]
2024-04-08 22:45:02 +05:30
Mythreya fb1b61d79a Add support for scratch reporting (#523)
* Add ToolsApiTable

Add ToolsApiTable wrapping for
scratch memory tracking

* Add initial support for scratch memory tracking

Buffering is implemented

* cmake formatting (cmake-format) (#525)

Co-authored-by: MythreyaK <MythreyaK@users.noreply.github.com>

* source formatting (clang-format v11) (#524)

Co-authored-by: MythreyaK <MythreyaK@users.noreply.github.com>

* Add callback tracing for scratch

Fixed the error where scratch tracking init was called irrespective of whether any client requested for it

* Apply suggestions from code review

Co-authored-by: Jonathan R. Madsen <jrmadsen@users.noreply.github.com>

* Fix tools api copy/update

Table were saved/updated incorrectly in previous
commit. Also adds passing user data through the callback

* Fix OpKind sequence for scratch tracking

Previously scratch was using OpKind from rocprofiler-sdk, but
templates were instantiated using API ID. These differ by 1

* Integration tests for scratch reporting

Added buffer and callback integration tests for scratch reporting

* source formatting (clang-format v11) (#550)

Co-authored-by: MythreyaK <26112391+MythreyaK@users.noreply.github.com>

* cmake formatting (cmake-format) (#551)

Co-authored-by: MythreyaK <26112391+MythreyaK@users.noreply.github.com>

* python formatting (black) (#549)

Co-authored-by: MythreyaK <26112391+MythreyaK@users.noreply.github.com>

* CI fixes

* source formatting (clang-format v11) (#554)

Co-authored-by: MythreyaK <26112391+MythreyaK@users.noreply.github.com>

* Update api

Rebase on main and updates based on PR feedback

* Update scratch reporting and address PR comments

- Added agent id to buffer records
- Updated `test_internal_correlation_ids` - Is almost identical to
  one in async-copy
- Updated scratch test to check for agent id
- Updated queue id serialization in callback records (prints
  handle as nested key)
- Remove `marker_api_traces` from scratch `test_internal_correlation_ids`
  validation test
- Rename `amd_tools_api` to `scratch_memory`
- Added doxygen comments
- Remove scratch callback from `tool.cpp`
- Replace assert with `LOF_IF` in `scratch_memory.cpp`

* Update tools table

Changed to match up with changes to hsa tables in main branch

* Rework scratch memory structure

* Update tests

- Added suggestions from PR review, and updated tests accordingly

* Misc cleanup

* Update scratch test

As of Apr 4th, `hsa_amd_agent_set_async_scratch_limit` is disabled.

Note,
> This API: `hsa_amd_agent_set_async_scratch_limit` is currently
> disabled. We need some changes in CP firmware to be able to do this
> and these changes are not ready yet.
> With the current code, you will also not get notifications for
> alternate-scratch allocations because this feature has been disabled
> while CP firmware is making additional changes
> We are hoping to have that feature enabled by ROCm-6.3

* Minor update to lib/rocprofiler-sdk/internal_threading.*

- delay destruction of shared_ptrs of the tasks to prevent rare (but possible) data race on the destruction of the shared_ptr

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: MythreyaK <MythreyaK@users.noreply.github.com>
Co-authored-by: Jonathan R. Madsen <jrmadsen@users.noreply.github.com>
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>

[ROCm/rocprofiler-sdk commit: 4fa165ec1a]
2024-04-05 20:32:57 -05:00
Ammar ELWazir 5d053f3a7c Update rerun.yml
[ROCm/rocprofiler-sdk commit: 5ebcc6b11a]
2024-04-05 16:47:30 -05:00
Ammar ELWazir fd82efc39c Update rerun.yml
[ROCm/rocprofiler-sdk commit: ba39f8c9cc]
2024-04-05 16:36:46 -05:00
Ammar ELWazir 4abc6812ce Update rerun.yml
[ROCm/rocprofiler-sdk commit: 966659eb5c]
2024-04-05 16:23:35 -05:00
Ammar ELWazir 80890632d5 Update rerun.yml
[ROCm/rocprofiler-sdk commit: fb48e28112]
2024-04-05 15:57:41 -05:00
Ammar ELWazir 55d1a14fc9 Update rerun.yml
[ROCm/rocprofiler-sdk commit: 417284cd51]
2024-04-05 13:30:01 -05:00
Ammar ELWazir 675d5baf2a Update rerun.yml (#743)
[ROCm/rocprofiler-sdk commit: 76b27fb2d0]
2024-04-05 12:28:16 -05:00
Ammar ELWazir 90b8328902 Update to Clang-tidy-15 (#742)
* Update continuous_integration.yml

* Update build.sh

* Update continuous_integration.yml

* Update build.sh

* Update continuous_integration.yml

[ROCm/rocprofiler-sdk commit: 176d1552cf]
2024-04-05 07:43:17 -05:00
Ammar ELWazir 7575ee58ce Update rerun.yml
[ROCm/rocprofiler-sdk commit: 91307cab11]
2024-04-04 21:38:01 -05:00
Ammar ELWazir 4d7b831f55 Rerun for pc-sampling runner-set (#741)
* Update rerun.yml

* Update rerun.yml

* Update rerun.yml

[ROCm/rocprofiler-sdk commit: 791aa0bcda]
2024-04-04 21:00:58 -05:00
Ammar ELWazir 4ed58bb885 Update rerun.yml
[ROCm/rocprofiler-sdk commit: eae890e335]
2024-04-04 12:21:32 -05:00
Ammar ELWazir c74379fa5b Update rerun.yml
[ROCm/rocprofiler-sdk commit: ad22340a8c]
2024-04-04 12:17:36 -05:00
Ammar ELWazir baf290269d Fixing Re-Run (#740)
* Update rerun.yml

* Update rerun.yml

* Update rerun.yml

* Update rerun.yml

[ROCm/rocprofiler-sdk commit: 48e4af1685]
2024-04-04 11:27:24 -05:00
Ammar ELWazir 9d846f0553 Fixing rerun comments (#738)
* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Rerun separated in different yml file

* Update rerun.yml

* Update rerun.yml

* Update rerun.yml

[ROCm/rocprofiler-sdk commit: 8c6017e7ff]
2024-04-04 11:02:14 -05:00
Ammar ELWazir e809612fff Adding PC Sampling CI (#739)
* Create ci_pc_sampling.yml

* Update continuous_integration.yml

* Update ci_pc_sampling.yml

* Update ci_pc_sampling.yml

* Update continuous_integration.yml

[ROCm/rocprofiler-sdk commit: 8c03c8a914]
2024-04-04 10:03:08 -05:00
Ammar ELWazir b5d4745e4e Adding useful scripts for formating and building (#737)
* Addin useful scripts for formating and building

* Update build.sh

* Update build.sh

* Update continuous_integration.yml

[ROCm/rocprofiler-sdk commit: 5bb087f072]
2024-04-04 06:49:17 -05:00
Benjamin Welton f090e6d784 Add debug printing for write interceptor injected packets (#674)
* Add debug printing for write interceptor injected packets

Adds debug printing for write interceptor injected
packets. All packets that pass through the write
intercepter while enabled will be printed.

Only executes/prints when the environment variable
GLOG_v is set to 2 or higher (otherwise it is a no-op
and the expression is not evaluated).

* source formatting (clang-format v11) (#675)

Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com>

* Changes on fmt location

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com>

[ROCm/rocprofiler-sdk commit: e0caae9ebc]
2024-04-03 18:14:22 -07:00
Benjamin Welton 80e32505d5 Convert LOG() -> ROCP_X logging macros. (#695)
* Convert LOG() -> ROCP_X logging macros.

This patch converts the LOG() macro to the ROCP_X logging macros.
There are the following levels of logs.

Logs whos expressions are not evaluated unless the log level is enabled:

ROCP_TRACE - VLOG(2) (enabeled by env variable GLOG_v=2)
ROCP_INFO - VLOG(1) (enabeled by env variable GLOG_v=1)

Logs whos expressions are always evaluated:

ROCP_WARNING - LOG(WARNING)
ROCP_ERROR - LOG(ERROR)
ROCP_FATAL - LOG(FATAL)
ROCP_DFATAL - DLOG(FATAL) (only fatal in debug mode)

* source formatting (clang-format v11) (#696)

Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com>

* Minor fix

* Fixes for VLOG before main

* fix vmodule

* source formatting (clang-format v11) (#718)

Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com>

* memory leak fix

* Vlog change

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com>

[ROCm/rocprofiler-sdk commit: 41c0ddd72d]
2024-04-02 17:15:30 -07:00
Gopesh Bhardwaj d7781d0b40 README update (#730)
* README update

* Addressing review comments

[ROCm/rocprofiler-sdk commit: 5e4dd502d9]
2024-04-02 14:11:05 -05:00
Ammar ELWazir 076fb895ec Update formatting.yml
[ROCm/rocprofiler-sdk commit: 872aa1b1d2]
2024-04-02 11:28:44 -05:00
Benjamin Welton 19ecb86ee3 Wait for all memory copies to complete before allowing destruction (#725)
* Wait for all mem copies to complete before destroying.

* Update source/lib/rocprofiler-sdk/hsa/async_copy.cpp

Co-authored-by: Ammar ELWazir <ammar.elwazir@amd.com>

* Update async_copy.cpp

---------

Co-authored-by: Ammar ELWazir <ammar.elwazir@amd.com>

[ROCm/rocprofiler-sdk commit: 1e612a5e52]
2024-04-02 08:22:37 -05:00
Jonathan R. Madsen 6fe6bcc832 Stop all client contexts prior to finalization (#721)
* Stop all client contexts prior to finalization

* Update lib/common/container/static_vector.hpp

- improve emplace_back for non-{move,copy}-assignable object

* Update samples/intercept_table/client.cpp

- improve robustness against static object destruction

* Update lib/rocprofiler-sdk/context/context.cpp

- change storage of registered context array
  - stable_vector of optional contexts
  - common::static_object wrapper around stable_vector

* Update samples/intercept_table/client.cpp

- use variable template for underlying function pointer

[ROCm/rocprofiler-sdk commit: 939e23e9d1]
2024-04-02 03:05:11 -05:00
Gopesh Bhardwaj 3cb4c162f7 SWDEV-451569: bug in tracing options (#728)
[ROCm/rocprofiler-sdk commit: e3c7eed7c0]
2024-04-02 03:03:02 -05:00
dependabot[bot] e5fdc0a747 Bump actions/configure-pages from 4 to 5 (#706)
Bumps [actions/configure-pages](https://github.com/actions/configure-pages) from 4 to 5.
- [Release notes](https://github.com/actions/configure-pages/releases)
- [Commits](https://github.com/actions/configure-pages/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/configure-pages
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

[ROCm/rocprofiler-sdk commit: 9d6809d0b6]
2024-04-02 02:34:32 -05:00
Ammar ELWazir a130be0ccc Formating Issue fix (#726)
* Update formatting.yml

* Update formatting.yml

* Update client.cpp

* Update formatting.yml

* Update samples/api_buffered_tracing/client.cpp

* Update client.cpp

[ROCm/rocprofiler-sdk commit: ddbcf34da5]
2024-04-02 02:14:59 -05:00
Ammar ELWazir 18940a08b8 Update validate.py (#727)
[ROCm/rocprofiler-sdk commit: c45573f559]
2024-04-02 01:59:33 -05:00
Ammar ELWazir 521e2794e6 Update run-ci.py (#641)
* Temp: Fixing node id

* source formatting (clang-format v11) (#709)

Co-authored-by: ammarwa <3832908+ammarwa@users.noreply.github.com>

* Using logical node id

* Update agent.cpp

* Update agent.cpp

* Python formatting

* Update run-ci.py

* Update run-ci.py

* Update continuous_integration.yml

* Update continuous_integration.yml

running directly using the prepared runner container

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update run-ci.py

* Clean up

* Fixing install paths

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Fixing GPU Agents Test Validation

* python formatting (black) (#712)

Co-authored-by: ammarwa <3832908+ammarwa@users.noreply.github.com>

* Fixing the issue with rocclr detected kernels __amd_rocclr_.*

* python formatting (black) (#713)

Co-authored-by: ammarwa <3832908+ammarwa@users.noreply.github.com>

* Fixing the issue with rocclr detected kernels __amd_rocclr_.*

* Fixing static number of async copies and using hsa_api instead for validation

* python formatting (black) (#714)

Co-authored-by: ammarwa <3832908+ammarwa@users.noreply.github.com>

* Increasing the time limit for waiting on active signals

* Update continuous_integration.yml

* Update async_copy.cpp

* Update CMakeLists.txt

* changing node id to logical node id in rocprofv3

* Update tool.cpp

* testing async mem copy signal decrement

* Update logging.cpp

* Update validate.py

---------

Co-authored-by: Ammar ELWazir <aelwazir@rocprofiler1.amd.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: ammarwa <3832908+ammarwa@users.noreply.github.com>
Co-authored-by: Ammar ELWazir <aelwazir@rocprofiler2.amd.com>
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>

[ROCm/rocprofiler-sdk commit: 2905fb5e95]
2024-04-02 01:39:24 -05:00
Ammar ELWazir c1c514f743 Use logical_node_id for mapping rocprofiler agents to HSA agents (#708)
* Temp: Fixing node id

* source formatting (clang-format v11) (#709)

Co-authored-by: ammarwa <3832908+ammarwa@users.noreply.github.com>

* Using logical node id

* Update agent.cpp

* Update agent.cpp

* Python formatting

---------

Co-authored-by: Ammar ELWazir <aelwazir@rocprofiler1.amd.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: ammarwa <3832908+ammarwa@users.noreply.github.com>
Co-authored-by: Ammar ELWazir <aelwazir@rocprofiler2.amd.com>
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>

[ROCm/rocprofiler-sdk commit: 62625d0aa1]
2024-04-02 01:38:18 -05:00
Benjamin Welton a79493bbb9 Revert "Add additional debug info and do iteration on per-agent basis" (#723)
This reverts commit a66d3475b6.

[ROCm/rocprofiler-sdk commit: 4200faf813]
2024-04-01 22:27:27 -07:00