Commit Graph

8920 Commits

Author SHA1 Message Date
Joseph Huber 9e26cbac14 Add executable symbol info for the wavefront size
The wavefront size is currently only exposed as an agent level
attribute. This is not correctyl, because while the agent has a default
wave front size that is usually correct, it can easily be overridden via
options like -mwavefrontsize64 on various ISAs. The wavefrontsize
attribute is actually more of a calling convention that is consistent
within a callgraph. Because the root of each call graph is a kernel in
this architecture, we need to be able to query this on a per-kernel
basis. This information is already avialable in the kernel descriptor
packet, but it wasn't exported.

This patch adds HSA_CODE_SYMBOL_INFO_KERNEL_WAVEFRONT_SIZE as a new
option to query on the executable symbol.

Change-Id: I744815c89cc9d4c82f25479bdd48ae1f32e859ff
2024-02-09 15:55:30 +00:00
Bill(Shuzhou) Liu 4e0a7f2f67 Support set min or max clock
In addition to be able to set clock range, new setextremum option
is added to set only min/max clock as sometimes one of them may
not be supported.

Change-Id: I7c91ba308f3fc6c78efc88117509c515d403a6cb
2024-02-09 09:24:26 -06:00
Galantsev, Dmitrii 1015cba489 Add lychee.toml for dead link checks
Use Lychee[1] to check dead links

[1] - https://github.com/lycheeverse/lychee

Change-Id: I741a2760283da8c21b95e5b516f78e39a9d9a0a1
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2024-02-08 18:18:39 -05:00
Galantsev, Dmitrii 2c27473d6f README - Fix URLs and add lychee config
Use Lychee[1] to check dead links

[1] - https://github.com/lycheeverse/lychee

Change-Id: I0e8aade7879748dbcb4700a527bcae5a2c29ecb5
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2024-02-08 17:06:02 -06:00
colramos-amd 33a2cd34ce Revert sbios fix. Catch commas
Signed-off-by: colramos-amd <colramos@amd.com>
2024-02-08 12:52:07 -06:00
Nick Curtis c8f4f74255 Escape sbios, can have commas on some systems (#241)
* escape sbios, can have commas on some systems

Signed-off-by: Nicholas Curtis <nicurtis@amd.com>

* Prefer to cast to str in original function

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

---------

Signed-off-by: Nicholas Curtis <nicurtis@amd.com>
Signed-off-by: colramos-amd <colramos@amd.com>
Co-authored-by: Nicholas Curtis <nicurtis@amd.com>
Co-authored-by: colramos-amd <colramos@amd.com>
2024-02-08 12:40:52 -06:00
Jonathan R. Madsen 15127c0d43 OMNITRACE_ROCM_SMI_METRICS (#331)
* OMNITRACE_ROCM_SMI_METRICS

- configuration variable OMNITRACE_ROCM_SMI_METRICS for specifying which rocm-smi metrics to collect
- auto-disable metric collection when rsmi_dev_X_get returns RSMI_STATUS_NOT_SUPPORTED

* Bump version to 1.11.1

* Python formatting

* Update python/libpyomnitrace.cpp

- fix usage of substr (ignored return value)

* Update python/gui/source/gui.py

- Fix E721
  - do not compare types, for exact checks use `is` / `is not`, for instance checks use `isinstance()`
2024-02-08 07:06:23 -06:00
Manjunath-Jakaraddi a1f9b244c8 SWDEV-419965: Enabling and fixing AyncCopyTest in runTracerFeatureTests
Change-Id: Iceeaae11b5367483ac03db0c500dd27f4037e53e
2024-02-08 02:03:04 -05:00
Benjamin Welton 3eb6a27bc6 Add support for AQL dimensions (#262)
* Add support for AQL dimension changes

Adds support for returning dimensions from AQLProfile through rocprofiler
to tools. Includes a much larger expanded test suite that covers nearly
all files in counter collection.

Specific changes below:

samples/counter_collection/print_functional_counters: Modified to check
the validity of dimensions returned in comparison to the actual underlying
data obtained from a kernel execution.

rocprofiler-sdk/aql/helpers: adds function calls to support fetching
dimension information from AQLProfile.

rocprofiler-sdk/aql/packet_construct: modified to allow for events
to be exported to aid evaluate_ast in decoding the output buffer.

lib/rocprofiler-sdk/counters: Instance count now derived from dimension
sizes. rocprofiler_query_counter_dimensions now moved to a callback format
to improve usability.

rocprofiler-sdk/counters/core: Code migrations and exports of functions
for testing.

rocprofiler-sdk/counters/dimensions: Generates a dimension cache to be
used when querying dimension information for a counter id.

rocprofiler-sdk/counters/evaluate_ast: Modified to pass back correct
dimension information and to check/determine output dimensions for derived
counters.

rocprofiler-sdk/counters/id_decode: Modified to have a map between
dimension name -> dimension along with a conversion from the aql profile
id for a dimension (string) -> integer based id (happens only once during
init).

rocprofiler-sdk/hsa/queue: Modified to allow for making testing easier.
Specifically to allow Queue to now be mocked in unit tests for counter
collection.

* Merge with changes for serialization

* Added suggestions

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

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

* Minor fix

* Test change

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: bwelton <bwelton@users.noreply.github.com>
2024-02-07 22:03:21 -06:00
Jonathan Kim e911335cee Minimize FD creation on IPC Create
Instead of caching shared memory fds for export on the exporter side,
only export the FD in the async handler when requested.
The importer should request export fd closure once import is done.

Change-Id: I469e0cd1749beeb9c506c8a6461745fb039d9c3b
2024-02-07 18:50:54 -05:00
Mythreya 8e312471dc Fix ToolsApiTable versioning
ToolsApiTable's version was incorrectly default initialized to 0.
Fixes error in commit fc889669

Change-Id: I41e9301a9c33b119ee50f6164d21ddf11dc188c4
2024-02-07 17:02:32 -05:00
David Galiffi 9bba63be19 SWDEV-436568: Add CODEOWNERS file
Add @ammarwa and @bgopesh as CODEOWNERS.
This is for GitHub upstream.

Signed-off-by: David Galiffi <David.Galiffi@amd.com>
Change-Id: I84ddc63e20c8b3ea4d4c8349a95d46b2925da2a2
2024-02-07 15:09:51 -05:00
David Galiffi 5d066e5286 SWDEV-436568: Add CODEOWNERS file
Add @ammarwa and @bgopesh as CODEOWNERS.
This is for GitHub upstream.

Signed-off-by: David Galiffi <David.Galiffi@amd.com>
Change-Id: I788f5ad550f91e8d3ce45bbeb527283bf11c4fd7
2024-02-07 15:07:47 -05:00
Shweta Khatri 13800cc6d5 Set max_alloc to 95%,reduce by 1% on fail
Prevents OOM-Killer trigger,if all physical and swap mem gets fully used

Change-Id: I70d558fa9c06fe6217e62d57e11aec6a089aa0bb
2024-02-07 14:46:58 -05:00
David Yat Sin f7de85082e VMM: Allow non-contiguous memory maps
Adjust code to allow the use of non-contiguous chunks of memory to be
mapped within a single VA range.

Change-Id: Ida21ba202927229347b3a32d9b7106df10819cf5
2024-02-07 16:56:52 +00:00
David Yat Sin 776da1a3f7 rocrtst: Add some tests for hsa_amd_pointer_info
Add tests to catch whether ROCr breaks ABI compatibility with the
hsa_amd_pointer_info API in case the hsa_amd_pointer_info struct is
extended.

Change-Id: I4e69bf30db9791e59f895b2798b87985c41242e5
2024-02-07 16:56:52 +00:00
David Yat Sin 0f30da58a7 Improve documentation for set_async_scratch_limit API
Change-Id: I03ca986cdd468c7b167e119bd2f25d5c79ff2142
2024-02-07 16:56:52 +00:00
Mythreya a67af3807f Initial support for scratch allocation tracking
Add new tools table and functions to notify in case of an event

Change-Id: I47f0c2f3c8e02d7bcb74d649903eb4f86721c154
2024-02-07 16:56:52 +00:00
Joseph Greathouse 1d6691e06b Fix undefined behavior in definition of hsa_amd_memory_fault_reason_t
Currently, the definition of hsa_amd_memory_fault_reason_t tries to
set a constant of 0x8000_0000 by using the definition "1 << 31".

However, the 1 in this definition is a signed integer by C++ rules.
On our architectures, shifting a signed integer by 31 results in
signed integer overflow. Signed integer overflow results in
undefined behavior.

Forcing the 1 to be unsigned avoids this.

Change-Id: I860431eeede4eff29598f646abf3c1337b048d71
2024-02-07 16:56:52 +00:00
Jonathan Kim 1dd4a7dc18 Fix copy logic on devices with no xgmi SDMAs
Fix gang factor overwrite of 0 if there are no xGMI SDMAs
on the device and gang factor is 1.

Change-Id: I041d4b4ae87fb68f224ee4dedb758c6f06c022a9
2024-02-07 16:56:52 +00:00
Nick Curtis 39cce6b42b Install omniperf_soc and omniperf_profile, such that a 'make install'd build will function (#240)
Signed-off-by: Nicholas Curtis <nicurtis@amd.com>
Co-authored-by: Nicholas Curtis <nicurtis@amd.com>
2024-02-07 10:47:44 -06:00
David Belanger 3dd98d075f kfdtest: Updated CWSR test for emulation
Added global flag g_IsEmuMode and set it when running under emulator.
Adjusted delays in KFDCWSRTest for emulator.

Change-Id: Ia5c0be40816ac2219add943e306ee16438f5b852
Signed-off-by: David Belanger <david.belanger@amd.com>
2024-02-06 20:56:32 -05:00
Galantsev, Dmitrii f13a1fbea8 Upgrade gRPC v1.59.1 -> v1.61.0
Change-Id: I8a3f13dd8f264e28474bd65e92ac53f87ab7db3f
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
Depends-On: Icbb7b4a580894d78d8ef992befa26ce20fcf3309
2024-02-06 19:39:50 -06:00
Jonathan Kim a3efd13a2f Fix IPC import on device memory with no requested nodes
Users can import device memory without specifying the target node.
DMA buf imports return a Thunk handle that's not useful for
gpu mapping calls.

Fix this by using the import node information to re-import and
map with the correct target GPU.

Also fix IPC detach calls by deregistering the Thunk handle
import immediately during attach instead of failing to do it later
on detach since Thunk handles aren't placed into ROCr allocation
map.

Finally refactor the IPC attach function for cleaner logic flow.

Change-Id: Ib2bf178110b2be98bd6917c765f724e4e613f5f2
2024-02-06 23:15:29 +00:00
Jonathan Kim 15691ae460 Fix DMABuf FD closure for IPC attach client
We should also close the client side dmabuf fd after importing for target
nodes.

Change-Id: I74f61dd65bebb03dc002f5df7301efd1ef8d9603
2024-02-06 23:15:29 +00:00
colramos-amd d7b78da250 Add new l2 cache per channel headers to supported fields
Signed-off-by: colramos-amd <colramos@amd.com>
2024-02-06 16:19:40 -06:00
colramos-amd 48911111be Enable standalone GUI with new metric reordering
Signed-off-by: colramos-amd <colramos@amd.com>
2024-02-06 16:19:40 -06:00
colramos-amd 3b8e08f589 Add numPipes field and omit 'non-functional' counters from configs
Signed-off-by: colramos-amd <colramos@amd.com>
2024-02-06 16:19:40 -06:00
colramos-amd 4c9a638e2d Standardize syntax across all metric configs
Signed-off-by: colramos-amd <colramos@amd.com>
2024-02-06 16:19:40 -06:00
colramos-amd f4053bc0a2 Update perfmon config for tcc
Co-authored-by: Nick Curtis <nicholas.curtis>
Signed-off-by: colramos-amd <colramos@amd.com>
2024-02-06 16:19:40 -06:00
colramos-amd 66fcfd3def General spell check and typo fixing
Co-authored-by: Nick Curtis <nicholas.curtis@amd.com>
Signed-off-by: colramos-amd <colramos@amd.com>
2024-02-06 16:19:40 -06:00
colramos-amd d16f58b797 Add numPipes built-in-var for updated metrics
Co-authored-by: Nick Curtis <nicholas.curtis@amd.com>
Signed-off-by: colramos-amd <colramos@amd.com>
2024-02-06 16:19:40 -06:00
colramos-amd deef37d5a9 Update metrics, handling merge conflicts in L2 cache per channel
Co-authored-by: Nick Curtis <nicholas.curtis@amd.com>
Signed-off-by: colramos-amd <colramos@amd.com>
2024-02-06 16:19:40 -06:00
colramos-amd 54f0fa8c81 Add example apps to compliment docs
Co-authored-by: Nick Curtis <nicholas.curtis@amd.com>
Signed-off-by: colramos-amd <colramos@amd.com>
2024-02-06 16:19:40 -06:00
colramos-amd 4b8f519e9b Add full documentation for updated metrics (#224)
Co-authored-by: Nick Curtis <nicholas.curtis@amd.com>
Signed-off-by: colramos-amd <colramos@amd.com>
2024-02-06 16:19:40 -06:00
colramos-amd b0cf695976 Fix SPGR merge warning and more descriptive CLI output
Signed-off-by: colramos-amd <colramos@amd.com>
2024-02-06 16:12:14 -06:00
Gopesh Bhardwaj 8a25b239bc Fixing counter collection in tools and enabling tests (#436)
* Fixing coutner colleciton in tools and enabling tests

* fixing tests

* improving coverage on test

* Adding vector operations app

* Fixing tools bug for counter collection

* removing roctx linking
2024-02-06 09:55:07 -08:00
Galantsev, Dmitrii aa5448fc16 CMAKE: Reduce install messages size
Change-Id: I6fa7cfe986b1de702492a96bddbfd406501bba50
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2024-02-06 00:31:32 -06:00
Karl W Schulz 2f3832d30a disable METRIC_COMPARE option for the time being
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-02-05 16:20:21 -06:00
Karl W Schulz eece1f4688 add an optional exit_on_error arg for the run utility and enable for a
subset of calls to rocm-smi

Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-02-05 16:20:21 -06:00
SrirakshaNag f6198f226a Kernel Serialization Support (#379)
* Serialization-rebased with main branch

* Removing client_id from queue completion callbacks

* removing debugging code

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

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

* moving ready signal handler to anonymous namespace

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

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

* Handling deque search better in queue destructor

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

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

* disabling test_total_runtime test  in code coverage

---------

Co-authored-by: Benjamin Welton <bewelton@amd.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: SrirakshaNag <SrirakshaNag@users.noreply.github.com>
2024-02-05 12:42:59 -06:00
Bill(Shuzhou) Liu 5cfe2b4169 Fallback to junction temperature and socket power
If the card does not have edge temperature, fallback to junction
temperature. If the card only have socket power, then use socket
power instead.

Change-Id: I053a67a89cf3b29a34e82123f522c08d7dd68916
2024-02-05 10:10:26 -06:00
Karl W Schulz 5b14a4a836 update syntax for fail-fast option
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
2024-02-05 09:01:57 -06:00
JoseSantosAMD 717a21cf84 Update csv headers, and SystemExit codes
Signed-off-by: JoseSantosAMD <Jose.Santos@amd.com>
2024-02-04 12:44:47 -06:00
colramos-amd 7556316f02 Fix reporting of --roof-only runs in sys_info
Signed-off-by: colramos-amd <colramos@amd.com>
2024-02-04 12:44:47 -06:00
JoseSantosAMD 869f9ac8a8 Update Roofline output file list
-  add check device count in check_csv_files
-  reformat

Signed-off-by: JoseSantosAMD <Jose.Santos@amd.com>
2024-02-04 12:44:47 -06:00
colramos-amd 9b464503fe Fix reporting of --roof-only runs in sys_info
Signed-off-by: colramos-amd <colramos@amd.com>
2024-02-04 12:44:47 -06:00
JoseSantosAMD 70306c8683 Add threshold type to output, set logging to False
Signed-off-by: JoseSantosAMD <Jose.Santos@amd.com>
2024-02-04 12:44:47 -06:00
JoseSantosAMD 09945a6148 Update metric dict
Signed-off-by: JoseSantosAMD <Jose.Santos@amd.com>
2024-02-04 12:44:47 -06:00
JoseSantosAMD f461d0052b Update list of metrics with very low variance
Signed-off-by: JoseSantosAMD <Jose.Santos@amd.com>
2024-02-04 12:44:47 -06:00