Граф коммитов

1113 Коммитов

Автор SHA1 Сообщение Дата
Kent Russell a4edd5bcce README: Update README to point to current documentation
Signed-off-by: Kent Russell <kent.russell@amd.com>
Change-Id: I3fed80e94edf5ff08a70b2e43450fe8168c5d355


[ROCm/ROCR-Runtime commit: aab0e36538]
2023-04-05 10:35:49 -04:00
Graham Sider 3e75f92cf2 Revert "kfdtest: add MES judging API in test utility."
See description of previous revert.

This reverts commit 8554f0df14.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I969dc6469e62b50cd7ba0595918538602afa7516


[ROCm/ROCR-Runtime commit: 287cb29340]
2023-03-27 17:08:03 -04:00
Graham Sider c298048035 Revert "kfdtest: Using non-paged memory allocation only on devices that have MES scheduler"
This patch and the previous made it such that the queue ring buffer was
allocated as non-paged for GFX11+. The queue ring buffer should not be
mapped as non-paged; the non-paged requirement on GFX11 is only needed
for the queue wptr.

This patch was causing issues on various tests, such as intermittent
CP_INTSRC_BAD_OPCODE interrupts.

This reverts commit 92a336d485.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I55b64aed73dc3b792f0756ae00daf6e10d93ce10


[ROCm/ROCR-Runtime commit: 0750856d4a]
2023-03-27 17:07:59 -04:00
Graham Sider 332effdb67 kfdtest: Add KFDQMTest.BasicCuMaskingEven to GFX11 blacklist
Test is inconsistent across ASICs. Add to blacklist to unblock QA.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I31e5aa2450165227107536bef8402db2c0dc6d7f


[ROCm/ROCR-Runtime commit: 5d80a4d214]
2023-03-23 11:14:58 -04:00
Alex Sierra e4c4b6369d libhsakmt: query svm info from userptrs at fault events
Get more debug information about user pointers that were registered
through SVM API, and triggered by memory exception events.
A new kfdtest with this use case was also included inside
KFDExceptionTest.

Signed-off-by: Alex Sierra <alex.sierra@amd.com>
Change-Id: I0ef4929afe0625b9b5cbbbebef11ede66dda60ab


[ROCm/ROCR-Runtime commit: 2a1d6ee8b5]
2023-03-22 13:34:02 -05:00
Alex Sierra 9d8a548b17 src: use SVM mechanism to register userptr memory
Register and map userptrs through Shared Virtual Memory(SVM) API at
the Kernel level when available. Using this approach, performance
will be improve as register/unregister memory will not trigger any
system call to KFD driver.

Signed-off-by: Alex Sierra <alex.sierra@amd.com>
Change-Id: I3726b4b5e1c6a52a83786fbe0af6322eb29ae7c9


[ROCm/ROCR-Runtime commit: 63c8cf115a]
2023-03-22 13:33:35 -05:00
AravindanC 768d8982e1 ASAN Packaging for libhsakmt
Change-Id: I0a6232cdb61742aa81394bb49d2b5e890b6ada6f


[ROCm/ROCR-Runtime commit: 0f977fd1d8]
2023-03-14 20:04:51 -07:00
Ranjith Ramakrishnan 92cc423428 Compile time flag to switch between #warning and #error message
Using backward compatibility paths will provide an #error message. Compile time option added to enable/disable the #error message.
Disabling the same will provide a #warning message

Change-Id: Ibb84241ba35aefb7a8450d68231e52242a634ed3


[ROCm/ROCR-Runtime commit: c911848242]
2023-03-10 13:09:13 -08:00
Daniel Phillips 7691c4600f kfdtests: Relax MemoryAllocAll failure criteria
The MemoryAllocAll test in kfdtests exercises the new KFD memory
availability API by trying to allocate a single buffer object that
exactly fills all of vram. Desired object size is determined using the
memory availility KFD ioctl via libhsakmt, then an object is allocated
slightly larger than that size. If the allocation attempt fails then
the test tries to allocate a slightly smaller object, and continues
trying with smaller sizes until the allocation succeeds. The test
succeeds if the successfully allocated object is within some specified
tolerance of the available memory reported.

There are a number of known issues that can cause the successfully
allocated object to be significantly smaller than reported availability.
Until these issues are addressed, we should not fail the test, but just
log the actual divergence between the size of the object we thought we
could allocate, and what was actually possible.

Signed-off-by: Daniel Phillips <daniel.phillips@amd.com>
Change-Id: I165a30865ffbb2353286dcc896ad8e24af124615


[ROCm/ROCR-Runtime commit: d3bb1ca4af]
2023-03-03 15:24:39 -08:00
Eric Huang 9e41c799a0 kfdtest: add the check for svm usage limit
Since KFD counts svm allocation as system memory usage,
KFDSVMEvictTest will fail on the case of small system
memory, adding check is to skip test.

Signed-off-by: Eric Huang <jinhuieric.Huang@amd.com>
Change-Id: I040f16f2dd0d4092d069a632cfba9c28293f781b


[ROCm/ROCR-Runtime commit: 3f55ba9fb8]
2023-03-03 11:03:17 -05:00
Yifan Zhang 7daedd5eef gfx11 is able to perform atomic ops even PCI reports no atomic support.
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Change-Id: Ie0d8af5a64ed717b140ac14db654c65ec7aa5ebb


[ROCm/ROCR-Runtime commit: 9f0f7741de]
2023-03-02 09:23:37 -05:00
Felix Kuehling ecf502f50d kfdtest: Add test for hsaKmtExportDMABufHandle
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Change-Id: Ia87377c1d4201fecfa00c2e0ca53b507608df2b3


[ROCm/ROCR-Runtime commit: e5ab87ede7]
2023-02-27 14:44:11 -05:00
Felix Kuehling caf8b70da7 libhsakmt: Implement dmabuf export for RDMA
Implement hsaKmtExportDMABufHandle, which can be used for a new
upstreamable RDMA solution. It exports a DMABuf handle for an arbitrary
virtual address along with the offset of the address within the
allocation. It also checks that the size of the intended export does
not exceed the allocation.

This uses the new AMDKFD_IOC_EXPORT_DMABUF, which requires KFD ioctl
API version 1.12.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Change-Id: Ie5fdb1f73ab3c7fa36c315ce326b1fb89eacc8b6


[ROCm/ROCR-Runtime commit: 332f59eb2a]
2023-02-27 14:44:11 -05:00
Yifan Zhang 92a336d485 kfdtest: Using non-paged memory allocation only on devices that have MES scheduler
Change-Id: I9181b353aac791f546aa7679ffd7cb8d9f8ef765


[ROCm/ROCR-Runtime commit: e40ae8481e]
2023-02-27 10:32:15 +08:00
Yifan Zhang 8554f0df14 kfdtest: add MES judging API in test utility.
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Change-Id: I978fc85b7c81ea65b97953a50d2d0312bcba95bf


[ROCm/ROCR-Runtime commit: 564913526a]
2023-02-26 21:22:39 -05:00
kent.russell@amd.com b6467c7bc8 Add check for available_memory API
If the KFD IOCTL version doesn't support available_memory, don't run the
test. Just skip the test

Change-Id: Iebf526d4563ab9f3c054bbfb38c214a1b893fcb5


[ROCm/ROCR-Runtime commit: 64aa9009e1]
2023-02-23 15:19:28 -05:00
Graham Sider 179ddc4870 kfdtest: Update GFX11 blacklists
Remove BLACKLIST_GFX10_NV2X from GFX11 blacklists, update
BLACKLIST_GFX11 as needed.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I84bd91ba20a5d3df27478fb4c97afa12f8a3e76a


[ROCm/ROCR-Runtime commit: 60831e86b2]
2023-02-23 09:11:27 -05:00
David Yat Sin 3d2f3991f1 Fix for unitialized variables
Change-Id: Ie8a004db699248d0cde4213077520ea503754399


[ROCm/ROCR-Runtime commit: 53d53655d7]
2023-02-14 14:19:31 +00:00
Ranjith Ramakrishnan df4cae2121 File reorg backward compatibility message changed to #error
Change-Id: I70b6f06b5e82242b3f50e7d1f0dac8a1eb8add11


[ROCm/ROCR-Runtime commit: 053b89414a]
2023-02-10 13:09:10 -05:00
David Yat Sin 59195c9478 Fix unitialized variable warning in valgrind
Change-Id: I91e70d67671a8f7289b734407011380b6b97238a


[ROCm/ROCR-Runtime commit: fb8f42233d]
2023-02-09 17:35:53 -05:00
Xiaogang Chen 2fb44725df libhsakmt: Correct reporting of Shader Engines number.
The Shader Engines number should be shadder array_count divided by simd_arrays_per_engine
not array_count.

Signed-off-by: Xiaogang Chen<Xiaogang.Chen@amd.com>
Change-Id: I808d1fedd6b9843500719e902ecf759f5668a7d1


[ROCm/ROCR-Runtime commit: efcc9b275b]
2023-02-09 14:34:17 -05:00
Graham Sider a56d22e215 kfdtest: Remove redundant SGPR/VGPR size checks in KFDTopologyTest
KFDTopologyTest.BasicTest duplicates Thunk logic to calculate VGPR size,
meaning it will always be the same, and SGPR size is a constant. Since
no benefit, remove comparisons.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I99e7ff6fb69ed07bc0716fdf43946b19c67b9268


[ROCm/ROCR-Runtime commit: 3fb1496fb3]
2023-01-26 15:08:12 -05:00
David Belanger 868a9fe9a5 Revert "libhsakmt: Disabled allocation of CWSR with SVM for GFX11."
This reverts commit 1ba59d64e1.

Change-Id: I05bf82266f563c63c0b794a24b0926e7652ce42d
Signed-off-by: David Belanger <david.belanger@amd.com>


[ROCm/ROCR-Runtime commit: 0eb0bae38b]
2023-01-25 10:48:46 -05:00
David Belanger dbf94b7dd3 libhsakmt: Fixed VGPR memory size for GFX11.0 and GFX11.1.
Fixed VGPR memory size, size was too small for some GPU, causing a memory overflow.
Refactored macro code into a function.
Thanks to Jay Cornwall for locating the problem and proposing the fix.

Change-Id: Iffedea1c4f341967f02c56d810ff048225b02c16
Signed-off-by: David Belanger <david.belanger@amd.com>


[ROCm/ROCR-Runtime commit: a847a7b80e]
2023-01-25 10:45:44 -05:00
Ranjith Ramakrishnan b99bf7f3b6 Added OS details to kfdtest rpm packge name
Change-Id: I600e094c364e1c7219ae3db12f0c4e1f7598c132


[ROCm/ROCR-Runtime commit: bc40579f96]
2023-01-23 12:13:32 -08:00
David Belanger 1ba59d64e1 libhsakmt: Disabled allocation of CWSR with SVM for GFX11.
This is a temporary work around for GPU hang issues observed on GFX11.

Change-Id: I98fbedbbd1c51fe402c2116b35ca548931a390c9
Signed-off-by: David Belanger <david.belanger@amd.com>


[ROCm/ROCR-Runtime commit: b25867c4b8]
2023-01-11 17:28:31 -05:00
Eric Huang 54e3e5ab8f Revert "libhsakmt: Remove unnecessary CPU unmap"
This reverts commit 1bb6d872ac.

It causes a regression in pytorch benchmark.

Change-Id: I96173dbd061cf38d6f451c02cb181ae51b7f625e
Signed-off-by: Eric Huang <jinhuieric.huang@amd.com>


[ROCm/ROCR-Runtime commit: 505287412f]
2023-01-06 17:16:40 -05:00
Alex Sierra d1bbeac5fe Revert "src: use SVM mechanism to register userptr memory"
This reverts commit ea19fbb646.
There are some openMP issues that were introduced after SVM userptr
feature was added.

Signed-off-by: Alex Sierra <Alex.Sierra@amd.com>
Change-Id: I7ef87c5232a3bcbe594c743fa4b4958601845ba5


[ROCm/ROCR-Runtime commit: f2bda56d04]
2022-12-08 17:33:51 -06:00
Alex Sierra 933292eedb Revert "libhsakmt: query svm info from userptrs at fault events"
This reverts commit a89bcd0518.
There are some openMP issues that were introduced after SVM userptr
feature was added.

Signed-off-by: Alex Sierra <Alex.Sierra@amd.com>
Change-Id: I6566c9f0d39d05ecb92f38159880763f432939a5


[ROCm/ROCR-Runtime commit: d9f86ae02b]
2022-12-08 17:33:50 -06:00
Alex Sierra f0e2e1936c Revert "libhsakmt: add env var to en/dis registration through SVM"
This reverts commit 6789a0f3bd.
There are some openMP issues that were introduced after SVM userptr
feature was added.

Signed-off-by: Alex Sierra <Alex.Sierra@amd.com>
Change-Id: Ib01046571d2c84fa0fd228ecba0dee0eae3f994d


[ROCm/ROCR-Runtime commit: 21e95a4f2a]
2022-12-08 17:33:48 -06:00
James Zhu 9d84ed8de6 kfdtest: track Test Status in syslog
Track Test Status in syslog, it will help understand
sys log assoicated with test cases.

Change-Id: I7c0749102db9bc73d6ae3a237ec347a8fefb12e9
Signed-off-by: James Zhu <James.Zhu@amd.com>


[ROCm/ROCR-Runtime commit: 7db29c4797]
2022-11-29 17:46:40 -05:00
Felix Kuehling 1bb6d872ac libhsakmt: Remove unnecessary CPU unmap
This is handled by __fmm_release calling aperture_release_area.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Change-Id: Ib8ed300e1734f03aeb9dfc8074897ece310b8af9


[ROCm/ROCR-Runtime commit: 7787a039bd]
2022-11-28 17:18:13 -05:00
Felix Kuehling b3db03a7d5 libhsakmt: Refactor and clean up CPU mappings
Use a common helper for CPU mappings to reduce duplicate code.
Consistently use MAP_SHARED for all render_fd mappings.
Remove double-mapping for AQL queue buffers on the CPU. This workaround
is only needed on the GPU.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Change-Id: Iff86c8cc9f1e5c982614b3f11129bc2cf8cbba02


[ROCm/ROCR-Runtime commit: 73b0fb3d7c]
2022-11-28 17:18:05 -05:00
Felix Kuehling eac689291a libhsakmt: Fix and simplify debug_get_reg_status
The NULL pointer check was the only way for that function to fail. And it
was done after the pointer was accessed. Simplify this by just returning
the result as a return value instead of using a pointer as output
parameter. This way the function can never fail and the caller doesn't
need to do any error handling.

Declare the function in libhsakmt.h instead of duplicating the
declaration in fmm.c.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Change-Id: I91b90d66166fd3b5cdc47c73a9bbc369c45b51fe


[ROCm/ROCR-Runtime commit: 2d53430ce3]
2022-11-28 17:17:43 -05:00
Alex Sierra 6789a0f3bd libhsakmt: add env var to en/dis registration through SVM
Setting this variable to '0' will force to disable memory
registration/allocation through SVM API mechanism.
Not setting this or setting to '1', SVM API will be used only if all
GPUs support it.

Signed-off-by: Alex Sierra <Alex.Sierra@amd.com>
Change-Id: Icdf7656de09aa9988b567ec6c024953398e9bb48


[ROCm/ROCR-Runtime commit: 8a746bdaed]
2022-11-28 13:42:43 -05:00
Daniel Phillips e1b6def53c kfdtest: Also detect under-reporting of available memory
Detect under-reporting of available memory by initially attempting to
allocate substantially more than reported available memory, and ensure
that the allocation fails. Continue shrinking the attempted allocation
until it succeeds, then fail the test if the successful allocation is
either too much more than or too much less than reported available.

Signed-off-by: Daniel Phillips <daniel.phillips@amd.com>
Change-Id: Ib418f0aa26e8db80590a6c5f2578da56a4b60f2b


[ROCm/ROCR-Runtime commit: e71eb13784]
2022-11-28 11:43:48 -05:00
Felix Kuehling 021ceccd80 libhsakmt: Fix use of uninitialized variable
When is hsaKmtCreateQueue called first time for node
doorbells[NodeId].size is initialized to zero in init_process_doorbells
but used to calculate the doorbell offset. It works just by accident
because doorbells[NodeId].size is uint32_t so -1 will be 0xFFFFFFFF which
is zero extended into 0x00000000FFFFFFFF and it will work as long as mmap
offset bits are not within lower 32 bits.

Bug: https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface/issues/78
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Change-Id: Ia791adfc51363d4704cb50fa4f01137b7dd48a75


[ROCm/ROCR-Runtime commit: 8e69b9c70e]
2022-11-25 14:07:45 -05:00
Eric Huang 6d9fc60ea1 kfdtest: remove scc test in MapUnmapToNodes for gfx90a A+A
Modifier scc is disabled from gfx90a's asm, so remove the
shader for gfx90a A+A and keep it for newer asics with scc
support.

Signed-off-by: Eric Huang <jinhuieric.huang@amd.com>
Change-Id: Iec3c7ccd5156a855adb2b02feb3db0761876aa2f


[ROCm/ROCR-Runtime commit: 8e8aa024fd]
2022-11-25 13:55:28 -05:00
David Yat Sin 0e7a4d8ace libhsakmt: Initialize fd to -1
Fix compile error due to warning in some environments

Change-Id: Ie5fcfabb872c27c0de349eb215345b997fae7201


[ROCm/ROCR-Runtime commit: f46ddb7ead]
2022-11-25 15:01:53 +00:00
Ranjith Ramakrishnan ddaee6ccc6 Change pragma message to warning
File reorganization feature was implemented with backward compatibility
The backward compatibility support will be deprecated in future release.
Changed the #pragma message to #warning for a smooth transition

Change-Id: I21025f4cefb40721f095130263b4247877979d36


[ROCm/ROCR-Runtime commit: 01fd84db5e]
2022-11-23 13:06:34 -05:00
David Francis 0ebee88add libhsakmt: Don't close kfd_fd
When hsa is closed, it would close open fds for /dev/kfd but
not for /dev/dri/renderD*. This caused issues with CRIU
checkpoint, which expects that /dev/kfd will be open if
/dev/dri/renderD* is.

As a workaround for the CRIU behaviour, leave /dev/kfd open
when closing hsa.

Signed-off-by: David Francis <David.Francis@amd.com>
Change-Id: Ie1b2d5b1d8986750b0e560ae2934b7c73cff942e


[ROCm/ROCR-Runtime commit: 88934cec2c]
2022-11-17 10:04:24 -05:00
Nirmal Unnikrishnan 4c8eae2b76 : updating the kfdtest packaging version
Change-Id: I4132d1106bd997b64b1496ea268961172a545102


[ROCm/ROCR-Runtime commit: e0476629fe]
2022-11-14 11:40:45 -06:00
Graham Sider cb42ad18bf kfdtest: Rename IterateIsa to PersistentIterateIsa
To avoid confusion since this shader has changed to be persistent
(original IterateIsa may be re-used for debugger tests).

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I4643692765fc7665933257e89d5b922e779ad2e5


[ROCm/ROCR-Runtime commit: 6467664ec7]
2022-11-09 09:37:06 -05:00
Jeremy Newton 94abba3ff1 Fix libc/gcc hardpath issues
Don't use the full path to link against libc, but rather let
cmake find it.

Regarding gcc_s, it doesn't seem like this is still needed, so I've
removed it instead.

Change-Id: I1dc594f10c647b2abfdab7c5e0de90c331c6eeaf
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>


[ROCm/ROCR-Runtime commit: a63d53ad8b]
2022-11-08 10:51:29 -05:00
Jeremy Newton fc5d8d1076 Rework libdrm requires/recommends
To be more alligned with ROCr, libdrm dev package appears to be
required, but we don't care if it's ours or the distro's. So require
either but recommend our package to get the latest version.

Change-Id: I744ce4861644a83ba94c39e0bf4230eab58cc68a
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>


[ROCm/ROCR-Runtime commit: 4fa9404fe2]
2022-11-04 17:33:08 -04:00
Ramesh Errabolu b931a65960 Add support for CRIU testing
Change-Id: I8945a078ee8ae491245da6091e64b118584a48ab


[ROCm/ROCR-Runtime commit: 75428364a7]
2022-11-02 15:40:03 -04:00
Alex Sierra a89bcd0518 libhsakmt: query svm info from userptrs at fault events
Get more debug information about user pointers that were registered
through SVM API, and triggered by memory exception events.
A new kfdtest with this use case was also included inside
KFDExceptionTest.

Signed-off-by: Alex Sierra <alex.sierra@amd.com>
Change-Id: I8e9df3c1c6c3f42d7b9235d12406d80d31746443


[ROCm/ROCR-Runtime commit: 45fad29752]
2022-10-21 15:33:14 -04:00
Alex Sierra ea19fbb646 src: use SVM mechanism to register userptr memory
Register and map userptrs through Shared Virtual Memory(SVM) API at
the Kernel level when available. Using this approach, performance
will be improve as register/unregister memory will not trigger any
system call to KFD driver.

Signed-off-by: Alex Sierra <alex.sierra@amd.com>
Change-Id: I20723cbeb340bf48b95e1115f0102c031397bc14


[ROCm/ROCR-Runtime commit: 178a619b80]
2022-10-21 15:32:02 -04:00
Yifan Zhang 2e7431c130 kfdtest: add blacklist for gfx1103
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Change-Id: I9ffe4dd8add505d0a6cfd3ed974fab6cef05f039


[ROCm/ROCR-Runtime commit: 4b9461dd42]
2022-10-12 10:08:13 +08:00
Graham Sider d1bcd2d405 kfdtest: Make KFDCWSRTest.BasicTest buffer sizes dynamic
KFDCWSRTest.BasicTest is parameterized to allow an easy method of
tweaking the number of work-items (and save/restores). The input/output
buffers were previously hardcoded to a single page, which would cause a
segmentation fault if the number of work-items specified is greater than
1024 for wave32.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: Ieefc819a5d81c77cee88081a287fd383e6378e74


[ROCm/ROCR-Runtime commit: 73adbdee2c]
2022-09-30 18:18:17 -04:00