Commit Graph

8920 Commits

Author SHA1 Message Date
Karl W Schulz 65f150e998 bump wallclock runlimit for test
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2023-11-01 17:32:04 -05:00
Jonathan R. Madsen 14373c57be Doxygen Improvements (#170)
* Doxygen updates

- Fix multiple @param where [in]/[out] was misplaced
- Fix @return
- Insert @retval
- Separate out installing conda environment from build docs step
2023-11-01 15:31:15 -05:00
Karl W Schulz 12fe6cc508 add additional top-level vars for number of kernels expected and
dispatch id; tests updated to use these vars so that vcopy binary can
be used instead of mixbench

Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2023-11-01 11:30:01 -05:00
Karl W Schulz a3b9dc7505 run profiler tests through queue
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2023-11-01 11:10:29 -05:00
Charis Poag b49e82a4f4 Fix GPU Metric content revision check
Change-Id: I94ff4732be01214591b635357d9a62eb7d5192a0
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
2023-10-31 17:42:02 -05:00
colramos-amd 87388227ca Initial overhaul of Profile mode
Signed-off-by: colramos-amd <colramos@amd.com>
2023-10-31 15:11:17 -05:00
Jonathan R. Madsen 033fd941e0 Remove SERVICE_ from ROCPROFILER_SERVICE_* enum vals (#168)
- these are unnecessary and are inconsistent with the name convention of everything else related to callback tracing
2023-10-31 15:06:03 -05:00
Ammar ELWazir ae3c278d7a SWDEV-366827 - Fixing Issues with ASAN builds due to merging
Change-Id: I2da6607872b10e6a0211e08604254d4425fadb77
2023-10-31 14:47:49 -04:00
gobhardw 9cc2d896ac SWDEV-416735 Adding --merge-traces option to rocprof script
Change-Id: Ia6bc11c6265913d20ead85c50981893d147ff5eb
2023-10-31 14:30:36 -04:00
Karl W Schulz 410b06c8e8 include step to build hip binary
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2023-10-31 13:23:00 -05:00
Jonathan R. Madsen cfbea0e5eb Update include/rocprofiler and lib/rocprofiler (#166)
- renamed inconsistent callback tracing types
- updated HIP and Marker API data structures (resemble HSA)
- cleaned up api_args.h and api_id.h headers
- cleaned up hsa.h, hip.h, and marker.h headers
- update to use (more consistent) name changes
- update code object data structs
- ROCPROFILER_SERVICE_CALLBACK_PHASE_{LOAD,UNLOAD} equivalent to ENTER, EXIT respectively
2023-10-31 12:48:24 -05:00
gobhardw ff9dc8cea0 SWDEV-426220 Removing dummy kernel from test app
Change-Id: I1576732399fcff924a88cd442f0dac0121bd5e12
2023-10-31 13:29:54 -04:00
Ammar ELWazir 56d060a4a9 Removing .github from the main repository
Change-Id: Ia91cbd4c5145a06d4867eb4649c81ba3b95c6d6b
2023-10-31 13:05:45 -04:00
Karl W. Schulz c15ec38eca run all ci tests
Signed-off-by: Karl W. Schulz <karl.schulz@amd.com>
2023-10-31 11:08:15 -04:00
Karl W. Schulz bf79b8c0c5 add mi100 badge
Signed-off-by: Karl W. Schulz <karl.schulz@amd.com>
2023-10-31 10:52:19 -04:00
Karl W Schulz d0c663485f add profile execution test in cmake and enable in CI
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2023-10-31 09:38:40 -05:00
JoseSantosAMD a3dcfa8cb2 Fix dispatch notation
Signed-off-by: JoseSantosAMD <Jose.Santos@amd.com>
2023-10-31 10:24:14 -04:00
JoseSantosAMD d787bac913 pytest scripts updated to revamp test cases
Signed-off-by: JoseSantosAMD <Jose.Santos@amd.com>
2023-10-31 10:24:14 -04:00
JoseSantosAMD 279552c03f Tests create difference logs calculated from a baseline
Signed-off-by: JoseSantosAMD <Jose.Santos@amd.com>
2023-10-31 10:24:14 -04:00
JoseSantosAMD acd33f5347 Roof only csvs updated
-  Removes dir if workload dir already present

Signed-off-by: JoseSantosAMD <Jose.Santos@amd.com>
2023-10-31 10:24:14 -04:00
JoseSantosAMD 43781c0454 pytest now checks soc for soc specific testing
Signed-off-by: JoseSantosAMD <Jose.Santos@amd.com>
2023-10-31 10:24:14 -04:00
JoseSantosAMD 585b0f27fe Check if csvs populated
Signed-off-by: JoseSantosAMD <Jose.Santos@amd.com>
2023-10-31 10:24:14 -04:00
JoseSantosAMD edaa6ad818 Initial commit for pytest
Signed-off-by: JoseSantosAMD <Jose.Santos@amd.com>
2023-10-31 10:24:14 -04:00
Bill(Shuzhou) Liu de5bc164de Query the CPU and GPU link type
The rsmi_topo_get_link_type() is extended to support query the CPU
and GPU link type by passing dv_ind_dst as 0xFFFFFFFF.

Change-Id: I1f212a01e8120adb70a08ab772fa9faaaecefa29
2023-10-31 10:17:24 -04:00
Ammar ELWazir d033cf3ab7 SWDEV-428381: Moving rocminfo to use the one available in the path
Change-Id: I736cc2ca9ddabf35cbb24d3fba553e2cbec5e396
2023-10-31 10:08:28 -04:00
Karl W Schulz 6fd2e44e5f update branch for CI -> 2.x
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2023-10-31 09:51:36 -04:00
Karl W Schulz a39514f02f Introduce a cmake option to enable python code coverage. It now
defaults to being disabled and can be enabled via a
-DENABLE_COVERAGE=ON option (#194).  Introduce CI on mi100 that
leverages code coverage and publishes results along with a testing
report.

Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2023-10-31 09:51:36 -04:00
Ammar ELWazir d6e24d1fe0 Update .gitignore (#161) 2023-10-30 17:40:49 -07:00
Mythreya 46e02a9866 Add MI200/MI300 counters
Revision - Addition [Impact SoC: MI200, MI300]
    Note: this set of counters are important help understand the
          bottleneck.
    1.	TCC_TAG_STALL
        a.	Metric:  TCC_TAG_STALL/TCC_CYCLE: percentage of time TCC
            tag lookup pipeline is stalled
    2.	TCP_TCR_TCP_STALL_CYCLES
        a.	Metric: TCP_TCR_TCP_STALL_CYCLES/TCP_GATE_EN1: percentage
            of time TCP is stalled by TCR

Revision - Addition [Impact SoC: MI300]
    3.	TCC_BUBBLE:
        a.	Definition: Number of 128-byte read requests sent to EA
        b.	Revised Metric #1, TCC-EA Read BW:
        ReadBW =   128 * TCC_BUBBLE
                + 64 * (TCC_EA0_RDREQ - TCC_BUBBLE - TCC_EA0_RDREQ_32B)
                + 32 * TCC_EA0_RDREQ_32B
        c.	Revised Metric #2: TCC_EA Read Latency
        ReadLatency = TCC_EA0_RDREQ_LEVEL / (TCC_BUBBLE + TCC_EA0_RDREQ)

    /* [Fineprint] More detailed arithmetic:
    * ReadLatency = TCC_EA0_RDREQ_LEVEL / (#32B_req + #64B_req + #128B_req * 2)
    */

Change-Id: I0a2dfc1b64ca97023b1e8ba0f9830330b3034946
2023-10-30 15:38:46 -04:00
Ammar ELWazir dbfe955d57 Fixing initialization of ROCTx for the tool in the default constructor
Change-Id: I12a3bbde4420a9eb8d734c546169a11cb23237dd
2023-10-30 16:53:21 +00:00
gobhardw 49bd09b46c SWDEV-429377 : Fixing kernel name truncation for plugins
Change-Id: I5875048d1773959fdd73cbff5498854e61b92af8
2023-10-30 10:52:31 -04:00
Charis Poag 57b6135e54 Partition EBUSY with RSMI_STATUS_BUSY & invalid GPU Metrics check
* Updates:
   - [API/CLI] rsmi_dev_*_partition_set &
     rsmi_dev_*_partition_reset - exposed RSMI_STATUS_BUSY for
     EBUSY writes + cleaned up accidental map insertions
     (maplookup[] can insert values that are not in the map,
     map.at(key) fixes this potential issue)
   - [API] rsmi_dev_gpu_metrics_info_get() - returns
     RSMI_STATUS_NOT_SUPPORTED for unsupported metric tables
     outside of 1v1/1v2/1v3
   - [API] writeDevInfoStr() - exposes RSMI_STATUS_BUSY for
     EBUSY write errors; kept backward compatibility
     for other writes which do not care about these states
   - [API] rsmi_dev_od_volt_info_get()
      & rsmi_dev_od_volt_curve_regions_get() have better logging
     + Expose more details on why they are erroring
   - [Utils/logs/example] Expose AMD GPU gfx target version to aid in
     system troubleshooting
   - [Utils] Added test methods that look at od volt
     freq & regions into here - for easier access across
     several tests
   - [Utils] Updated getRSMIStatusString(new argument - fullstatus;
     default to true for backwards compatibility)
     -> true shows shortened RSMI STATUS response
   - [Utils] Added splitString to cut out noisy return responses
     (used in getRSMIStatusString(), when fullstatus = true)
   - [Utils] Added getFileCreationDate() to expose build date
     of the library - helpful for local builds or experimental builds
   - [Utils] Macro cleanup
   - [Example] Added a few gpu_metric checks - helpful for upcoming
     updates
   - [Device] SYSFS/DebugFS - now have better r/w displayed in logs
   - [LOGS] Expose library build date - see above for details
   - [Tests] Add more warnings/errors to test builds
   - [Tests] Moved up Partition tests for ordered test runs - helped
     identify issues with GPU BUSY writes
   - [Tests] compute_partition_read_write - handles RSMI_STATUS_BUSY
     with waits for busy status found & cleaned up how we checked
     for partition changes - with RSMI responses exposed more clearly
   - [Tests] perf_determinism - multi gpu now properly runs through
     with full resets as needed
   - [Tests] volt_freq_curv_read - better error handling with more
     verbose output

Change-Id: Ie94c6abb6a9aab95c345996d3ad3843cf6734977
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
2023-10-27 14:52:02 -04:00
Ammar ELWazir 32907ff14c Fixing Tool/Plugin Versioning and adding --version and adding proper documentation for those features
Change-Id: Icdb0d64e02943e638f183ab31759a37736d2dd61
2023-10-27 14:52:13 +00:00
Lancelot Six 372fc3910b src/core/isa_capture/code_object_track.cpp: remove unused dbgapi import
The src/core/isa_capture/code_object_track.cpp file includes the
amd-dbgapi header but does not use the library (and is not configured to
use the library).

Remove the unused import.

Change-Id: Icc6c46a1f52355e9e5631395dfad1b44365bdca4
2023-10-27 00:09:21 -04:00
Ammar ELWazir c46a118cfb Updating Golden Traces
Change-Id: I1234bcbe7eff8e53855e23e246d821102672006d
2023-10-27 00:51:55 +00:00
Ammar ELWazir cca295d951 Fixing V2 tests to accept HIP function versioning
Change-Id: Ic68116feb51b396b27e858dcaf8b389d4d11a49b
2023-10-26 22:04:53 +00:00
Mythreya 1fae494b12 Remove non-functional counters for MI200 and MI300
Counters removed for MI300 (gfx940)
    TCP_TCC_WRITE_REQ_HOLE_LATENCY
    TCP_TCC_WRITE_REQ_LATENCY
    TCP_TCC_READ_REQ_LATENCY
    TCP_TCP_LATENCY

Counters removed for MI200 and MI300 (gfx90a and gfx940 respectively)
    TA_BUFFER_COALESCABLE_WAVEFRONT
    TA_FLAT_COALESCABLE_WAVEFRONT
    TCC_EA0_WRREQ_IO_CREDIT_STALL
    TCC_EA0_WRREQ_GMI_CREDIT_STALL
    TCC_EA0_WRREQ_DRAM_CREDIT_STALL
    TCC_EA0_RDREQ_IO_CREDIT_STALL
    TCC_EA0_RDREQ_GMI_CREDIT_STALL
    TCC_EA0_RDREQ_DRAM_CREDIT_STALL

Change-Id: Ic3d1e7bf35495f35b1239f03ca6420e949421386
2023-10-26 12:50:57 -04:00
gobhardw 1bc98d806d updating rocprof script for supported hw check
Change-Id: I41a8571682fd4c9ab227cc7d964f86d027d5c964
2023-10-26 12:48:47 -04:00
Ammar ELWazir 7e8348b017 Adding Kernel Names instead Kernel Execution
Change-Id: I102a8e741eeee18d240a62ff33e9b94e8f57d5ff
2023-10-26 12:33:01 -04:00
Shweta Khatri 4890ffe224 Updated the test to access PCIe domain info for the agent
Change-Id: I901fd76f91315a0262945659d12349ba7b64ed11
2023-10-26 11:37:12 -04:00
David Yat Sin 1a7de9588e Add LoongArch64 Support
Patch submitted by user Xinmudotmoe on github

Change-Id: I58fd035b4ec4856f20d63747ababd49fa9764348
2023-10-26 11:36:16 -04:00
Parag Bhandari 8b9d8b966d Add gfx1031 support for building
Change-Id: Ie88d76404a09de07d66a84083a7a8549bff3d050
2023-10-26 11:33:02 -04:00
Giovanni Lenzi Baraldi 07aa54c5aa Gbaraldi/pcparser (#58)
* Sample PC sampling parser library

* Fixed error message

* Added correlation_id tests. Fixed correlation_id.

* Fixed some tests.

* Added read_index to dispatch_pkt_id

* Added some comments

* Added more comments

* Moved test.cpp to a move descriptive file

* Added gfxip selection

* Added parser checks. Added GFXIP selection switch.

* Fixed dispatch_pkt_wrap with Joe's comments

* Performance improvement of 25%~100%

* Attempt at reducing overhead of dispatch bookkeeping

* Fixed cache invalidate

* Fixed error message descriptions

* Added GFX12

* Renamed files. Create C-only header.

* Formatting

* Other performance improvement

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

Co-authored-by: ApoKalipse-V <ApoKalipse-V@users.noreply.github.com>

* Added copyright

* Format-11

* Performance improvement. Added some GFX9 snap tests. Fixed hostTrap selector.

* Clang format.

* Added more gfx9 field tests

* Clang format

* Added parserv2 for pcsampling

* Added multibuffer test

* Created records processor

* Changed bFlipBuffer name

* pcs parser moved to lib/rocprofiler dir

* pcs parser compiles; one test moved

* pcs parser: tests copied from samples folder

The tests currently reside in the single .cpp.
They should be modularized and refactored to distinct unit tests
from integration test.

gfx9 test can fail sometimes. I did not have time
to deal with it.

Since Giovanni will continue working on this, I did not remove
pcs parser from the samples folder.

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

Co-authored-by: vlaindic <vlaindic@users.noreply.github.com>

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

Co-authored-by: vlaindic <vlaindic@users.noreply.github.com>

* pcs parser: failing test removed for now

* pcs parser: fixing static errors and separating template definitions from implementation

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

Co-authored-by: vlaindic <vlaindic@users.noreply.github.com>

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

Co-authored-by: vlaindic <vlaindic@users.noreply.github.com>

* pcs parser: fixing CI/CD errors

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

Co-authored-by: vlaindic <vlaindic@users.noreply.github.com>

* pcs parser: parsers removed from samples

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: ApoKalipse-V <ApoKalipse-V@users.noreply.github.com>
Co-authored-by: vlaindic <vladimir.indic@amd.com>
Co-authored-by: vlaindic <vlaindic@users.noreply.github.com>
2023-10-26 08:14:02 -07:00
Ammar ELWazir b5fd31fb9b Fixing Versioned HIP Call
Change-Id: Ib768f8a53ffc6cc3bb89e6c867918b6440ce1cab
2023-10-26 14:50:16 +00:00
Ammar ELWazir 5aa94a7160 Fixing ROCM Patch Version issue (#30) 2023-10-26 09:04:39 -05:00
guanyu12 fe6bf6444a Merge amd-staging into amd-master 20231026
Signed-off-by: guanyu12 <guanyu12@amd.com>
Change-Id: I57e13f063345d6932d285257815638096f23d1d6
2023-10-26 14:51:27 +08:00
Ranjith Ramakrishnan 8babd28a50 SWDEV-427554 - Temporarily disable building of unittest in ASAN builds
Unittest is failing in ASAN builds. To unblock ASAN builds, disabling the same as a workaround
The test will run in non-asan builds

Change-Id: Ib3c8d7a2c77aa83e9c6260e9b47ccb0564f789e8
2023-10-25 17:45:54 -07:00
Jonathan R. Madsen 24041c4d87 C++ filesystem and link to dl library in test exe (#29)
* Add lib/rocprofiler-register/details/filesystem.hpp

- this provides backwards compatibility for compiler which do not have <filesystem>
  - use <experimental/filesystem> when not available

* Update tests/CMakeLists.txt

- test executables link to dl library (via CMAKE_DL_LIBS)

* Update CI workflow

- include ubuntu-20.04 jobs
2023-10-25 12:49:13 -05:00
Jonathan R. Madsen 40f37f9597 Update README and workflows (#27)
* Update README

- Overview
- Contributing
- Build and install

* Update workflows

- branches reflect new amd-mainline and amd-staging names instead of main and develop
2023-10-25 12:49:13 -05:00
gobhardw d4c2546336 SWDEV-408936 solving rocprof hang due to early initialization
Change-Id: Ia9c52f3b4c7ff191054cef40208f26b28f021378
2023-10-25 20:02:27 +05:30