Граф коммитов

410 Коммитов

Автор SHA1 Сообщение Дата
Benjamin Welton 055d6b722a [1/N] Agent Counter Collection Implementation (#832)
Added public API call to setup agent counter collection on a context.

Refactored the return types internally for dispatch counter collection
to use rocprofiler_status_t (allow for more verbose failures to be
surfaced via the API)

Subsequent commits will fill out the sampling functionality for agent
counter collection.

Co-authored-by: Benjamin Welton <ben@amd.com>

[ROCm/rocprofiler-sdk commit: cb3fc070c7]
2024-05-01 13:34:54 -07:00
Benjamin Welton 461caaf766 Code migration and include fixes (#830)
* Migrating code/reformatting

* Remove unnecessary includes
---------

Co-authored-by: Benjamin Welton <ben@amd.com>

[ROCm/rocprofiler-sdk commit: e21609c80e]
2024-04-29 15:48:50 -07:00
Jonathan R. Madsen f167317524 Public C++ header files and samples updates (#819)
* Public C++ header files (source/include/rocprofiler-sdk/cxx)

* Update samples/api_buffered_tracing

- scratch memory and page migration
- README

* Update samples/api_buffered_tracing

- page migration component in sample

* Update tests/page-migration/validate.py

- fix checks for page migration operation names

* Update tests/page-migration/validate.py

- fix get_allocated_pages

* Update scratch memory and page migration validations

* Fix include/rocprofiler-sdk/cxx installation

* Rework include/rocprofiler-sdk/cxx

- Improve name_info to support const char*, string_view, string

* Update samples/api_{buffered,callback}_tracing

* External correlation ID request sample

- includes correlation ID retirement demo

* Update samples/api_buffered_tracing/README.md

* Update lib/rocprofiler-sdk/hsa/queue.cpp

- generate correlation ID for kernel launch if one doesn't exist

* Remove priority check from tool libraries (samples/tests)

- if(priority > 0) return nullptr check in rocprofiler_configure has proliferated beyond its intended use

* Apply suggestions from code review

[ROCm/rocprofiler-sdk commit: de13d2ac5d]
2024-04-25 20:09:11 -05:00
Jonathan R. Madsen 9b747eb63c Correct timestamp skew adjustments for kernel and async copy tracing (#827)
[ROCm/rocprofiler-sdk commit: e2bce49655]
2024-04-25 14:36:11 -05:00
Vladimir Indic d0016ef728 Restructure code object source code (#826)
* public codeobj info

* Restructure code object source code file layout

* Update get_unloaded_code_objects + add iterate_loaded_code_objects

* Remove get_unloaded_code_objects from visible internal API

- iterate_loaded_code_objects + functor which filters on the hsa_executable_t effectively reproduces this behavior

* Whitespace removal

---------

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

[ROCm/rocprofiler-sdk commit: 733aa8e438]
2024-04-25 14:03:04 -05:00
Jonathan R. Madsen abe00ad1d0 Update CMake config install location + env setup files (#821)
- install cmake config files to CMAKE_INSTALL_LIBDIR instead of CMAKE_INSTALL_DATAROOTDIR per ROCm standards
- Provide setup-env.sh and modulefiles for rocprofiler-sdk and rocprofiler-sdk-roctx

[ROCm/rocprofiler-sdk commit: 67dbe3f47f]
2024-04-24 14:43:47 -05:00
Jonathan R. Madsen 3b6249bdac Rework counter collection sample app (#822)
* Sync more often in counter collection samples

* Update samples/counter_collection/main.cpp

- support command line arguments
  - number of iterations
  - iterations per sync
  - number of devices to use

[ROCm/rocprofiler-sdk commit: 8c985543d9]
2024-04-24 14:00:59 -05:00
Jonathan R. Madsen 312461ebe5 Fix LICENSE install location + CPACK_RPM_PACKAGE_LICENSE (#820)
- LICENSE needs to be installed in share/doc/rocprofiler-sdk not share/doc/rocprofiler
- CPACK_RPM_PACKAGE_LICENSE should be set to license type not the license location

[ROCm/rocprofiler-sdk commit: 5d365bb8b8]
2024-04-24 01:19:32 -05:00
Ammar ELWazir e165856721 Update rocprofiler_config_packaging.cmake (#817)
[ROCm/rocprofiler-sdk commit: 777add01d1]
2024-04-23 18:43:41 -05:00
Ammar ELWazir da744e88e5 Update docs.yml (#815)
[ROCm/rocprofiler-sdk commit: c93a55b070]
2024-04-22 22:50:34 -05:00
Jonathan R. Madsen 399f2cc660 Remove -Wno-missing-field-initializers from build flags (#810)
* Remove -Wno-missing-field-initializers

- Compiler errors if missing field initializers

* Update lib/rocprofiler-sdk/counters/evaluate_ast.cpp

- copy over dispatch ID in perform_reduction/evaluate

[ROCm/rocprofiler-sdk commit: 48273d6a65]
2024-04-22 22:26:01 -05:00
Vladimir Indic 843398eb3c Introducing PcSamplingExtTable (#735)
* pcs: updating the PCS table

* Fixing Clang Tidy errors

* pcs: reverting old table version

* testint wrong table size

* new size

* testing step

* reverting old steps

* hsa_amd_queue_get_info introduced

* pcs: testing table version

* formatting

* removing redundand declarations

* removing unnecessary files

* Apply suggestions from code review

* Apply suggestions from code review

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

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

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

* Enable function pointer offset check in hsa::pc_sampling::copy_table

- add offset() to HSA_API_META_DEFINITION
- check if offset() >= size of struct

* Support build without PC sampling API table

* ids for ROCr's PC sampling public functions

---------

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

[ROCm/rocprofiler-sdk commit: deabd869b5]
2024-04-22 20:07:28 -05:00
Ammar ELWazir 7c42a4eaf1 GPUs not needed for doc action (#804)
[ROCm/rocprofiler-sdk commit: 7589084197]
2024-04-22 11:00:43 -05:00
Benjamin Welton 261e4da484 Add default values for kernel struct (#798)
* Add default values for kernel struct

* Update hsa-queue-dependency app

- default initializers
- check HSA_AMD_MEMORY_POOL_INFO_RUNTIME_ALLOC_ALLOWED for memory pools
- clang-tidy fixes (member -> static, etc.)

* Update run-ci.py

- add --progress --output-on-failure -V if no other options regarding verbosity are passed
- improve the ability to control the stages

---------

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

[ROCm/rocprofiler-sdk commit: 29bc84ec0c]
2024-04-18 21:07:20 -05:00
Benjamin Welton a81a453940 clang-18 warning fixes (part 1) (#785)
* clang-18 warning fixes (part 1)

* format fixes

* More format fixes

* More format fixes

[ROCm/rocprofiler-sdk commit: c668028781]
2024-04-18 18:28:32 -05:00
Ammar ELWazir 360595c82e Enabling Mi200 & Mi300 Testing (#797)
* Enabling Mi200 & Mi300 Testing

* Update continuous_integration.yml

[ROCm/rocprofiler-sdk commit: 21170b870d]
2024-04-18 15:47:52 -05:00
Ammar ELWazir 45586a71b0 Stabilizing the machines used for testing (#771)
* Stabilizing the machines used for testing

* Update .github/workflows/continuous_integration.yml

* Update continuous_integration.yml

* Delete .github/workflows/ci_pc_sampling.yml

* Update continuous_integration.yml

- add mi300
- use if conditions for whether to run "extended" core tests

* Consistency in matrix for each job

* Update continuous_integration.yml

- include runner in core CDash name

* Update continuous_integration.yml

- remove mi300

* Update continuous_integration.yml

- add mi300

* Update CI workflow

- tweak "Install requirements" step

* Update CI workflow

- timeout on install requirements

* Update CI workflow

- revert sanitizers to gcc-12

* Update CI workflow

- remove core installation of clang-tidy (handled by python pip)

* Update CI workflow

- disable fast-fail

* Update CI workflow

- add runner to all build names
- remove mi200 and mi300

* Update CI workflow

- code coverage runs on navi3

* Update CI workflow

- add runner to all build names

* Tweak to CI sanitizer jobs

* Update CI workflow

- Handle excluded tests

* Update CI workflow

- Handle excluded tests (part 2)

* Update CI workflow

- Handle excluded tests (fix quotations)

---------

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

[ROCm/rocprofiler-sdk commit: ae2abb584b]
2024-04-18 13:48:57 -05:00
Jonathan R. Madsen acfc8a9999 Improve testing stability (#796)
- Update tests/bin/reproducible-runtime
  - tweak algorithm for sleeping
- Update lib/rocprofiler-sdk/hsa/async_copy
  - handle egregious skews for async copy times
- Update kernel tracing
  - handle egregious skews for kernel dispatch times
- Update lib/rocprofiler-sdk/hsa/code_object
  - use static object wrappers for code object info
- Update lib/rocprofiler-sdk-tool/config.cpp
  - fix data race in output_keys / get_local_datetime

[ROCm/rocprofiler-sdk commit: b953774580]
2024-04-18 11:42:51 -05:00
Giovanni Lenzi Baraldi 37fa6d25d3 Removed duplicated code (#784)
* Removed duplicated code

* Clang format

* Removing union from pc_sampling API

* Clang format

[ROCm/rocprofiler-sdk commit: b6c0b50d3e]
2024-04-18 07:42:26 -03:00
Jonathan R. Madsen 79176cacd9 Update samples/intercept_table (#792)
- install function wrappers around HIP runtime API
  - easily correlated to the executable
  - safer than HSA runtime due to potential for HSA to get invoked after main returns

[ROCm/rocprofiler-sdk commit: b570ff5273]
2024-04-18 05:30:34 -05:00
Jonathan R. Madsen 1514f05887 Async memory copy callback tracing + memory copy size (#791)
* Async memory copy tracing update

- rocprofiler_buffer_tracing_memory_copy_record_t: thread_id and bytes
- support ROCPROFILER_CALLBACK_TRACING_MEMORY_COPY
- init_public_api_struct can fully construct

* Testing for callback async copy tracing

[ROCm/rocprofiler-sdk commit: 12c836f95f]
2024-04-18 04:31:59 -05:00
Benjamin Welton 9368927196 Modified hipMalloc size for main.cpp in sample (#786)
* Modified hipMalloc size for main.cpp in sample

* Update samples/counter_collection/main.cpp

---------

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

[ROCm/rocprofiler-sdk commit: edb1883a05]
2024-04-18 04:28:56 -05:00
Jonathan R. Madsen 627a9f54f1 Simplify json-tool JSON schema for callback records (#790)
- formerly, the rocprofiler_callback_tracing_record_t data was stored in itr["record"], e.g. itr["record"]["correlation_id"]
  - dropped "record" key, e.g. itr["correlation_id"]

[ROCm/rocprofiler-sdk commit: 32bc339789]
2024-04-18 03:58:10 -05:00
Jonathan R. Madsen 7e166e2b5a PyTest utilities (#789)
- tests/pytest-packages/pytest_utils containing utilities for pytest validation tests
- example:

```python
from rocprofiler_sdk.pytest_utils.dotdict import dotdict
```

[ROCm/rocprofiler-sdk commit: 39dd5a81df]
2024-04-18 03:09:01 -05:00
Jonathan R. Madsen b8ecfee16d Fix kernel dispatch tracing operation names (#787)
- "ENQUEUE" -> "KERNEL_DISPATCH_ENQUEUE"
- "COMPLETE" -> "KERNEL_DISPATCH_COMPLETE"

[ROCm/rocprofiler-sdk commit: 93136ec042]
2024-04-18 01:06:39 -05:00
Jonathan R. Madsen 39550c1167 Update lib/rocprofiler-sdk/hsa/queue.cpp (#788)
- fix heap-use-after-free

[ROCm/rocprofiler-sdk commit: b7b2c294e0]
2024-04-18 00:05:55 -05:00
Benjamin Welton 3f9dc16864 Remove duplicate entries from derived counters (#782)
[ROCm/rocprofiler-sdk commit: 81afb310ff]
2024-04-17 13:47:02 -07:00
Jonathan R. Madsen 6d14616fbd Enable HSA packet write interception for callback kernel tracing (#780)
[ROCm/rocprofiler-sdk commit: 8cc28ae51d]
2024-04-17 14:55:04 -05:00
Benjamin Welton b7ed11552b Small error printout on test (#781)
[ROCm/rocprofiler-sdk commit: d173dd5c04]
2024-04-17 08:54:56 -07:00
Ammar ELWazir 0828f8723f Update ci_pc_sampling.yml (#744)
[ROCm/rocprofiler-sdk commit: 7ace7c5303]
2024-04-16 23:24:33 -05:00
Vladimir Indic 98b62efd12 pcs: API updated (#770)
[ROCm/rocprofiler-sdk commit: 200da0f274]
2024-04-16 22:51:16 -05:00
Ammar ELWazir 9896a89980 Update continuous_integration.yml
[ROCm/rocprofiler-sdk commit: 9ace9d5450]
2024-04-16 22:24:06 -05:00
Ammar ELWazir 53a5e5d8c9 Create scan.yaml
[ROCm/rocprofiler-sdk commit: 27f3c36b41]
2024-04-16 22:23:50 -05:00
Ammar ELWazir d5157cfad9 Fixing CI
[ROCm/rocprofiler-sdk commit: f6eb84a83e]
2024-04-16 22:16:46 -05:00
Ammar ELWazir 2ea6c6625d Update continuous_integration.yml (#779)
[ROCm/rocprofiler-sdk commit: fa882dbebb]
2024-04-16 22:09:46 -05:00
Ammar ELWazir e9377a21b2 Branches CI (#778)
* Update formatting.yml

* Update docs.yml

[ROCm/rocprofiler-sdk commit: 658bc57c10]
2024-04-16 21:49:55 -05:00
Giovanni Lenzi Baraldi 5b77c8335e Removed unused field (#774)
* Removed unused field

* Formatting

[ROCm/rocprofiler-sdk commit: fed296daed]
2024-04-16 23:34:47 -03:00
Ammar ELWazir 098bd37968 Adding Keyword search pattern (#768)
* 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

* Adding the scan as a script

* clean up

* Update continuous_integration.yml

[ROCm/rocprofiler-sdk commit: 87d549c8a9]
2024-04-16 21:08:32 -05:00
Ammar ELWazir c31f0fbc9a Adding libdw-dev for pc sampling ci (#776)
[ROCm/rocprofiler-sdk commit: e13c4b2f31]
2024-04-16 20:59:45 -05:00
Benjamin Welton a0ce5887d8 fix cmake formatting issue
[ROCm/rocprofiler-sdk commit: 7bb9ea39d6]
2024-04-16 23:51:11 +00:00
Benjamin Welton 1af410623d Remove unnecessary unknown gfx
[ROCm/rocprofiler-sdk commit: 95c25acfee]
2024-04-16 23:43:59 +00:00
Jonathan R. Madsen 5ee0fad20f Fix drm include for OpenSUSE (#767)
* Fix drm include for OpenSUSE

- uses libdrm/drm.h instead of drm/drm.h

* Fix "List Files" step in CI workflows

* Fix "List Files" step in CI workflows


[ROCm/rocprofiler-sdk commit: 2d5523b420]
2024-04-16 23:16:26 +00:00
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