Fixed multiple issues related to memory management, atomicity,
and error handling across various functions: handle null checks,
use-after-free, unchecked returns, and memory leaks.
Change-Id: Ia7c76320cc20e24001052fbba2dd0600bd412140
To correctly map to all GPUs after an import, use the new extended
registration call that can import a virtual address without having to
specify a target node.
Change-Id: Ifca8f6f6ee24fa99b2af357dcc3ea1de3ab234f7
Currently registering graphics memory without specifying a target
node will return a memory handle that's not a virtual address.
As a result, ROCr is forced to register with a target node for
IPC usage.
Mapping memory without specifying a target node afterwards will
result in mapping to the target node that was imported because the
previous import call flags this node targeting action to future mapping.
For ROCr IPC usage, ROCr wants to map to all GPU nodes if the target node
is not specified.
Allow the caller to register graphics handles that returns a virtual
address without having to specify the target node so that the caller
can make a subsequent map call to all GPUs.
Change-Id: I5a935092b885cc3568e4f3a5dd951c7ec6c84fca
A fixed sized std::array is used to store counter records in rocprofiler SDK. This limit was breached in SWDEV-484742. Upping the limit to 512 to be less likely to reach this limit again.
CSV output truncates doubles to ints when it shouldn't. Derived metrics
are (mostly) doubles and lose precision (or become worthless) if treated
as an int. Converted these to double to match the format we return from
rocprof-sdk.
Co-authored-by: Benjamin Welton <ben@amd.com>
In static build, the dev and binary components are grouped to generate static package
Removed the line that was ignoring the component grouping
Change-Id: Ie0ca9db109f2002891260985634f2e6b1ea7f236
Changes to the README.md:
-Fixed the dead links in the examples.
-Updated the example to point to the ones in roctracer_spec.md instead of tests.
Changes to the roctracer_spec.md:
-Changed #include from #include <*.h> to #include <roctracer/*.h> to
reflect the latest code structure.
Change-Id: Iab44fc327821c1a01f0b949d3c9a3c20ca587599
[ROCm/roctracer commit: 725d289a2b]
Changes to the README.md:
-Fixed the dead links in the examples.
-Updated the example to point to the ones in roctracer_spec.md instead of tests.
Changes to the roctracer_spec.md:
-Changed #include from #include <*.h> to #include <roctracer/*.h> to
reflect the latest code structure.
Change-Id: Iab44fc327821c1a01f0b949d3c9a3c20ca587599
When hsa_amd_vmem_set_access is called, do not remove permissions for
unspecified agents. Also updating documentation in header to clarify
this.
Change-Id: I3bb4cf08ba399f85cc67b17fd13a4a40d862415f
Currently, KFDPerformanceTest.P2PBandWidthTest cannot work if there are
more than 16 KFD nodes in the system. This limit was put in to match the
number of SDMA queues supported on a single node.
This patch updates the test to make it run on systems with more than
16 KFD nodes.
Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Change-Id: I561d0cdef664cae84fb9c13a801052e2001256e5
* Package release tarball on rocm tags and add a MAINTAINERS guide to outline release procedure
Signed-off-by: coleramos425 <colramos@amd.com>
* Apply linting feedback
Signed-off-by: coleramos425 <colramos@amd.com>
* Update links in MAINTAINERS for new branches
Signed-off-by: coleramos425 <colramos@amd.com>
* Update MAINTAINERS.md for changelog formatting
Signed-off-by: coleramos425 <colramos@amd.com>
* Update Omniperf ver checker to allow tags with rocm- prefix
Signed-off-by: coleramos425 <colramos@amd.com>
* Add step to packaging workflow to upload release tarball to release
Signed-off-by: coleramos425 <colramos@amd.com>
* Synax change for release name in packaging action
Signed-off-by: coleramos425 <colramos@amd.com>
* Update MAINTAINERS for instuctions on ROCm releases
Signed-off-by: coleramos425 <colramos@amd.com>
* Update softprops pluvin to v2 and remove release name
Removing the release name enables us to modify an existing release with the matching tag
Signed-off-by: coleramos425 <colramos@amd.com>
* Remove draft option on softprops plugin
Signed-off-by: coleramos425 <colramos@amd.com>
---------
Signed-off-by: coleramos425 <colramos@amd.com>
* Add the ability to determine GPU model from Chip ID for distinguishing MI300 systems by using a built-in dictionary.
Signed-off-by: xuchen-amd <xuchen@amd.com>
* Add support for MI300X_A1
Signed-off-by: xuchen-amd <xuchen@amd.com>
* Remove MI308X identification using num CUs, and format Python using black.
Signed-off-by: xuchen-amd <xuchen@amd.com>
* Add Read the Docs
Signed-off-by: xuchen-amd <xuchen@amd.com>
* Add sphinx requirement
Signed-off-by: xuchen-amd <xuchen@amd.com>
* Remove gpu_model identification using gpu_arch
Signed-off-by: xuchen-amd <xuchen@amd.com>
* Remove OMNIPERF_ARCH_OVERRIDE and its usage. Determining MI300 gpu model solely based on chip id.
Signed-off-by: xuchen-amd <xuchen@amd.com>
* Fix Python formatting using black.
Signed-off-by: xuchen-amd <xuchen@amd.com>
---------
Signed-off-by: xuchen-amd <xuchen@amd.com>
After meeting with the DevOps team, I've added the Unreleased keyword to new CHANGELOG section per their request
Signed-off-by: coleramos425 <colramos@amd.com>
If we don't add the suffix omniperf to the install path then the subsequent instruction of module load omniperf will not work
Signed-off-by: coleramos425 <colramos@amd.com>
* Remove `dev` and `main` branch from workflows.
Update links in documentation.
Signed-off-by: David Galiffi <David.Galiffi@amd.com>
* `amd-staging` -> `amd-mainline` in docs
Signed-off-by: Peter Jun Park <peter.park@amd.com>
---------
Signed-off-by: David Galiffi <David.Galiffi@amd.com>
Signed-off-by: Peter Jun Park <peter.park@amd.com>
Co-authored-by: Peter Jun Park <peter.park@amd.com>
* Check that the minimum required Python (3.8) version is used.
Prints a descriptive error message, rather than a cryptic import
failure, if minimum Python version is not met.
Internal ticket SWDEV-477233.
* Disable the RPM mangling of shebangs.
The are changing the `#!/usr/bin/python3` to `#!/usr/libexec/platform-python`.
With this set, omniperf is always using the platform installed version
of python, which is python 3.6 on RHEL 8. Using virtual environments,
like conda, did not work.
* Fix pylint issues
---------
Signed-off-by: David Galiffi <David.Galiffi@amd.com>
Socket server accept calls do not guarantee synchronous actions
post-accept. This can result in a race condition.
To resolve this, first limit the socket server's listen backlog to a
single connection. This will force competing clients to busy-retry
until timeout.
Second, make the DMABUF IPC file descriptor send-receive and import
calls into an atomic routine per connection.
By doing these fixes, not only to we resolve potential races but
we guarantee that any exporter process will create at most one
file descriptor that will only last for the duration of the import
transaction. This alleviates any concern on running into system
limits for the number of open file descriptors per process.
Change-Id: I6d8b14795a680d89a2707e082fa027d525792e05
Discarding blocks for reallocation on IPC export for better memory
performance trigger memory violations with DMA BUF exports so bypass
this for now as application performance drops haven't been observed
with the bypass.
The raw fragment should be passed to the DMA Buf export call as well
since offsets will be implicitly applied in the Thunk/KFD for
export/import calls.
Also, use the agent information directly from the pointer
information so that the export call doesn't have to scan memory to find
this. Pass the node ID in the handle so that the import call doesn't
have to make two thunk imports to fetch the node ID for GPU memory
imports.
Finally, allow the user to use DMA Buf IPC via
HSA_ENABLE_IPC_MODE_LEGACY=0 for developer testing as legacy mode will
be applied by default.
Change-Id: Ie8fe267f8768fa5df37126078406f7065f69ff4e
Changes:
- Added new GPU metrics:
1) Violation status' (ex. PVIOL/TVIOL) accumulators
2) XCP (Graphics Compute Partitions) statistics
3) pcie other end recovery counter
- Added rocm-smi --showmetrics
Units/values reflect as indicated by driver, may differ
from AMD SMI or other ROCm SMI interfaces which
use these fields.
- N/A fields means the device does not support providing this
data.
Change-Id: Ia2cd3bb65c4f474ebdb39db8062ea716f2b4d8ee
Signed-off-by: Charis Poag <Charis.Poag@amd.com>