Grafik Komit

254 Melakukan

Penulis SHA1 Pesan Tanggal
Giovanni Lenzi Baraldi 4e2144dbfa General fixes to ATT, packets and event ID retrieval (#960)
* General fixes to ATT, packets and event ID retrieval

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

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>
2024-07-04 03:58:45 -03:00
Jonathan R. Madsen 64b8f8370e Fix kernel trace gaps (#961)
- source/lib/rocprofiler-sdk/hsa/queue.cpp
  - Optimize WriteInterceptor to eliminate extra barrier packets causing gaps between kernels in kernel tracing
  - increase timeout_hint in hsa_signal_wait in set_profiler_active_on_queue
  - misc logging improvements
- source/lib/rocprofiler-sdk/counters/agent_profiling.cpp
  - increase timeout_hint in hsa_signal_wait in set_profiler_active_on_queue
- tests/rocprofv3/hsa-queue-dependency/CMakeLists.txt
  - add TIMEOUT for rocprofv3-test-hsa-multiqueue-execute
2024-07-02 18:49:04 -05:00
Giovanni Lenzi Baraldi a78753d392 Accumulation metrics support and update counter collection API to aqlprofile_v2 (#915)
* Updating to v3 API

* General fixes

* Extending dimension bits to 54

* Disabling agent profiling tests

* Fixed unit test

* Adding accumulate metric support for parsing counters (#609)

* Adding accumulate metric support for parsing counters

* Adding metric flag

* Updating tests

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

Co-authored-by: Manjunath-Jakaraddi <21177428+Manjunath-Jakaraddi@users.noreply.github.com>

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

Co-authored-by: jrmadsen <6001865+jrmadsen@users.noreply.github.com>

* Adding evaluate ast test

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

Co-authored-by: Manjunath-Jakaraddi <21177428+Manjunath-Jakaraddi@users.noreply.github.com>

* Update scanner generated file

* Adding flags to events for aqlprofile

* Fix Mi200 failing test

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Manjunath-Jakaraddi <21177428+Manjunath-Jakaraddi@users.noreply.github.com>
Co-authored-by: jrmadsen <6001865+jrmadsen@users.noreply.github.com>

* Revert "Extending dimension bits to 54"

This reverts commit 3cd6628452484044a93e129f27974f996a0e4c08.

* Removing CU dimension

* Fixing merge conflicts

* Revert "Disabling agent profiling tests"

This reverts commit 7e01518ed8c51fbb0c3b2575e1e0b8f9ddfa8237.

* Fixing merge conflicts

* Fix parser tests

* Adding accumulate metric documentation

* Update counter_collection_services.md

* Update index.md

* fix nested expression use

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

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

* Doc update

---------

Co-authored-by: Benjamin Welton <ben@amd.com>
Co-authored-by: Manjunath P Jakaraddi <manjunath180397@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Manjunath-Jakaraddi <21177428+Manjunath-Jakaraddi@users.noreply.github.com>
Co-authored-by: jrmadsen <6001865+jrmadsen@users.noreply.github.com>
Co-authored-by: Manjunath-Jakaraddi <manjunath.jakaraddi@amd.com>
2024-07-01 21:56:41 -03:00
Giovanni Lenzi Baraldi a045947a89 Removing cache of decoded lines and returning shared_ptr (#953) 2024-06-25 16:00:59 -03:00
Giovanni Lenzi Baraldi 8da0c35079 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>
2024-06-25 13:46:13 -03:00
Jonathan R. Madsen b62ba5f096 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
2024-06-25 02:51:41 -05:00
Jonathan R. Madsen af2f85ca93 Add logical_node_type_id field to rocprofiler_agent_t (#948)
* Add logical_node_type_id field to rocprofiler_agent_t

* Patch queue_controller
2024-06-24 23:18:58 -05:00
Jonathan R. Madsen 62ec95eae6 Sync queue and async copy on client finalizer (#950) 2024-06-24 20:38:34 -05:00
Jonathan R. Madsen 27fa455201 Fix documentation (#949) 2024-06-24 17:12:47 -05:00
Gopesh Bhardwaj eeec089d6b Fixing OpenSuse build (#947) 2024-06-23 12:55:36 +05:30
Gopesh Bhardwaj a60c4def00 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>
2024-06-22 00:10:54 +05:30
Jonathan R. Madsen 12785ad365 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>
2024-06-21 22:28:39 +05:30
Vladimir Indic 79e81c9b39 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.
2024-06-21 11:23:00 +02:00
Vladimir Indic b6833710dc PC Sampling IOCTL version check introduced (#944) 2024-06-20 08:20:46 +05:30
Benjamin Welton 81d1407565 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>
2024-06-19 00:11:03 -07:00
Benjamin Welton ab92bef1a4 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>
2024-06-18 23:40:19 -07:00
Ammar ELWazir c6ec8ca1db Update controller.cpp (#932)
* Update controller.cpp

* Update controller.cpp

* Formatting
2024-06-13 18:54:21 -05:00
Benjamin Welton ef156c3bee Remove unnecessary AgentCache argument from profile construction (#931)
This argument is not necessary. Removed.

Co-authored-by: Benjamin Welton <ben@amd.com>
2024-06-13 16:21:49 -07:00
Benjamin Welton 06d46ba3a0 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>
2024-06-13 19:40:57 +00:00
Giovanni Lenzi Baraldi 9676295d3d 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>
2024-06-13 15:29:29 -03:00
Vladimir Indic c66aacd537 Disable counter collection if PC sampling is enabled (#924) 2024-06-13 18:26:05 +02:00
Benjamin Welton c32d8b6696 Fix agent profiling for SQ counters (#919)
* Fix agent profiling for SQ counters


---------

Co-authored-by: Benjamin Welton <ben@amd.com>
2024-06-12 20:39:18 -07:00
Benjamin Welton 99340964a6 Fix for SLES/RHEL compilers (#925)
* Fix for SLES/RHEL compilers

---------

Co-authored-by: Benjamin Welton <ben@amd.com>
2024-06-12 20:38:35 -07:00
Manjunath P Jakaraddi c49719649b 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>
2024-06-12 16:25:06 -07:00
Benjamin Welton cfe3af9d7e 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).
2024-06-12 13:21:42 -07:00
Vladimir Indic b4f7154716 The NULL value of an internal correlation ID defined (#901) 2024-06-10 16:12:01 +02:00
Vladimir Indic 211ee219c4 Disable PC sampling service if counter collection service is configured (#899) 2024-06-10 15:13:49 +02:00
Benjamin Welton f5753d3ae3 Add dimension query to counter collection sample (#918)
Co-authored-by: Benjamin Welton <ben@amd.com>
2024-06-07 14:30:01 -07:00
Benjamin Welton 10fdba985f Added error log for query counter info (#903)
* Added error log for query counter info
2024-06-07 13:27:14 -07:00
Benjamin Welton 45e165b256 Add calls to stop and wait for a debugger (#916)
Co-authored-by: Benjamin Welton <ben@amd.com>
2024-06-07 13:04:52 -07:00
Benjamin Welton 680448c444 Small doc update to remove restrictions no longer present (#917)
* Small doc update to remove restrictions no longer present
2024-06-06 16:30:48 -07:00
Benjamin Welton 2f3a8b05b3 Use fixed size array for serialization (#906)
Co-authored-by: Benjamin Welton <ben@amd.com>
2024-06-05 02:02:01 -07:00
Vladimir Indic 1c5bf63dbc PC sampling: CID manager unit test (#898) 2024-06-04 13:16:26 -05:00
Ammar ELWazir 5347c124c5 DRM Issue Fix for SLES 15 (#897)
* DRM Issue Fix

* Formatting Fix
2024-06-04 13:16:26 -05:00
Ammar ELWazir 1bda31993f Update pc_sampling.md (#896)
* Update pc_sampling.md

* Update pc_sampling.md
2024-05-30 00:42:09 -05:00
Jonathan R. Madsen a76f61a0a3 Migrate to rocprofiler-sdk:: namespace in CMake everywhere (#892)
- remove all usage/support for rocprofiler:: namespace
2024-05-29 22:28:43 -05:00
Jonathan R. Madsen 5525b400c3 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
2024-05-29 16:45:56 -05:00
Saurabh Verma 665fd567eb Adding AID dimension for UMC support (#886)
* Adding AID dimension for UMC support

* fix for parser.reduction test
2024-05-29 15:09:56 -05:00
Gopesh Bhardwaj 6c41b8d73a 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>
2024-05-29 12:01:02 -05:00
Giovanni Lenzi Baraldi 1b95089c28 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
2024-05-29 11:09:28 -05:00
Benjamin Welton 2225153c23 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>
2024-05-29 10:35:49 -05:00
Giovanni Lenzi Baraldi 385980e279 Moving ATT to amd_detail (#885)
* Moving ATT to amd_detail

* Formatting
2024-05-29 11:28:01 -03:00
Jonathan R. Madsen fbf0b49e22 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"
2024-05-29 13:40:26 +02:00
Vladimir Indic c45bf712d1 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>
2024-05-29 12:55:47 +02:00
Gopesh Bhardwaj dc054eea76 Adding python script for rocprofv3 (#849)
* Adding python script for rocprofv3

* script update

* updating script

* Fixing script for counter collection tests

* Fixing Sanitizer issues

* Adding YAML input file support

* Fixing counter validation tests

* script modifications

* Adding missing LD_PRELOAD

* doc updates

* Adding test for yaml input

* updated yaml extension support in doc

* backward compatibility

* updating scripts

* Fixing git history rocprofv3- part1

* Fixing git history rocprofv3- part2

* Fixing rocprofv3 history final

* Rebasing PR 860 for json support

* Review comments: Parser updates

* Removed color encoding and rebasing again

* Addressing review comments

* removing globals

* Update rocprofv3.py

- update tests to conform to new argparse requirements
- added support for JSON

* Slight tweak to update_env for ROCP_OUTPUT_FORMAT

* Update rocprofv3.py

- Handle ROCPROF_PRELOAD
- Add --preload option
- Add --kernel-names option

* Update rocprofv3.py

- Fix update_env handling of prepend/append
- Tweak --preload argument

---------

Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
2024-05-29 05:05:10 -05:00
Giovanni Lenzi Baraldi a84c9fa7d4 Removing code object static library (#865)
* Removing static library build for codeobj library

* Moving codeobj library to amd_detail

* Formatting

* Formatting

* Adding findDW

* Adding libdw to common samples cmake
2024-05-28 23:15:11 -03:00
Vladimir Indic 7201aa321e (IMPORTANT: AFAR V ) Hide PC sampling if HSA does not support it. (#881)
* Hide PC sampling if HSA does not support it.

* missing hsa.hpp include
2024-05-29 03:02:14 +02:00
Benjamin Welton 00f31e593c Build fixes for clang-18 (#880)
Fixes unnecessary inline and ambiguous conditional return.
2024-05-28 17:01:50 -07:00
Benjamin Welton 705a791553 Added static construct to topology (#868)
* Added static construct to topology
2024-05-28 15:06:54 -07:00
Vladimir Indic 05890c2231 Updating kfd_ioctl.h 1.17 (#872)
The KFD minor version has been bumped to 17.
2024-05-28 17:26:18 +02:00