Commit Graph

8920 Commits

Author SHA1 Message Date
Arif, Maisam 40671be7c9 Revert "Correct the dependencies of rocm_smi package."
This reverts commit 6d53d9f9cf.
2025-05-18 10:34:28 -05:00
Arif, Maisam a0ad4a3fcd Revert "Use devel in RPM package requires field"
This reverts commit cea68cd940.
2025-05-18 10:34:28 -05:00
Arif, Maisam c7797b19a3 Revert "Use the alphabetic 'or' in the CPack RPM package Requires field."
This reverts commit 4d201ad2c2.
2025-05-18 10:32:12 -05:00
Baraldi, Giovanni 65786f619d [RSERP-1802] Add trace decoder to API (#398)
* Add trace decoder to API.

* Cleanup and activity

* Rename

* Minor fix

* Replace tt/TT with thread_trace/THREAD_TRACE

- public API types are not abbreviated

* Fix aliases

* Build system updates

- activate clang-tidy for all subfolders in lib
- fix addition of sources for att-tool

* Fix clang-tidy issues with lib/att-tool/counters.{hpp,cpp}

* Delete counters.cpp

* Formatting

---------

Co-authored-by: Giovanni Baraldi <gbaraldi@amd.com>
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
2025-05-17 12:08:33 -07:00
Ben Richard 41dd4aab90 Update illegal character check for profile name (#703) 2025-05-16 15:45:16 -04:00
cfallows-amd 43dbf38b27 Check mode during soc init for roofline (#705)
Check mode before creating roofline object- skip if only printing specs

Signed-off-by: Carrie Fallows <Carrie.Fallows@amd.com>
2025-05-16 12:54:53 -04:00
Madsen, Jonathan 3eb921a34c [CI] Disable page-migration tests (#396)
* Disable page-migration tests

* Account for gfx hexadecimal characters

* Update continuous integration action

- remove test exclude for test-page-migration since test is disabled at cmake level

* Fix internal ctest error

---------

Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
2025-05-16 09:33:46 -07:00
David Galiffi fc08d56fb4 Update Dockerfiles (#207)
Add chrpath to dockerfiles
2025-05-15 21:06:12 -04:00
Ranjith Ramakrishnan 4d201ad2c2 Use the alphabetic 'or' in the CPack RPM package Requires field.
Using the OR symbol "|" is causing error in cpack
2025-05-15 15:28:26 -07:00
Castillo, Juan 47f80145cb Fix WARNING: AMD GPUs visible, but data is inaccessible (#58)
* [SWDEV-531834] Fix AMD GPUs visible, but data is inaccessible:
- Scans directories under /sys/bus/pci/drivers/amdgpu
- Verifies each device's runtime_status to determine if it's active
- Returns False if any device is not in active state
- Handles permission errors gracefully with proper debug logging
- Includes comments explaining behavior differences between Instinct / NAVI hardware

The default status is set to True, assuming devices are active unless
proven otherwise, which accommodates hardware like some Instinct ASICS
which do not support runtime power management.

Signed-off-by: Juan Castillo <juan.castillo@amd.com>
2025-05-15 14:30:33 -05:00
vedithal-amd 7b755fcd86 Fix MI350 tests (#706)
- TCC counter collection tests are still failing due to recent
  rocprofiler-sdk change
2025-05-15 13:37:55 -04:00
Pranjal Swarup 4c7560c78c ROCPROFSYS_AMD_SMI_METRICS visibility (#208)
* Removed advanced category from ROCPROFSYS_AMD_SMI_METRICS to have this property visible with rocprof-sys-avail.
2025-05-15 13:31:40 -04:00
Vignesh Edithal 6522fe954b Add James Siddley to code reviewers 2025-05-15 12:14:39 -04:00
Welton, Benjamin 33e43e66d3 [SDK] Standardize rocprofiler-sdk counter definition YAML schema (#370)
* Convert YAML Format

Convert YAML format and reader to properly read the YAML.

Comparison between output's from the YAML show only changes in ordering
of architectures (and ids).

* Test fixes

* Add script for converting the YAML schema to source/scripts

* Update documentation

* Change the extra counter code block to YAML

* Add missing new line at EOF

* remove name issues

---------

Co-authored-by: Benjamin Welton <bewelton@amd.com>
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
2025-05-14 13:31:51 -05:00
Madsen, Jonathan 8a1ee46e47 [SDK] Fix double buffer data race (#394)
* Fix double buffer data race

- fixes relatively rare data race in double buffering scheme

In `rocprofiler::buffer::instance::emplace`, the `container::record_header_buffer::get_record_headers()` function returned a `std::vector<rocprofiler_record_header_t*>` and then invoked callback to tool. It was possible for that callback to still be executing while the buffer was being updated. This potentially introduced a scenario where the rocprofiler_record_header_t* was modified (or corrupted) before the tool processed the record. In rocprofv3, this would result in a "future" buffer record showing up among "past" buffer records. E.g., correlation id sequence of 1-15 where the buffer flushes after five values, could result in this during processing:
|     |     |     |     |      |
|:---:|:---:|:---:|:---:|:---:|
|  1 |  2 |  3 |  4 | 15 |
|  6 |  7 |  8 |  9 | 10 |
| 11 | 12 | 13 | 14 | 15 |

Because buffer A (of double buffering scheme) originally containing corr ids 1-5 stalled after process corr id 4 (e.g. write to disk), buffer B filled up with 6-10 and started flushing, causing a switch back to buffer A, and buffer A was filled with 11-15 by the time callback accessed what was originally corr id 5 but was now updated to corr id 15.

* Update CHANGELOG

* misc minor cleanup

---------

Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
2025-05-14 13:19:22 -05:00
srawat 3357346df7 Update install.rst 2025-05-14 11:44:05 -05:00
Kandula, Venkateshwar reddy 6ec9526475 [docs] Improve readability of ROCprofiler-SDK API library documentation (#359)
* Use custom .rst to make api doc more readable.

* Update index.rst

* Misc docs updates

- doxygen source code fixes
- updated doxygen files
- fixed conf.py (does not generate code in source tree)

* Update source/docs/api-reference/rocprofiler-sdk_api_reference.rst

Co-authored-by: Rawat, Swati <Swati.Rawat@amd.com>

* Update source/docs/api-reference/rocprofiler-sdk_api_reference.rst

Co-authored-by: Rawat, Swati <Swati.Rawat@amd.com>

* Update source/docs/api-reference/rocprofiler-sdk_api/modules.rst

Co-authored-by: Rawat, Swati <Swati.Rawat@amd.com>

* Update source/docs/api-reference/rocprofiler-sdk_api/global_data_structures_topics_files.rst

Co-authored-by: Rawat, Swati <Swati.Rawat@amd.com>

* Duplicate

* test warnings

* Update CMakeLists.txt

* Update rocprofiler-sdk.dox.in

* Update update-docs.sh

* fix docs build failures by -q -T flags.

* set warn_as_error to NO.

* test -W to suppress warnings.

* remove -q flag from make.

* reduce dot graph depth to 100

* Update custom docs target

- docs target is now no longer part of the dependency list for the all target
- installation of docs requires explicitly building the docs target (i.e. OPTIONAL install of _build/html/ folder)

* add quit and trace mode back.

* increase DOT_GRAPH_MAX_NODES to 500 back.

* Format.

---------

Co-authored-by: Venkateshwar Reddy Kandula <vkandula@amd.com>
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
Co-authored-by: Bhardwaj, Gopesh <Gopesh.Bhardwaj@amd.com>
Co-authored-by: Rawat, Swati <Swati.Rawat@amd.com>
Co-authored-by: Madsen, Jonathan <Jonathan.Madsen@amd.com>
2025-05-14 11:17:51 +05:30
nunnikri 75be79f470 Merge pull request #12 from nunnikri/master
Merge internal changes to upstream
2025-05-13 22:43:14 -07:00
Ranjith Ramakrishnan cea68cd940 Use devel in RPM package requires field 2025-05-13 18:03:14 -05:00
Ranjith Ramakrishnan 6d53d9f9cf Correct the dependencies of rocm_smi package.
Added libdrm/libdrm_amdgpu to the package requires/depends list and removed the same from suggests list.
The rocm smi header files are using drm.h
2025-05-13 18:03:14 -05:00
Galantsev, Dmitrii e15fdf1fbc CI - Fix builds
Change-Id: I0d268ed2aee5c595f2a23e779000122e57165f9d
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2025-05-13 17:59:18 -05:00
Ranjith Ramakrishnan 532f4be8be SWDEV-531400 - Remove file reorganization backward compatibility code
The backward compatibility is already disabled and no longer required
2025-05-13 17:54:20 -05:00
Elwazir, Ammar 6f17da7ade [rocprofv3-benchmark] SDK and rocprofv3 Benchmarking Suite (#157)
* Adding Benchmarking Stg1

* config fix

* reset

* add jpeg and decode traces in iteration

* address comments benchmark config files.

* address comments.

* address comments.

* address comments: revert cntrl ctx.

* address comments: revert csv output.

* resolve merge conflits.

* format.

* build fix.

* fix hip runtime api traces.

* loop cb services.

* format.

* bug fix.

* Fix operator>

- public C++ comparison operator

* Update configuration options

- support selected regions (--selected-regions)
- support writing output config json (--output-config)
- update serialization data

* rocprofv3 tool library misc updates

- lambda for starting context
- support for writing config json

* Tool library updates

- Finished support for all benchmarking modes
- Added build spec support to config json

* Fix ROCPROFILER_SOVERSION

- this value should not be multiplied by 10,000

* Minor tweak to rocprofv3

* Benchmarking scripts

* formatting

* Fix duplicate include

* Add reproducible-dispatch-count test app

- used in benchmarking

* registration logging

- report number of registered contexts and active contexts after client initialization

* Serialize environment in rocprofv3 output config

* ROCPROFILER_BUILD_BENCHMARK CMake option

* Update benchmark SQL schema

- hash_id is text
- add md5sum to benchmarked_app
- remove app_id from benchmarked_sdk
- add sdk_id to benchmark_config
- separate hip_trace into hip_runtime_trace and hip_compiler_trace
- use INT instead of INTEGER for MySQL compatibility
- add count column in benchmark_statistics
- allow std_dev to be NULL in benchmark_statistics

* Update rocprofv3-benchmark.py

- use md5 instead of python hash (which includes random seed)
- use args.mysql_database
- compute md5sum of executable
- fix insert_benchmark_config
  - marker trace fixes
  - memory allocation fixes
  - split hip_trace into hip_{runtime,compiler}_trace
- remove app_id from benchmarked_sdk
- support warmup runs
- count field in benchmark_statistics

* Support launcher and environment in YAML

* Update reproducible-dispatch-count.cpp

- support mode which doesn't use hip event timing

* Misc rocprofv3-benchmark.py updates

- fix some MySQL support
- remove some unnecessary logging

* support mysql db.

* Format.

* Updated SQL input files

- moved benchmark_schema.sql to benchmark_table.sql
- added benchmark_views.sql
  - uses {{metric}} syntax for variable substitution

* cmake formatting

* update rocprofv3-benchmark.py

- benchmark config labels
- overhead views

* Encode rocprofv3-benchmark PID in rocprofv3 and timem output files

* Minor tweak to benchmark_views.sql

- include count
- reorder fields for readability

* split statements and use IS if values is NONE.

* use backtick instead of double quotes and add IS before NOT NULL.:

* Adding Mandelbrot Benchmark App

* Adding Dockerfile example

* Update dockerfile

* Update dockerfile

* [SDK] rocprofiler_query_external_correlation_id_request_kind_name

* Execution-profile benchmark mode

* Execution profile SQL support

* Rename mandlebrot folder + misc clang-tidy

* [rocprofv3-benchmark] Execution profile support

* Update installation

* add work dir when setting git revision, useful when building outside src.

* Set FULL_VERSION_STRING and ROCPROFILER_SDK_GIT_REVISION

- when benchmark folder is top-level

* Remove unused python packages from requirements.txt

* Use ldd/pyelftools to include linked libs for md5sum

- also add --filter-benchmark and --filter-rocprofv3 options
- support labeling the rocprofv3 options
- use more argparse groups
- more generic application of filters
- support variable substitution in environment, e.g. PATH=/some/path:$PATH

* Environment improvements

- improve reproducibility when env set via input file vs. shell
- support "environment-ignore" to remove environment variables

* Misc formatting

* Misc. fix

* use backticks for defining new columns name

* Support shuffling the order of benchmark modes/rocprofv3 args

* Address review comments

* Update Dockerfile

- rename to Dockerfile
- reduce to one layer

* Support docker build arg BRANCH

---------

Co-authored-by: Ammar ELWazir <aelwazir@amd.com>
Co-authored-by: Kandula, Venkateshwar reddy <Venkateshwarreddy.Kandula@amd.com>
Co-authored-by: Venkateshwar Reddy Kandula <vkandula@amd.com>
Co-authored-by: Madsen, Jonathan <Jonathan.Madsen@amd.com>
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
2025-05-13 16:18:23 -05:00
Aaron Liu 297ea78140 rocrtst/dtif: performance::memory_async_copy test fix on DTIF
Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Signed-off-by: Feifei Xu <feifxu@amd.com>
Signed-off-by: Longlong Yao <Longlong.Yao@amd.com>
Reviewed-by: David Yat Sin <David.YatSin@amd.com>
2025-05-13 16:44:31 -04:00
Jiadong Zhu 0f9d2b836c rocr/dtif: use default signal for intercept queue for DTIF
Signed-off-by: Jiadong Zhu <Jiadong.Zhu@amd.com>
Reviewed-by: David Yat Sin <David.YatSin@amd.com>
2025-05-13 16:44:31 -04:00
Aaron Liu 8c1b1201b7 rocr/dtif: disable interrupt signal for DTIF backend
Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Reviewed-by: David Yat Sin <David.YatSin@amd.com>
2025-05-13 16:44:31 -04:00
Jiadong Zhu e2d767879d rocr/dtif: add hsaKmtQueueRingDoorbell in thunk loader
hsaKmtQueueRingDoorbell is specfic to DTIF backend

Signed-off-by: Flora Cui <flora.cui@amd.com>
Signed-off-by: Jiadong Zhu <Jiadong.Zhu@amd.com>
Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Reviewed-by: Shane Xiao <shane.xiao@amd.com>
Reviewed-by: David Yat Sin <David.YatSin@amd.com>
2025-05-13 16:44:31 -04:00
Aaron Liu e9088d6e47 rocr/dtif: add CreateThunkInstance/DestroyThunkInstance interfaces
Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Reviewed-by: David Yat Sin <David.YatSin@amd.com>
2025-05-13 16:44:31 -04:00
Aaron Liu 0cd4ddd62b rocr/dtif: add DRM APIs wrapper in thunk loader
Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Reviewed-by: David Yat Sin <David.YatSin@amd.com>
2025-05-13 16:44:31 -04:00
Aaron Liu 1b79caa214 rocr/dtif: replace hsakmt interfaces with HSAKMT_CALL(...)
Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Reviewed-by: David Yat Sin <David.YatSin@amd.com>
2025-05-13 16:44:31 -04:00
Aaron Liu 7ba77fb193 rocr/dtif: add thunk loader to wrap hsaKmt APIs
For native and DTIF backends, unify to use HSAKMT_CALL(...) to call
hsaKmt APIs.

Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Reviewed-by: David Yat Sin <David.YatSin@amd.com>
2025-05-13 16:44:31 -04:00
Aaron Liu 166b0fa45a rocr/dtif: add dtif environment variable
Using HSA_ENABLE_DTIF to control dtif/native thunk code path

Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Reviewed-by: David Yat Sin <David.YatSin@amd.com>
2025-05-13 16:44:31 -04:00
Cheruvally, Aravindan 0575284367 Update License File install for ASAN (#21)
UT Fix - Update License File install for ASAN
2025-05-13 15:29:21 -05:00
Ashutosh Mishra b71510e25f Restoring the correct installation path
SWDEV-532187: The installation was failing
because of the same path used in all of the
packages. This patch seprates the same.

Signed-off-by: Ashutosh Mishra <ashutosh.mishra@amd.com>
2025-05-13 15:28:52 -05:00
Ashutosh Mishra 4ef3bfb450 Adding condition for static package type
SWDEV-532030 : Static builds are failing
for mainline and release because COMP_TYPE
is empty in case of static builds.
This patch fixes the same.

Signed-off-by: Ashutosh Mishra <ashutosh.mishra@amd.com>
2025-05-13 15:28:32 -05:00
Cheruvally, Aravindan 9683e04889 Add Lintian Debian Packaging Configuration (#13)
*  SWDEV-531658 / SWDEV-529762
* Add Lintian Debian Packaging Configuration

* Updated Debian specific Lintian flag usage

* Updated Debian Pkg Extended Description usage

* Updated Debian Package ChangeLog

* Update Review Comments

* Update Review Comments - Renamed debian to DEBIAN folder

* Review Comment Update - Extended Description to use common across deb/rpm

* Update Review Comments - Change Log Test Updated

* Review Comment Update - remove duplicate & enhanced deb copyright header

* Update Change Log for the release
2025-05-13 15:24:40 -05:00
Ramakrishnan, Ranjith 476b76997d Remove the backward compatibility code for file reorganization (#14)
Remove the backward compatibilty code for file reorganization

File reorg backward compatibility support is no longer required
2025-05-13 15:24:07 -05:00
Cheruvally, Aravindan 339034734f Re Enable SWDEV-521313 Streamline Version Management (#10)
Revert "Revert "SWDEV-521313 - Streamline Version Management: Retain Only version-roc…""

This reverts commit 39bd62e592.
2025-05-13 15:23:29 -05:00
Cheruvally, Aravindan 515a826cab Update Pre/Post File Permissions to 0755 (#12) 2025-05-13 15:23:05 -05:00
Cheruvally, Aravindan 95f9deb27c Revert "SWDEV-521313 - Streamline Version Management: Retain Only version-roc…" 2025-05-13 15:22:20 -05:00
Jonathan Luu fd1470bf0c SWDEV-521313 - Streamline Version Management: Retain Only version-rocm File 2025-05-13 15:20:09 -05:00
Aaron Liu cd0f8c6173 Add ROC-DTIF backend support for rocminfo
Signed-off-by: Aaron Liu <aaron.liu@amd.com>
2025-05-14 01:16:21 +08:00
vedithal-amd 5cb86e31fc Implement interface to rocprofiler sdk (#695)
* Setting ROCPROF=rocprofiler-sdk environment variable will use rocprofiler-sdk C++ library instead of rocprofv3 python script

* Add runtime option --rocprofiler-sdk-library-path to use custom version of rocprofiler sdk library
    * Add --rocprofiler-sdk-library-path conftest option for tests

* Setup appropriate environment variables to inject rocprofiler sdk code to user command
    * Add env. vars. for counter collection and filtering
    * Add env. vars. for pc sampling

* Use python bindings to list counters supported by rocprofiler sdk
2025-05-13 10:48:21 -04:00
Sajina PK 90ad264447 Add new VA-API methods to the gotcha wrappers (#203)
For a new feature in rocJPEG adding new VA-APIs to the gotcha wrapper
2025-05-13 08:05:55 -04:00
Ma, Li e38dd98914 rocr: Expose all available DMA engines (#165)
When copying for inter devices, Currently only XGMI as exposed. Now
SDMA0/1 will be exposed as well for inter device copies especially that
they are one of the recommended engines.

Signed-off-by: Li Ma <li.ma@amd.com>
2025-05-13 17:42:15 +08:00
Hila, Nino 5d3bcd3514 Update palamida.yml (#14)
* Add palamida.yml - removing url
2025-05-12 21:53:31 -07:00
Hila, Nino b297e72853 Update palamida.yml (#388)
* Add palamida.yml - removing url
2025-05-12 21:53:08 -07:00
Hila, Nino 831f002fbc Update palamida.yml (#14)
* Add palamida.yml - removing url
2025-05-12 21:52:24 -07:00
Hila, Nino e5bc845ceb Update palamida.yml (#28)
* Add palamida.yml - removing url
2025-05-12 21:51:44 -07:00
Hila, Nino eb62039fac Update palamida.yml (#12)
* Add palamida.yml - removing url
2025-05-12 21:50:26 -07:00