Commit Graph

337 Commits

Author SHA1 Message Date
Ammar ELWazir 55a6d2fd1b Update continuous_integration.yml (#926)
* 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

---------

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

[ROCm/rocprofiler-sdk commit: 29d8b14374]
2024-06-26 12:40:52 +05:30
Giovanni Lenzi Baraldi 5a5e1f22a6 Removing cache of decoded lines and returning shared_ptr (#953)
[ROCm/rocprofiler-sdk commit: a045947a89]
2024-06-25 16:00:59 -03:00
Giovanni Lenzi Baraldi 3327f10d81 Adding wrappers on HSA for executable load/unload and allowing multiple agents per context on ATT (#951)
* Codeobj wrappers around HSA calls for ATT

* Formatting

* Bookeeping

* Tidy

* Tidy

* Update source/lib/rocprofiler-sdk/thread_trace/code_object.hpp

Co-authored-by: Vladimir Indic <139573562+vlaindic@users.noreply.github.com>

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

Co-authored-by: Vladimir Indic <139573562+vlaindic@users.noreply.github.com>

* Variable naming

---------

Co-authored-by: Vladimir Indic <139573562+vlaindic@users.noreply.github.com>

[ROCm/rocprofiler-sdk commit: 8da0c35079]
2024-06-25 13:46:13 -03:00
Jonathan R. Madsen 869a5693d1 Remove fatal error when callback and buffer tracing API in one context (#952)
- one context for callback and buffer tracing of same API produces erroneous fatal error -- this is a valid use case

[ROCm/rocprofiler-sdk commit: b62ba5f096]
2024-06-25 02:51:41 -05:00
Jonathan R. Madsen 0ce0771c23 Add logical_node_type_id field to rocprofiler_agent_t (#948)
* Add logical_node_type_id field to rocprofiler_agent_t

* Patch queue_controller

[ROCm/rocprofiler-sdk commit: af2f85ca93]
2024-06-24 23:18:58 -05:00
Jonathan R. Madsen d794084a45 Sync queue and async copy on client finalizer (#950)
[ROCm/rocprofiler-sdk commit: 62ec95eae6]
2024-06-24 20:38:34 -05:00
Jonathan R. Madsen 30e73506ea Fix documentation (#949)
[ROCm/rocprofiler-sdk commit: 27fa455201]
2024-06-24 17:12:47 -05:00
Gopesh Bhardwaj 3faed47bc2 Fixing OpenSuse build (#947)
[ROCm/rocprofiler-sdk commit: eeec089d6b]
2024-06-23 12:55:36 +05:30
Gopesh Bhardwaj 076f4d8427 readthedocs updates (#877)
* readthedocs updates

* Adding License

* correcting table of contents path

* Move doc requirements to sphinx dir

* Compile requirements.txt

* Update path to reqs

* Adding missing python module

* changing sphinx version

* changing docutils version

* enabling sphinx extensions

* trying sphinx-rtd-theme

* Remove unused doc configs

* Remove unused html theme options

* Add files to toc

* temp commit to test

* updating environment.yml for CI build

* Update doc requirements

To include rocprofiler-sdk in projects.yaml

* Set external_projects_current_project as rocprofiler-sdk

* Exclude external projects

* Fix warning for missing static path

* updating conf.py

* Removing reST syntax

* Use rocm-docs-core doxygen integration

* Remove RST syntax from Markdown files

* Generate doxyfile post checkout on RTD

* Use custom RTD env

* Specify mambaforge

* Put conda before post checkout cmd

* Add doxyfile for RTD

* Run cmake from conf.py

* Update environment.yml

* Use mambaforge

* Fix path to environment.yml

* Call build doxyfile

* Add Developer API title to Doxyfile

* Config version header

* Fix typo in conf.py

* Format fix for conf.py

* Increasing timeout for build-docs-from-source

* Remove README as mainpage for doxyfile

* Fix formatting in conf.py

---------

Co-authored-by: Sam Wu <22262939+samjwu@users.noreply.github.com>

[ROCm/rocprofiler-sdk commit: a60c4def00]
2024-06-22 00:10:54 +05:30
Jonathan R. Madsen 0114bcad4b Add HSA tracing support for hsa_amd_vmem_address_reserve_align (#946)
* Add support for hsa_amd_vmem_address_reserve_align

* Update lib/rocprofiler-sdk/hsa/types.hpp

- support HSA_AMD_EXT_API_TABLE_STEP_VERSION == 0x2 for HSA v1.14.0

---------

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

[ROCm/rocprofiler-sdk commit: 12785ad365]
2024-06-21 22:28:39 +05:30
Vladimir Indic 2e10d7e2fa PC sampling IOCTL versioning refactored (#945)
The following changes are introduced:
- Use functions instead of macros.
- Verify the error code when querying KFD IOCTL version.
- Skip tests and samples if KFD IOCTL < 1.16 or PC Sampling IOCTL < 0.1.

[ROCm/rocprofiler-sdk commit: 79e81c9b39]
2024-06-21 11:23:00 +02:00
Gopesh Bhardwaj 754c769994 doc update for 6.2 release (#938)
* doc update for 6.2 release

* Adding warning for gerrit->github nightly sync

[ROCm/rocprofiler-sdk commit: 5536bb5fc2]
2024-06-20 08:38:47 +05:30
Vladimir Indic 439598f169 PC Sampling IOCTL version check introduced (#944)
[ROCm/rocprofiler-sdk commit: b6833710dc]
2024-06-20 08:20:46 +05:30
Benjamin Welton df0f321286 Incremental Counter Profile Creation (#933)
* Incremental Counter Profile Creation

Adds support for incremental counter creation. How this functions is the
behavior of rocprofiler_create_profile_config has been changed.

rocprofiler_create_profile_config(rocprofiler_agent_id_t           agent_id,
                                  rocprofiler_counter_id_t*        counters_list,
                                  size_t                           counters_count,
                                  rocprofiler_profile_config_id_t* config_id)

The behavior of this function now allows an existing config_id to be
supplied via config_id. The counters contained in this config will be
copied over and used as a base for a new config along with any counters
supplied in counters_list. The new config id is returned via config_id
and can be used in future dispatch/agent counting sessions.

A new config is created over modifying an existing config since there
is no gaurentee that the existing config isn't already in use. While we
could add locks (or other mutual exclusion properties) to check if its
in use and reject an update, the benefit from doing so is minor in
comparison to just creating a new config. This also side steps a common
pattern a tool may use to add additional counters at some point later on
during execution. Now they can do that without destroying the existing
config.

---------

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

[ROCm/rocprofiler-sdk commit: 81d1407565]
2024-06-19 00:11:03 -07:00
Benjamin Welton 88f277107e Replicate global counters across all derived counters (#936)
Fix derived counters to have globals replicated across all architectures (that support them).
---------

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

[ROCm/rocprofiler-sdk commit: ab92bef1a4]
2024-06-18 23:40:19 -07:00
Ammar ELWazir a7d7d47576 Pumping down the ioctl version for CI only (#928)
* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

* Update continuous_integration.yml

[ROCm/rocprofiler-sdk commit: 9364754e66]
2024-06-14 00:30:04 -05:00
Ammar ELWazir 2f8e9a312b Update controller.cpp (#932)
* Update controller.cpp

* Update controller.cpp

* Formatting

[ROCm/rocprofiler-sdk commit: c6ec8ca1db]
2024-06-13 18:54:21 -05:00
Benjamin Welton a24b266138 Remove unnecessary AgentCache argument from profile construction (#931)
This argument is not necessary. Removed.

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

[ROCm/rocprofiler-sdk commit: ef156c3bee]
2024-06-13 16:21:49 -07:00
Benjamin Welton 1136afe587 Allow multiple agents in a single context for agent profiling (#908)
Allow multiple profiles for agent profiling

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


[ROCm/rocprofiler-sdk commit: 06d46ba3a0]
2024-06-13 19:40:57 +00:00
Giovanni Lenzi Baraldi 37b0cfd7dc ATT API changes - add user_data field and separation of dispatch vs agent profiling (#893)
* DRM Issue Fix for SLES 15 (#897)

* DRM Issue Fix

* Formatting Fix

* PC sampling: CID manager unit test (#898)

* Adding per-dispatch userdata field to ATT

* Clang tidy

* Formatting

* Update source/lib/rocprofiler-sdk/hsa/aql_packet.hpp

Co-authored-by: Vladimir Indic <139573562+vlaindic@users.noreply.github.com>

* Adding dispatch_id, fixing user_data and update aql_profile_v2

* Formatting

* Tidy fixes

* Second fix for userdata

* removing assert for union

* Adding serialization. Created agent profiling-like thread trace

* Implemented agent thread trace

* Update source/lib/rocprofiler-sdk/hsa/aql_packet.hpp

Co-authored-by: Vladimir Indic <139573562+vlaindic@users.noreply.github.com>

* Restructured thread trace packets

* Added agent API tests

* Fixing multigpu for agent test

* Formatting

* Formatting

* Improving header locations

* Fixing merge conflicts

* Tidy

* Tidy

* Tidy

---------

Co-authored-by: Ammar ELWazir <ammar.elwazir@amd.com>
Co-authored-by: Vladimir Indic <139573562+vlaindic@users.noreply.github.com>

[ROCm/rocprofiler-sdk commit: 9676295d3d]
2024-06-13 15:29:29 -03:00
Gopesh Bhardwaj f7c804f916 docs and tests format (#927)
[ROCm/rocprofiler-sdk commit: 2cfd88e571]
2024-06-13 22:59:20 +05:30
Vladimir Indic 6119a60191 Disable counter collection if PC sampling is enabled (#924)
[ROCm/rocprofiler-sdk commit: c66aacd537]
2024-06-13 18:26:05 +02:00
Benjamin Welton e31b06a7f2 Fix agent profiling for SQ counters (#919)
* Fix agent profiling for SQ counters


---------

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

[ROCm/rocprofiler-sdk commit: c32d8b6696]
2024-06-12 20:39:18 -07:00
Benjamin Welton 1d9efb38bf Fix for SLES/RHEL compilers (#925)
* Fix for SLES/RHEL compilers

---------

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

[ROCm/rocprofiler-sdk commit: 99340964a6]
2024-06-12 20:38:35 -07:00
Manjunath P Jakaraddi 0f51b3b55e SWDEV-465322: Adding support for Perfcounter SIMD Mask in ATT (#910)
* SWDEV-465322: Adding support for r Perfcounter SIMD Mask in ATT

* Apply suggestions from code review

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

* Adding unit tests

* Adding counters check for gfx9 and SQ block only

* Addressing review comments

* changing the struct size

* fixing header includes

---------

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

[ROCm/rocprofiler-sdk commit: c49719649b]
2024-06-12 16:25:06 -07:00
Benjamin Welton f61d91057a Remove duplicate table code from tests (#922)
* Remove duplicate table code from tests

Remove duplicate HSA table code from tests. Cleanup
includes (and remove unnecessary ones).


[ROCm/rocprofiler-sdk commit: cfe3af9d7e]
2024-06-12 13:21:42 -07:00
Vladimir Indic ba1e5d1ff3 The NULL value of an internal correlation ID defined (#901)
[ROCm/rocprofiler-sdk commit: b4f7154716]
2024-06-10 16:12:01 +02:00
Vladimir Indic b1c3ec2212 Disable PC sampling service if counter collection service is configured (#899)
[ROCm/rocprofiler-sdk commit: 211ee219c4]
2024-06-10 15:13:49 +02:00
Benjamin Welton 81f97422fb Add dimension query to counter collection sample (#918)
Co-authored-by: Benjamin Welton <ben@amd.com>

[ROCm/rocprofiler-sdk commit: f5753d3ae3]
2024-06-07 14:30:01 -07:00
Benjamin Welton 2662909daf Added error log for query counter info (#903)
* Added error log for query counter info


[ROCm/rocprofiler-sdk commit: 10fdba985f]
2024-06-07 13:27:14 -07:00
Benjamin Welton 22f6109d1e Small change to sample for clarity (#913)
Co-authored-by: Benjamin Welton <ben@amd.com>

[ROCm/rocprofiler-sdk commit: 3d9a448797]
2024-06-07 13:05:46 -07:00
Benjamin Welton 1cbb4bcd94 Add calls to stop and wait for a debugger (#916)
Co-authored-by: Benjamin Welton <ben@amd.com>

[ROCm/rocprofiler-sdk commit: 45e165b256]
2024-06-07 13:04:52 -07:00
Benjamin Welton f8dd1369f9 Small doc update to remove restrictions no longer present (#917)
* Small doc update to remove restrictions no longer present


[ROCm/rocprofiler-sdk commit: 680448c444]
2024-06-06 16:30:48 -07:00
Benjamin Welton 29628c5bc5 Use fixed size array for serialization (#906)
Co-authored-by: Benjamin Welton <ben@amd.com>

[ROCm/rocprofiler-sdk commit: 2f3a8b05b3]
2024-06-05 02:02:01 -07:00
Vladimir Indic cb69616d46 PC sampling client: using raw pointers (#902)
* PC sampling client: using raw pointers to prevent premature destruction of buffers

* PCS client: freeing buffer_ids

[ROCm/rocprofiler-sdk commit: b0c41827c3]
2024-06-04 13:16:26 -05:00
Ammar ELWazir 1c0dcebe94 Update client.cpp (#900)
[ROCm/rocprofiler-sdk commit: 0e43a30de0]
2024-06-04 13:16:26 -05:00
Vladimir Indic 592d9edf6e PC sampling: CID manager unit test (#898)
[ROCm/rocprofiler-sdk commit: 1c5bf63dbc]
2024-06-04 13:16:26 -05:00
Ammar ELWazir 008c808174 DRM Issue Fix for SLES 15 (#897)
* DRM Issue Fix

* Formatting Fix

[ROCm/rocprofiler-sdk commit: 5347c124c5]
2024-06-04 13:16:26 -05:00
Ammar ELWazir ec60eb0e23 Update pc_sampling.md (#896)
* Update pc_sampling.md

* Update pc_sampling.md

[ROCm/rocprofiler-sdk commit: 1bda31993f]
2024-05-30 00:42:09 -05:00
Jonathan R. Madsen 12ae4e6ce4 Migrate to rocprofiler-sdk:: namespace in CMake everywhere (#892)
- remove all usage/support for rocprofiler:: namespace

[ROCm/rocprofiler-sdk commit: a76f61a0a3]
2024-05-29 22:28:43 -05:00
Jonathan R. Madsen ada9d97b78 Miscellanous AFAR 5 Updates (#891)
* Dispatch table copy/update uses ROCP_TRACE instead of ROCP_INFO

* Update rocprofiler-sdk CMake config

- rocprofiler::rocprofiler is alias to rocprofiler-sdk::rocprofiler-sdk instead of other way around

* Prefer rocprofiler-sdk::rocprofiler-sdk over rocprofiler::rocprofiler

* Fix WITH_UNWIND for glog

- requires a value of "none" instead of boolean now

* Update include/rocprofiler-sdk/registration.h

- explicit struct names to permit forward decl

* Update include/rocprofiler-sdk/cxx/serialization.hpp

- ROCPROFILER_SDK_CEREAL_NAMESPACE_BEGIN and ROCPROFILER_SDK_CEREAL_NAMESPACE_END to enable customized namespace

[ROCm/rocprofiler-sdk commit: 5525b400c3]
2024-05-29 16:45:56 -05:00
Saurabh Verma 4fb92ff114 Adding AID dimension for UMC support (#886)
* Adding AID dimension for UMC support

* fix for parser.reduction test

[ROCm/rocprofiler-sdk commit: 665fd567eb]
2024-05-29 15:09:56 -05:00
Gopesh Bhardwaj df0f64634a Update README.md (#888)
Updating ill formatted README

[ROCm/rocprofiler-sdk commit: c0542cbfb2]
2024-05-29 12:36:13 -05:00
Gopesh Bhardwaj 80e48b11e0 Doc updates for AFAR V (#875)
* Doc updates for AFAR V

* doc updates

* Updating All AFAR history

* updating table with --output-format

* updating doc for yaml and json support

* Update source/docs/pc_sampling.md

* Update README.md

* Update source/docs/pc_sampling.md

Co-authored-by: Vladimir Indic <139573562+vlaindic@users.noreply.github.com>

* Update pc_sampling.md

---------

Co-authored-by: Ammar ELWazir <ammar.elwazir@amd.com>
Co-authored-by: Vladimir Indic <139573562+vlaindic@users.noreply.github.com>

[ROCm/rocprofiler-sdk commit: 6c41b8d73a]
2024-05-29 12:01:02 -05:00
Giovanni Lenzi Baraldi e3ee7a5d0c Enable ATT continuous mode and code object tracing registration (#850)
* Adding ATT continuous mode and ATT code object tracking

* Fixing aql_packet.cpp

* Updating to aqlprofile codeobj changes

* Removing kernel packet from ATT dispatch callback

* Changing getSymbolMap() to return relative vaddr

* Tidy fixes

* Formatting

* Fix shadowing

* Fixing packet test

* Updating tests

* Simplifying multi-agent traces

* Adding dynamic codeobj tracking

* leftover book-keeping for codeobj markers

* Formatting

* Formatting

* Temporary removing codeobj marker

* Formatting

* Re-enabling codeobj tracking

* Making copy of coreapi table

* Fixing issues with toolData lifetile

* Formatting

* Fixing issues with ASAN

* Improving memory profile

* Removing misplaced annotation

* Fixing queue type and allowing shared_locks in globalThreadTracer

* Update logging

* Changing ATT formats to be more in line with the SDk (#883)

* Fixing some merge conflicts

* Fixing cmakelists

* Fixing merge conflicts

* Formatting

[ROCm/rocprofiler-sdk commit: 1b95089c28]
2024-05-29 11:09:28 -05:00
Benjamin Welton cc44c48952 Test fix for AQLProfile changes (#882)
* Test fix for AQLProfile changes

AQL profile recently changed where the ordering
of packets now needs to be read then stop (instead
of stop and read previously). This change supports
the newer model.

* Update source/lib/rocprofiler-sdk/counters/dispatch_handlers.cpp

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

* test barrier

---------

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

[ROCm/rocprofiler-sdk commit: 2225153c23]
2024-05-29 10:35:49 -05:00
Kiran Thumma d1a5031722 adding keyword scan (#874)
* adding keyword scan

* update

* update

* update

* checking on fix

* check

* check

* check

* check

* update

[ROCm/rocprofiler-sdk commit: ba14e748ca]
2024-05-29 09:41:59 -05:00
Giovanni Lenzi Baraldi c160884b44 Moving ATT to amd_detail (#885)
* Moving ATT to amd_detail

* Formatting

[ROCm/rocprofiler-sdk commit: 385980e279]
2024-05-29 11:28:01 -03:00
Jonathan R. Madsen 4bde9b2152 Updates to compilation without HSA PC sampling support (#887)
- move ROCPROFILER_SDK_HSA_PC_SAMPLING define from lib/rocprofiler-sdk/hsa/hsa.hpp to lib/rocprofiler-sdk/pc_sampling/defines.hpp
- Update lib/rocprofiler-sdk/pc_sampling/CMakeLists.txt to return if HSA version is < 1.14.0
- update various includes for "lib/rocprofiler-sdk/pc_sampling/defines.hpp"

[ROCm/rocprofiler-sdk commit: fbf0b49e22]
2024-05-29 13:40:26 +02:00
Vladimir Indic 86b6063aad PC Sampling - blit kernels handling (#878)
* correlation id 0 for blit kernels' samples

* rocprofiler_pc_sampling_snapshot_v1_t docs update (for future use)

* ROCPROFILER_CORRELATION_ID_VALUE_NONE introduced

* Simplifying ROCPROFILER_CORRELATION_ID_VALUE_NONE

* Apply suggestions from code review

Co-authored-by: Vladimir Indic <139573562+vlaindic@users.noreply.github.com>

---------

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

[ROCm/rocprofiler-sdk commit: c45bf712d1]
2024-05-29 12:55:47 +02:00