76333 Melakukan

Penulis SHA1 Pesan Tanggal
Madsen, Jonathan a6831b7b5b [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>

[ROCm/rocprofiler-sdk commit: 8a1ee46e47]
2025-05-14 13:19:22 -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
srawat 71c654b0ee Update install.rst
[ROCm/rdc commit: 3357346df7]
2025-05-14 11:44:05 -05:00
Park, Peter d4f057f95f [SWDEV-528854] docs: Add description of N/A in SMI tool output (#363)
Signed-off-by: Park, Peter <Peter.Park@amd.com>
2025-05-14 11:43:33 -05:00
Park, Peter f637f2818e [SWDEV-528854] docs: Add description of N/A in SMI tool output (#363)
Signed-off-by: Park, Peter <Peter.Park@amd.com>

[ROCm/amdsmi commit: d4f057f95f]
2025-05-14 11:43:33 -05:00
Andryeyev, German b13eec7049 SWDEV-345024 - Retain the program on Fini kernel execution (#307)
Fini kernel is executed during the invocation of amd::Program destructor,
but the dispatch logic can retain/release the reference counter and
cause double free. Avoid double free with an extra retain() call

[ROCm/clr commit: bddb8f14d1]
2025-05-14 21:21:26 +05:30
Andryeyev, German bddb8f14d1 SWDEV-345024 - Retain the program on Fini kernel execution (#307)
Fini kernel is executed during the invocation of amd::Program destructor,
but the dispatch logic can retain/release the reference counter and
cause double free. Avoid double free with an extra retain() call
2025-05-14 21:21:26 +05:30
Arandjelovic, Marko 1f62171fb1 SWDEV-515530 - Re-enable passing tests on gfx1100 and gfx1102 (#82)
[ROCm/hip-tests commit: 2125662867]
2025-05-14 17:23:13 +02:00
Arandjelovic, Marko 2125662867 SWDEV-515530 - Re-enable passing tests on gfx1100 and gfx1102 (#82) 2025-05-14 17:23:13 +02:00
Godavarthy Surya, Anusha 63376e2b32 SWDEV-519722 - Update test to work on MGpu machines without P2P access (#145)
[ROCm/hip-tests commit: 161ecddafe]
2025-05-14 20:52:58 +05:30
Godavarthy Surya, Anusha 161ecddafe SWDEV-519722 - Update test to work on MGpu machines without P2P access (#145) 2025-05-14 20:52:58 +05:30
Andryeyev, German 0ad7f9c137 SWDEV-497841 - Add max alloc test for MemPool (#108)
Stress mempool with a lot of big memory allocations.
The test requires >30MB of free memory.

[ROCm/hip-tests commit: 0b1eed5acd]
2025-05-14 20:52:41 +05:30
Andryeyev, German 0b1eed5acd SWDEV-497841 - Add max alloc test for MemPool (#108)
Stress mempool with a lot of big memory allocations.
The test requires >30MB of free memory.
2025-05-14 20:52:41 +05:30
GunaShekar, Ajay edefd09753 SWDEV-527806 - hip-tests . Add P2P checks for mGPU atomics tests (#168)
[ROCm/hip-tests commit: 86eb49aa7f]
2025-05-14 20:49:01 +05:30
GunaShekar, Ajay 86eb49aa7f SWDEV-527806 - hip-tests . Add P2P checks for mGPU atomics tests (#168) 2025-05-14 20:49:01 +05:30
Dingming Wu 3731cae1b7 Detect if HSA_NO_SCRATCH_RECLAIM is set after initEnv() (#1683)
* Detect if HSA_NO_SCRATCH_RECLAIM is set after initEnv()

 For rocm older than 6.4, we need to set HSA_NO_SCRATCH_RECLAIM=1 to use LL128 protocol.
This Env is set outside of RCCL, add the logging to detect whether its set during runtime.

* check hip runtime ver via hipRuntimeGetVersion

* move the detection to ncclinit func

* correct rocm version integer

* update warning message

* avoid unnecessary info msg on hsa_no_scratch_reclaim detection

[ROCm/rccl commit: 51f87fbb43]
2025-05-14 10:12:45 -05:00
Dingming Wu 51f87fbb43 Detect if HSA_NO_SCRATCH_RECLAIM is set after initEnv() (#1683)
* Detect if HSA_NO_SCRATCH_RECLAIM is set after initEnv()

 For rocm older than 6.4, we need to set HSA_NO_SCRATCH_RECLAIM=1 to use LL128 protocol.
This Env is set outside of RCCL, add the logging to detect whether its set during runtime.

* check hip runtime ver via hipRuntimeGetVersion

* move the detection to ncclinit func

* correct rocm version integer

* update warning message

* avoid unnecessary info msg on hsa_no_scratch_reclaim detection
2025-05-14 10:12:45 -05:00
mberenjk 08c0b8b0fc moving the thread_fence to apply before atomic fetch (#1672)
* applying thread_fence only on warp 0 before atomic fetch

---------

Co-authored-by: Marzieh Berenjkoub <mberenjk@amd.com>

[ROCm/rccl commit: 1cefcee51f]
2025-05-14 10:10:05 -05:00
mberenjk 1cefcee51f moving the thread_fence to apply before atomic fetch (#1672)
* applying thread_fence only on warp 0 before atomic fetch

---------

Co-authored-by: Marzieh Berenjkoub <mberenjk@amd.com>
2025-05-14 10:10:05 -05:00
Arandjelovic, Marko 7c28abc538 SWDEV-505672 - Add performance test for HtoD and DtoH with kernel in-between (#27)
[ROCm/hip-tests commit: 3257c44126]
2025-05-14 20:12:23 +05:30
Arandjelovic, Marko 3257c44126 SWDEV-505672 - Add performance test for HtoD and DtoH with kernel in-between (#27) 2025-05-14 20:12:23 +05:30
Arandjelovic, Marko 6ed6a3cd09 Remove SetGetCacheConfig tests as APIs are not implemented (#84)
[ROCm/hip-tests commit: 552ed6125e]
2025-05-14 16:27:05 +02:00
Arandjelovic, Marko 552ed6125e Remove SetGetCacheConfig tests as APIs are not implemented (#84) 2025-05-14 16:27:05 +02:00
Arandjelovic, Marko 5ad13665eb SWDEV-525066 - Enable hipDeviceGetGraphMemAttribute functional tests (#71)
[ROCm/hip-tests commit: 974d47ad8d]
2025-05-14 16:06:23 +02:00
Arandjelovic, Marko 974d47ad8d SWDEV-525066 - Enable hipDeviceGetGraphMemAttribute functional tests (#71) 2025-05-14 16:06:23 +02:00
Arandjelovic, Marko 345dd2dcea Re-enable passing tests (#74)
[ROCm/hip-tests commit: 9e1cf28c9a]
2025-05-14 16:06:08 +02:00
Arandjelovic, Marko 9e1cf28c9a Re-enable passing tests (#74) 2025-05-14 16:06:08 +02:00
Arandjelovic, Marko f221060b22 Re-enable passing tests on gfx908 (#83)
[ROCm/hip-tests commit: fb8d0b9518]
2025-05-14 15:22:53 +02:00
Arandjelovic, Marko fb8d0b9518 Re-enable passing tests on gfx908 (#83) 2025-05-14 15:22:53 +02:00
Hernandez, Gerardo 5d5fa6fc2a SWDEV-420237 - Add tests for reduce sync operations (#102)
[ROCm/hip-tests commit: 001affc6ae]
2025-05-14 11:57:05 +01:00
Hernandez, Gerardo 001affc6ae SWDEV-420237 - Add tests for reduce sync operations (#102) 2025-05-14 11:57:05 +01:00
Kandula, Venkateshwar reddy 89fbdeb196 [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>

[ROCm/rocprofiler-sdk commit: 6ec9526475]
2025-05-14 11:17:51 +05:30
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
josnarlo dd69aa1924 [SWDEV-532119] Fix building examples
Signed-off-by: josnarlo <Joseph.Narlo@amd.com>
2025-05-13 20:19:51 -05:00
josnarlo ffd54f5c3b [SWDEV-532119] Fix building examples
Signed-off-by: josnarlo <Joseph.Narlo@amd.com>


[ROCm/amdsmi commit: dd69aa1924]
2025-05-13 20:19:51 -05:00
Maisam Arif ca297419c4 Fix reference to gpu_metrics adjustment for v1_8
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: Idf6307292d37c973b0d44a187a2334f2cad8047d
2025-05-13 18:21:29 -05:00
Maisam Arif 686cb172bf Fix reference to gpu_metrics adjustment for v1_8
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: Idf6307292d37c973b0d44a187a2334f2cad8047d


[ROCm/amdsmi commit: ca297419c4]
2025-05-13 18:21:29 -05:00
Ranjith Ramakrishnan 22777b75b5 Use devel in RPM package requires field
[ROCm/rocm_smi_lib commit: cea68cd940]
2025-05-13 18:03:14 -05:00
Ranjith Ramakrishnan cea68cd940 Use devel in RPM package requires field 2025-05-13 18:03:14 -05:00
Ranjith Ramakrishnan 93ff9b3547 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


[ROCm/rocm_smi_lib commit: 6d53d9f9cf]
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
Galantsev, Dmitrii f4e611193b CI - Fix builds
Change-Id: I0d268ed2aee5c595f2a23e779000122e57165f9d
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/rdc commit: e15fdf1fbc]
2025-05-13 17:59:18 -05:00
Ranjith Ramakrishnan e4f50f06cb SWDEV-531400 - Remove file reorganization backward compatibility code
The backward compatibility is already disabled and no longer required


[ROCm/rocm_smi_lib commit: 532f4be8be]
2025-05-13 17:54:20 -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
Mustafa Abduljabbar 128b0e7074 Remove MSCCL single node AllGather XMLs (#1693)
* Remove MSCCL single node XMLs

* Remove comment on MSCCL AG single node support

[ROCm/rccl commit: d665547eef]
2025-05-13 17:07:03 -05:00
Mustafa Abduljabbar d665547eef Remove MSCCL single node AllGather XMLs (#1693)
* Remove MSCCL single node XMLs

* Remove comment on MSCCL AG single node support
2025-05-13 17:07:03 -05:00
Elwazir, Ammar c47e5838f1 [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>

[ROCm/rocprofiler-sdk commit: 6f17da7ade]
2025-05-13 16:18:23 -05:00