Jonathan R. Madsen
a2288eb50b
[rocprofiler-sdk] Install unit tests and helper functions for integration tests ( #921 )
...
* [rocprofiler-sdk] Install unit tests and helper functions for integration tests
* Fix rocprofiler-sdk-tests-target export
* Fix handling of cmake policy CMP0174
* Remove -vv from new pytest.ini files
* add unit tests and integration tests.
* add path to ci workflow.
* misc. fixes.
* pc sampling tests.
* bug fixes.
* pc sampling tests fix.
* misc.
* Update CMakeLists.txt
* Update rocprofiler_config_install_tests.cmake, correct license name
* fix units tests install issues.
* fix counters_def file path.
* fix bug, arg shifting.
* vendor pytest-cmake.
* cmake config fix. missing endfunction()
* disable tests, 1.rocprofv3-trace-hip-libs. 2.kernel-tracing. 3.external_correlation 4.rocpd.
* disable buffered-tracing test and remove pytest-cmake from requirements.txt.
* disable hip-graph-tracing test.
* fix building standalone tests to load rocprofiler-sdk cmake package first and then find rocprofiler_sdk_pytest module.
* addressed comments: 1.add local bin path to code cov workflow. 2.add to cmake prefix path local bin. 3.use ROCPROFILER_MEMCHECK_PRELOAD_ENV_VALUE 4.misc. fix
* enabled back tests api_buffered, external_correlation_id, hip-graph, kernel-tracing, rocpd, tracing-hip-in-libraries. and misc fixes(formating, extra fixtures for agent-index tests.)
* cpack to use llvm bin for .hsaco debug symbols.
* psdb tests fixes.
* EOL.
* misc. fixes and Disable api_buffered_tracing, external_correlation_id, hip-graph-tracing, kernel-tracing, rocpd, summary, tracing-hip-libraries, tracing-plus-counter-collection.
* fix incorrect cmakelists file.
* strip smallkernel.bin
* format.
* revert disabled tests commit.
* misc. fix in counter tests.
* misc.
* search codeobj unit test assets in curr bin and install bin.
* refactor newly added rocpd tests.
* modify tests for newly added hip-host-tracing.
* add LD LIB path to units, psdb is failing due to libs not being found.
---------
Co-authored-by: Venkateshwar Reddy Kandula <venkateshwar.kandula1306@gmail.com >
Co-authored-by: Venkateshwar Reddy Kandula <Venkateshwarreddy.Kandula@amd.com >
Co-authored-by: JeniferC99 <150404595+JeniferC99@users.noreply.github.com >
2025-11-21 08:06:56 -06:00
Madsen, Jonathan
839c07c4aa
[CI] Testing stability ( #486 )
...
* [CI] Testing Stability
- CMake option ROCPROFILER_DISABLE_UNSTABLE_CTESTS
- used for tests which periodically fail around 1 out of every 10 runs
- set to ON while instability remains, this needs to set to OFF in ROCm 7.1 or, ideally, ROCm 7.0.1
- Use FIXTURES_SETUP and FIXTURES_REQUIRED for some tests
- replace "threw an exception" with "${ROCPROFILER_DEFAULT_FAIL_REGEX}" for misc FAIL_REGULAR_EXPRESSIONS
* Remove contents of all EXCLUDE_{TESTS,LABEL}_REGEX from CI workflow
* Disable patch git step in code-coverage run
* Tweak spin time of reproducible runtime
* Removed patch git step in code-coverage run
* Update ROCPROFILER_DEFAULT_FAIL_REGEX
* Mark test-counter-collection tests as unstable
- add fixtures setup/required
* Remove ATTACHED_FILES_ON_FAIL
- CDash doesn't store enable downloading these properly anyway
* Relax collection-period fuzzing window
* Disable unstable collection-period test
- too unstable
* formatting
* Disable unstable device_counting_service_test.async_counters
* Suppress perfetto internal data race errors
* Switch code-coverage CI jobs to mi300 runner
* Timeout increases
* rocprofv3-test-rocpd updates
- add fixtures
- switch executable
- redefine input/output paths
* Revert code-coverage job to mi300a runner
* Update rocprofv3-test-rocpd-execute-multiproc
- reduce problem size
* disable multiproc rocpd
* Split code-coverage into separate workflow
- network issues cause this job to fail frequently
- when in a separate workflow, it can be restarted easily
* Fixtures for rocprofv3-test-trace-hip-in-libraries
* Disable unstable device_counting_service_test.sync_counters
* Potential fix for code scanning alert no. 171: Workflow does not contain permissions
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Switch code-coverage to run on rocprof-azure
- mi300a EMU runner set is unstable (network issues)
* tests/rocprofv3/pc-sampling SKIP_REGULAR_EXPRESSION
* Update rocprofv3-test-list-avail-trace-execute
- reduce log level and increase timeout
* rocprofv3: Prevent recursive call to rocprofv3_error_signal_handler + log chaining
* rocprofv3: Use ROCP_ERROR + std::exit instead of ROCP_FATAL
- should help with SKIP_REGULAR_EXPRESSION
---------
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
[ROCm/rocprofiler-sdk commit: 640ca55ac0 ]
2025-06-30 15:07:37 -05:00
Madsen, Jonathan
36f4788ad5
[CI] Miscellaneous Testing Updates ( #305 )
...
* Add rocprofiler-sdk-utilities.cmake
- contains cmake function rocprofiler_sdk_get_gfx_architectures
* Update perfetto_reader.py
- fix hash collision
* Update project names in tests folders
- rocprofiler-tests -> rocprofiler-sdk-tests
* Fix incorrect allocation-error handling
* [CI] Disable openmp tests for navi2, navi3, and navi4
* Suppress leaks by omptarget and llvm
---------
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com >
[ROCm/rocprofiler-sdk commit: 2d072f9217 ]
2025-03-22 18:51:42 -05:00
Nagaraj, Sriraksha
864a9c328d
Adding agent-index ( #189 )
...
* Adding agent-index
* review changes
* review comments addressed
* minor fix
* fix CI failure
* review comments
* Fix agent index test and address review comments
* Build Fixes
---------
Co-authored-by: Benjamin Welton <bewelton@amd.com >
[ROCm/rocprofiler-sdk commit: c30bb7cbda ]
2025-03-14 00:51:32 -07:00
Rawat, Swati
edb51fc861
update copyright date to 2025 ( #102 )
...
* Update LICENSE
* Update conf.py
* Update copyright year
* [fix] Update copyright year
* Update copyright year "ROCm Developer Tools"
* Add license headers to c++ files
* Add license to *.py
* Update licenses in rocdecode sources
---------
Co-authored-by: srawat <120587655+SwRaw@users.noreply.github.com >
Co-authored-by: Mythreya <mythreya.kuricheti@amd.com >
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com >
[ROCm/rocprofiler-sdk commit: 97b7a6315d ]
2025-01-22 19:11:20 -06:00
Jonathan R. Madsen
cd6a94dcb5
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
[ROCm/rocprofiler-sdk commit: 64b8f8370e ]
2024-07-02 18:49:04 -05:00
Gopesh Bhardwaj
e1261f20d8
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 >
[ROCm/rocprofiler-sdk commit: dc054eea76 ]
2024-05-29 05:05:10 -05:00
Jonathan R. Madsen
9fde046078
JSON schema + JSON node vs. Perfetto category consistency ( #869 )
...
* Fix schema differences b/t JSON and perfetto
- "kernel_dispatches" (JSON) vs. "kernel_dispatch" (Perfetto) -> "kernel_dispatch"
- "scratch_api" (JSON) -> "scratch_memory"
* Update include/rocprofiler-sdk/cxx/serialization.hpp
- remove unnecessary includes causing circular dependency
* rocprofv3 docs
- Output formats
- JSON schema
* Spelling fix
* Update schema descriptions
* Improve assert log in test_perfetto_data
[ROCm/rocprofiler-sdk commit: b4dc4f8e92 ]
2024-05-22 20:36:27 -05:00
Jonathan R. Madsen
46a9637496
Adding Perfetto support ( #867 )
...
* Perfetto submodule
* include/rocprofiler-sdk/cxx/perfetto.hpp
- adapted from tests/common/perfetto.hpp
- updated json-tool to use <rocprofiler-sdk/cxx/perfetto.hpp>
* Update include/rocprofiler-sdk/cxx
- add details/delimit.hpp
- add details/join.hpp
- extend details/mpl.hpp
- extend details/operators.hpp
* Update lib/rocprofiler-sdk/hsa/async_copy.cpp
- update MEMORY_COPY direction names
* Preliminary perfetto support
* Update lib/rocprofiler-sdk-tool/generatePerfetto.cpp
- fix getting roctx msg vs. buffer operation name
* Temporary variable restructuring
* Perfetto patches after rebasing onto main
* Revert lib/rocprofiler-sdk/hsa/async_copy.cpp
- revert name
* Update lib/rocprofiler-sdk-tool/generatePerfetto.cpp
- fix ReadTrace
* Update tests/bin/hip-in-libraries
- sleep_for
* Support PFTRACE output format option in rocprofv3
* Change perfetto logging
* Update rocprofv3 tests to generate pftrace output
* Minor tweak to json-tool.cpp
* Update requirements.txt for perfetto testing
* Fix data race on amount_read in generatePerfetto.cpp
* Add testing for pftrace output
- relatively simple testing which verifies that the pftrace file has the same number of entries as JSON data for HIP/HSA/marker/kernel/memory_copy
* Fix import in perfetto_reader.py
* Fix data race in generatePerfetto.cpp
[ROCm/rocprofiler-sdk commit: 957bb7a4e5 ]
2024-05-22 15:51:12 -05:00
Jonathan R. Madsen
0ba9f26a6a
Adding JSON support ( #860 )
...
* Adding json support
minor bugs
Fixing tests
Fixing formatting issues
Fixing test
test fix
Misc testing fixes
Use rocprofiler/cxx/name_info in rocprofiler-sdk-tool
fixes to reduce the Json file size
Update source/lib/rocprofiler-sdk-tool/generateJSON.cpp
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Update source/lib/rocprofiler-sdk-tool/generateJSON.cpp
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Update source/lib/rocprofiler-sdk-tool/tool.cpp
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Update source/lib/rocprofiler-sdk-tool/tool.cpp
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Update source/lib/rocprofiler-sdk-tool/helper.hpp
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Update source/lib/rocprofiler-sdk-tool/helper.hpp
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Update source/lib/rocprofiler-sdk-tool/generateJSON.hpp
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Update source/lib/rocprofiler-sdk-tool/generateJSON.cpp
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Update source/lib/rocprofiler-sdk-tool/generateJSON.cpp
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Update source/lib/rocprofiler-sdk-tool/tool.cpp
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Update source/lib/rocprofiler-sdk-tool/tool.cpp
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Update source/lib/rocprofiler-sdk-tool/helper.hpp
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Update source/lib/rocprofiler-sdk-tool/tool.cpp
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Update source/lib/rocprofiler-sdk-tool/generateJSON.cpp
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Update source/lib/rocprofiler-sdk-tool/generateJSON.cpp
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
misc fixes
Removing int cast for JSON tests
formatting
removing a condition test on Navi3
adding debug info
Misc fix
* CSV updates
- fix stats
- numerical formatter support for customizing write_csv_entry
- misc formatting
- get_marker_stats_file
* Misc tests/rocprofv3/counter-collection/input2 fixes
- rocprofiler_configure_pytest_files in rocprofv3/counter-collection/input2
- removed state code from merge in rocprofv3/counter-collection/input2
* Tool: "Agent-id" -> "Agent_Id"
- consistency
* Tool update
- remove rocprofiler_tool_marker_record_t
- add marker_tracing_kind_conversion
- fix memory leak in write_json
- minor update to get_output_stream
- rework handling of marker records
* Update tests/pytest-packages/pytest_utils/__init__.py
- add collapse_dict_list function for converting a dictionary value that is a list of length one into a directly mapped value
* Update tests/rocprofv3/**/conftest.py
- use collapse_dict_list when reading in JSONs
* Update tests/rocprofv3/counter-collection/input1/validate.py
- relax testing requirements gfx1102 (AQLProfile bugs)
- in addition to relaxed testing requirements for gfx1101
* Update tests/rocprofv3/tracing/validate.py
- fix removal of PID in every marker record
* Update tests/rocprofv3/tracing-plus-cc
- remove test design that relies on iterating subdirectories
* Wrapper around __libc_start_main
- Ensures finalization happens before main returns
- Update tests/rocprofv3/tracing/validate.py
- wrapper around __libc_start_main changed roctx calls
* Combine include/rocprofiler-sdk/cxx/serialization.hpp and include/rocprofiler-sdk/external/serialization.hpp
- tests/common/serialization.hpp simply includes include/rocprofiler-sdk/cxx/serialization.hpp now
* Update lib/rocprofiler-sdk/hip/hip.cpp
- tracing function immediately returns when fini_status is non-zero
* Update lib/rocprofiler-sdk/hsa/hsa.cpp
- remove logging of tracing function when fini_status is non-zero
* Update lib/rocprofiler-sdk-tool/CMakeLists.txt
- remove rocprofv3_trigger_list_metrics.cpp from TOOL_SOURCES
* Update tests/rocprofv3/tracing-plus-cc/CMakeLists.txt
- fix depends
* Domain statistics
* Update tests/rocprofv3/tracing-plus-cc/CMakeLists.txt
- do not set ROCP_LOG_LEVEL in env
* Remove erroneous <bits/utility.h> include
* Restructure tool source + reduce tool table + support multiple formats
- buffered_output struct for handling output
- support multiple output formats, e.g. --output-format csv,json
- rename buffer_type_t -> domain_type
- simplified generation of CSV output files
- removed rocprofiler_tool_marker_record_t
* Update lib/common/container/ring_buffer.hpp
- value_type alias in ring_buffer<Tp>
* Remove all but one json-execute tests
- generate CSV and JSON in same run
* Fix include for domain_type.cpp
* Update tests/rocprofv3/tracing-plus-cc/input.txt
- only specify counters which can be found on gfx8, gfx9, gfx10, gfx11, etc.
- use :device= syntax
* Update lib/rocprofiler-sdk-tool/config.cpp
- support :device=N syntax for counters file
- improve stripping comments in PMC files
- only read after pmc:
* Rework tool library counter collection
- fatal error if all requested counters for device are not found
- support :device= syntax
* Update tests/rocprofv3/tracing-plus-cc/input.txt
- removed L2CacheHit (not supported on mi300)
* Disable JSON tests in tests/rocprofv3
* Update include/rocprofiler-sdk/cxx/serialization.hpp
- support rocprofiler_record_dimension_info_t
* Update tool JSON schema
- remove domain_type::CODE_OBJECT
- rocprofiler_tool_agent_v0_t
- rocprofiler_agent_v0_t + counters
- rocprofiler_tool_counter_info_t
- get_code_object_data()
* Update JSON schema for tool
* Update lib/rocprofiler-sdk-tool/tool.cpp
- fix ROCP_WARNING_IF
* rocprofv3 -> rocprofv3.sh
- install rocprofv3.sh into sbin
- configure_file <source-tree>/rocprofv3.sh -> <binary-tree>/bin/rocprofv3
* Update tool counter collection
- rocprofiler_tool_record_counter_t
- rocprofiler_tool_counter_collection_record_t
* Update tests/rocprofv3/counter-collection/input1/CMakeLists.txt
- use rocprofiler_configure_pytest_files for validate.py, conftest.py, and input.txt
* Update tests/rocprofv3/counter-collection/input1/validate.py
- re-enable test_validate_counter_collection_pmc1_json
* Update tests/rocprofv3/counter-collection/input2/validate.py
- remove unused code
* Update tests/rocprofv3/counter-collection/input2/validate.py
- remove unused code
* Update tests/rocprofv3/hsa-queue-dependency/validate.py
- re-enable JSON tests
* Misc tests/rocprofv3 CMake updates
* Update tests/rocprofv3/tracing/validate.py
- re-enable JSON tests
* Update tests/rocprofv3/tracing-hip-in-libraries/validate.py
- re-enable JSON tests
* Update tests/rocprofv3/tracing/validate.py
- remove unused node_exists function
* Update tests/rocprofv3/tracing/validate.py
- fix test_marker_api_trace_json
---------
Co-authored-by: Sriraksha Nagaraj <Sriraksha.Nagaraj@amd.com >
[ROCm/rocprofiler-sdk commit: 92b7326910 ]
2024-05-22 00:53:42 -05:00
Jonathan R. Madsen
e7cba805c5
Update logging ( #838 )
...
* Update logging
* Remove unused function
* Fix lib/rocprofiler-sdk/hsa/pc_sampling.cpp logging compilation
* Fix logging FLAGS_vmodule string leak and numerical log level
* Update logging
* Update glog submodule
* Leak fixes
* format
[ROCm/rocprofiler-sdk commit: 4d5b71b0e7 ]
2024-05-20 15:38:18 -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
Gopesh Bhardwaj
6076c751a3
hsa multiqueue application ( #618 )
...
* hsa multiqueuw application
* cmake formatting (cmake-format) (#619 )
Co-authored-by: bgopesh <7112102+bgopesh@users.noreply.github.com >
* source formatting (clang-format v11) (#620 )
Co-authored-by: bgopesh <7112102+bgopesh@users.noreply.github.com >
* comppialtion fix
* Update tests/bin/CMakeLists.txt
Reorder `add_subdirectory` to fix (recurrent) issues with ROCTx in `CMAKE_BUILD_RPATH`
* addressing early feedback
* cmake updates
* more cmake updates
* adding queue dependency test
* updating test
* test updates
* removed hsa_api_trace header
* reformating headers to prevent clang from reordering
* Fixing packaging
* Fixes for hangs
* source formatting (clang-format v11) (#676 )
Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com >
* cmake formatting (cmake-format) (#673 )
Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com >
* structure change
* cmake formatting (cmake-format) (#680 )
Co-authored-by: bgopesh <7112102+bgopesh@users.noreply.github.com >
* Adding kernel trace to test hang fix
* rebased and fixed kernel-trace test
* rhel clang fixes
* source formatting (clang-format v11) (#685 )
Co-authored-by: bgopesh <7112102+bgopesh@users.noreply.github.com >
* Update lib/rocprofiler-sdk-tool/helper.hpp
- remove suppression of -Wshadow
* Update tests/bin/hsa-queue-dependency/CMakeLists.txt
- cleanup unnecessary code
- GPU_LIST -> GPU_TARGETS
* GPU_LIST -> GPU_TARGETS
* Remove installation of test executable and libraries
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: bgopesh <7112102+bgopesh@users.noreply.github.com >
Co-authored-by: Jonathan R. Madsen <jrmadsen@users.noreply.github.com >
Co-authored-by: Benjamin Welton <bewelton@amd.com >
Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com >
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com >
[ROCm/rocprofiler-sdk commit: 348d740388 ]
2024-04-09 10:19:16 -05:00