Commit Graph

8920 Commits

Author SHA1 Message Date
Karl W Schulz 61267ee262 include ERROR delimiter directly for console_error() messsages
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-11 14:19:01 -05:00
Karl W Schulz cc7a725ae8 add a profileMode option to capture_subprocess_output() - includes
indented output with profiler selection when enabled

Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-11 14:19:01 -05:00
Karl W Schulz 6bb4210d94 minor refactor of print_status()
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-11 14:19:01 -05:00
Karl W Schulz 63129e4247 add indent support to console_log()
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-11 14:19:01 -05:00
Karl W Schulz 34694f86c2 include loglevel function argument to "run_prof" routine
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-11 14:19:01 -05:00
Karl W Schulz 48de8ae490 assign loglevel attribute in omniperf base class
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-11 14:19:01 -05:00
Karl W Schulz bdfc536ade update setup_logging function to return loglevel; disable inclusion of
loglevel delimiter in output

Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-11 14:19:01 -05:00
Karl W Schulz 47b32cb4b1 enable a progress bar for running in profile mode - only enabled when
loglevel is set to ERROR

Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-11 14:19:01 -05:00
Karl W Schulz 3e88132d73 tighten-up profile usage examples
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-11 14:19:01 -05:00
colramos-amd 6c5a3623b6 Fix dangling merge conflict
Signed-off-by: colramos-amd <colramos@amd.com>
2024-03-11 14:19:01 -05:00
colramos-amd f2aac37178 Fix python formatting
Signed-off-by: colramos-amd <colramos@amd.com>
2024-03-11 14:19:01 -05:00
colramos-amd 99bf4fae09 Resolve merge conflict I missed in prev rebase
Signed-off-by: colramos-amd <colramos@amd.com>
2024-03-11 14:19:01 -05:00
colramos-amd 771644f5f7 Replaced some straggling print statements with log functions
Signed-off-by: colramos-amd <colramos@amd.com>
2024-03-11 14:19:01 -05:00
colramos-amd 5ed9a5c902 Connect verbosity flag to loglevel
Signed-off-by: colramos-amd <colramos@amd.com>
2024-03-11 14:19:01 -05:00
colramos-amd 5bf38a4fed All logging should use call new functions
Signed-off-by: colramos-amd <colramos@amd.com>
2024-03-11 14:19:01 -05:00
colramos-amd 233905071c Dedicated logging function for each log level
Signed-off-by: colramos-amd <colramos@amd.com>
2024-03-11 14:19:01 -05:00
colramos-amd 0611ce4582 Remove outdated remove_workload.py module
Signed-off-by: colramos-amd <colramos@amd.com>
2024-03-11 14:19:01 -05:00
colramos-amd 2e09f0be7e Standalone logging module for cleaner omniperf_base.py
Signed-off-by: colramos-amd <colramos@amd.com>
2024-03-11 14:19:01 -05:00
Jose Santos ef6152dfa0 ipblocks to blocks in ctest
Signed-off-by: Jose Santos <josantos@amd.com>
2024-03-11 10:04:54 -05:00
Sv. Lockal 9a89997b5f Fix compilation on musl-based systems
This allows to build ROCT-Thunk-Interface for Alpine Linux, Gentoo with musl profile and so on.

List of changes:
* Fix redefinition of PAGE_SIZE from limits.h
* Use NAME_MAX from limits.h

Closes #65

Change-Id: Ibdb0ef5668a07b7b403fcc4a44cd2658e00a584a
Signed-off-by: Sv. Lockal <lockalsash@gmail.com>
Signed-off-by: Kent Russell <kent.russell@amd.com>
2024-03-11 10:46:55 -04:00
Karl W. Schulz a0f5d25f74 record return status from hipDeviceSynchronize() to avoid compilation warnings (#305)
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-11 09:30:40 -05:00
Jose Santos f9e806833b blocks -> block
Signed-off-by: Jose Santos <josantos@amd.com>
2024-03-08 16:27:19 -06:00
Jose Santos 09f9b9e544 Typo: Change blocks to block
Signed-off-by: Jose Santos <josantos@amd.com>
2024-03-08 16:27:19 -06:00
Galantsev, Dmitrii 9a3a50f929 Fix misc memory leaks
Change-Id: I3dbf56e98d8c1312f9081956ed590962b2bdace3
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2024-03-08 16:26:47 -06:00
Galantsev, Dmitrii b60541ef42 Fix memory leak created by hanging opendir
Change-Id: I01e372c6a6b427f21e89cb5e4217f876346a35be
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2024-03-08 16:26:47 -06:00
Galantsev, Dmitrii 46ea462189 Add .github/CONTRIBUTING.md
Change-Id: Ie20c720514666dec307a92ec05fe9c3b56ba9cc5
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2024-03-08 16:25:35 -06:00
Galantsev, Dmitrii ba88baef9c Add .github/CONTRIBUTING.md
Change-Id: I7aa7381d973520a515d0539f4915ce67342a3a34
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2024-03-08 16:19:47 -06:00
Charis Poag c2035fa1b9 [SWDEV-436308] Add Partition_ID from KFD
* Updates:
    - [CLI] rocm-smi (no arg) and --showhw:
      Now displays 'ID'/'PARTITION ID' from the pcie_id identifier
      Helps users identify which partition # the device is
      Information provided by KFD
      Note: partition_id of 0, means a primary node (AKA root node),
      ex. ASICs which do not have partitioning support will show 0
    - [API] Fix partitions nodes which do not enumerate with domain:
            Adding kfd's domain, allows ASICs which have domains
            to enumerate in proper order.
            Full pcie_id / bdf propagates to all partition nodes.
    - [API] Update rsmi_dev_pci_id_get() to allow users to extract
      partition_id from device
    - [CLI] Added fix for devices which have modprobe failure,
      but DRM does not come up properly. Even though driver shows
      initialization was successful.
    - [API/Utils] Overloaded print_int_as_hex() template:
      Now accepts bitsize, and prints in smallest byte size
      possible. Note: bitsize of < 8, please just print as decimial.

Change-Id: Ib0c6f73b2b9c9fea29442a39a669c432874382d8
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
2024-03-08 10:51:15 -05:00
Gopesh Bhardwaj b8acf88c6f rebased and solved conflicts (#605) 2024-03-08 09:04:19 -06:00
Benjamin Welton 1de44447f4 Deadlock Fix for HSA and Serialization Disable/Enabling support (#582)
* Initial barrier

* Working on profiler serializer extraction

* Current progress

* Serializtion Support

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

Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com>

* cmake formatting (cmake-format) (#584)

Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com>

* Minor fix

* Current Progress

* Current progress

* More fixes

* Serialization Fixes

* Bug fix

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

Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com>

* More fixes

* More minor fixes

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

Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com>

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

Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com>

* Lock order inversion false positive

* order fix

* More changes

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

Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com>

* minor test fix

* Minor test changes

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com>
2024-03-08 09:02:43 -06:00
guanyu12 4d1ea826e1 Merge amd-staging into amd-master 20240308
Signed-off-by: guanyu12 <guanyu12@amd.com>
Change-Id: I2edf51a9b8f93589bf6eadee7b2691629c433977
2024-03-08 16:22:17 +08:00
Jonathan R. Madsen 7b6d3c70bd Shared Library Constructor (rocprofv3 deadlock fix) (#599)
* Moved tests/apps to tests/bin

* Renamed cmake project in tests/bin

* Update samples

- Use ROCPROFILER_DEFAULT_FAIL_REGEX
- tweaks to stdout messages

* Update tests

- Use ROCPROFILER_DEFAULT_FAIL_REGEX

* Add tests/lib

- libraries with HIP code

* Update PTL submodule

- remove atexit delete of thread_id_map

* Update cmake/rocprofiler_options.cmake

- Set ROCPROFILER_DEFAULT_FAIL_REGEX

* Update common lib: env + logging

- improved customization of logging settings
- default to disabling logging to files
- install failure handler for rocprofv3
- set_env support in environment.*

* Add lib/rocprofiler-sdk/shared_library.cpp

- shared library constructor

* Update lib/rocprofiler-sdk-tool/tool.cpp

- destructor thread safety
- convert callback_name_info and buffered_name_info to pointers
- install failure handler for logging

* Add tests/bin/hip-in-libraries

- hip-in-libraries is an exe which uses two shared libraries where each shared library contains HIP kernels
  - used for testing deadlocking within __hipRegisterFatBinary

* Update bin/rocprofv3

- reorganized the env variables
- use exec to launch command
- set ROCPROFILER_LIBRARY_CTOR=1

* Add tests/rocprofv3/tracing-hip-in-libraries

- uses hip-in-libraries exe for exe which uses shared libraries to launch HIP kernels

* Update bin/rocprofv3

- fix counter collection (no exec)

* Update lib/rocprofiler-sdk-tool/tool.cpp

- replace "Kernel-Name" with "Kernel_Name"

* Update lib/rocprofiler-sdk/registration.cpp

Use RTLD_LOCAL instead of RTLD_GLOBAL for env libraries

* Update tests/rocprofv3

- replace "Kernel-Name" with "Kernel_Name"

* Update tests

- vector-ops (bin) stream syncs + runs with 4 queues per device
- improve counter-collection/input1 validation
- rocprofv3/tracing-hip-in-libraries does not do sys-trace
- improved validation script for tracing-hip-in-libraries
- updated dispatch_callback in json-tool.cpp following reworking of prototypes for counter collection

* Update samples/counter_collection

- updated dispatch_callback(s) and record_callback(s) following reworking of prototypes

* Update bin/rocprofv3

- reorganized help menu
- added options for sub-HSA tables
- added --hip-runtime-trace
- changed --hip-trace to include --hip-compiler-trace

* Update lib/rocprofiler-sdk-tool

- improved kernel filtering
- removed arch_vgpr, accum_vgpr, sgpr code (in rocprofiler-sdk)
- fixed issue with counter-collection w/o tracing
- added support for fine grained HSA API tracing
- removed directly linking to HSA-runtime

* Update lib/rocprofiler-sdk/agent.cpp

- rocp_agents != hsa_agents is non-fatal when ROCPROFILER_BUILD_CI=OFF (CMake option)

* GPR (vector and scalar) info in kernel symbol data

- rocprofiler_callback_tracing_code_object_kernel_symbol_register_data_t contains general purpose register info

* Header include order fix

- Include repo headers first
- Third party library headers next
- standard library headers last

* Update dispatch profiling public API

- introduce rocprofiler_profile_counting_dispatch_data_t
- change signature of rocprofiler_profile_counting_dispatch_callback_t and rocprofiler_profile_counting_record_callback_t
- provide rocprofiler_user_data_t pointer in dispatch callback
- provide rocprofiler_user_data_t value (from dispatch cb) in record callback

* Update tests/bin/CMakeLists.txt

- fix add_subdirectory(hip-in-libraries) order

* Update VERSION

- bump to 0.2.0 in prep for AFAR
2024-03-07 22:21:26 -06:00
Gopesh Bhardwaj 665c546e65 Documentation Updates (#470)
* Updating installation doc

* updating README

* Addressing Yifan's feedback

* trivial updates

* Added limitation for individual xcc in readme

* Added rocprofv3 page

* README updates

* Updating rocprofv3

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

Co-authored-by: bgopesh <7112102+bgopesh@users.noreply.github.com>

* Merging documentation team's update

* Update source/docs/installation.md

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

---------

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>
2024-03-07 21:05:16 -06:00
Karl W Schulz ffe08cbbad update version of download-artifact
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-07 17:25:33 -06:00
Karl W Schulz fef48cbc29 fix version for cancel-workflow-action
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-07 17:13:17 -06:00
Karl W Schulz ce47409fe9 updating versions for multiple github-actions
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-07 17:04:15 -06:00
colramos-amd 9e6b293249 Remove doc references to deprecated --list-kernels option
Signed-off-by: colramos-amd <colramos@amd.com>
2024-03-07 15:48:26 -06:00
Jose Santos 66696f852b Change ipblocks flag to --blocks
Signed-off-by: Jose Santos <josantos@amd.com>
2024-03-07 15:26:40 -06:00
Jose Santos 35ef8c0707 update workloads]
Signed-off-by: Jose Santos <josantos@amd.com>
2024-03-07 15:26:40 -06:00
Giovanni LB 4dd21807c0 Updating to load_delta. Fixing perfetto plugin.
Change-Id: If893f84b0ff108cfa0ccdcf717ee8592aa621032
2024-03-07 15:21:37 -03:00
Karl W Schulz afea510551 enable rocm 6.x testing
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-03-07 11:35:50 -06:00
Jonathan Kim eb2100daad Fix deferred dmabuf export on IPC due to GEM object loss
When deferring a dmabuf export on an import call, there may be a
failure to export as the GEM object is not referenced by the kernel
mode driver.  To get around this, do a non-deferred export and
immediately close the dmabuf FD to keep FD creation to a minimum.
This way, the GEM object will have a kernel mode driver reference
when a deferred export is done.

Also a bad dmabuf FD sent over a socket may not be received by an import
reader and this can cause a hang.
Set a 10 second timer so that importer is not blocking indefinitely.

Change-Id: I11a9b5ec64aa2e16fd6aecdf46c34e4eb56ccfd0
2024-03-07 12:12:06 -05:00
David Galiffi 020c7c3e3f Add Doc team to CODEOWNERS file
Signed-off-by: David Galiffi <David.Galiffi@amd.com>
Change-Id: Iad8eea0645b63bddb835ed22080facc7d25c1bc0
2024-03-07 11:45:12 -05:00
gobhardw 82905606d5 SWDEV-446917 ub24 compilation fix
Change-Id: I2740d8551c7cdee070eaa0e1a320d1a7a3e4c7e9
2024-03-07 16:44:52 +05:30
Istvan Kiss 50a079af0f Update documentation and add python API documentation
Change-Id: Ibccf5b6a5fba81cea42e04a022deac8a3207b9b8
2024-03-06 22:01:30 -05:00
David Galiffi b34eafe45a Add Doc team to CODEOWNERS file
Signed-off-by: David Galiffi <David.Galiffi@amd.com>
Change-Id: Iad8eea0645b63bddb835ed22080facc7d25c1bc0
2024-03-06 17:58:36 -06:00
colramos-amd e538d3ea16 Ensure sort on rocprof input (#304)
Signed-off-by: colramos-amd <colramos@amd.com>
2024-03-06 17:05:24 -06:00
Cole Ramos f4511e7280 Force encoding before Omniperf execution (#299)
* Force encoding before Omniperf execution

Signed-off-by: colramos-amd <colramos@amd.com>

* Fix circular dependency in utils module

Signed-off-by: colramos-amd <colramos@amd.com>

---------

Signed-off-by: colramos-amd <colramos@amd.com>
2024-03-06 17:01:07 -06:00
Nick Curtis 525eb3f527 handle case where workload dir is symlink (#297)
Signed-off-by: Nicholas Curtis <nicurtis@amd.com>
Co-authored-by: Nicholas Curtis <nicurtis@amd.com>
2024-03-06 12:08:16 -06:00
Jonathan R. Madsen 1d33d4cf78 Update rocprofiler_query_available_agents(...) (#596)
* Agent info version

* Complete implementation

- revert "rocprofiler_iterate_agents" to "rocprofiler_query_available_agents"

* Misc tweaks

- update rocprofiler_query_available_agents impl

* Update include/rocprofiler-sdk/agent.h

- Fix undocumented param for rocprofiler_query_available_agents
2024-03-06 02:17:40 -06:00