نمودار کامیت

1233 کامیت‌ها

مولف SHA1 پیام تاریخ
David Belanger e738648c8f kfdtest: Update QueuePriority* tests for emulation
Reduce test case size if running on emulator.
Also, refactor code as both test cases had more than 80% same code.

Signed-off-by: David Belanger <david.belanger@amd.com>
Change-Id: I5899ee24244a6f0aa6b56fa8a4701b0b1e344b9f
2024-03-19 11:30:05 -04:00
David Belanger 66e3a09a42 kfdtest: Update PM4EventInterrupt for emulation
Reduce number of iteration for test case to run in reasonable amount of
time.

Signed-off-by: David Belanger <david.belanger@amd.com>
Change-Id: I19a7ec0d5f03c54d6691aae3cf7432754c7481cc
2024-03-19 11:29:38 -04:00
Xinmudotmoe 0c06bec272 Update doorbell->size to support large default PAGE_SIZE kernels
Change-Id: I6fbe10ae3309f2f935d6782366cedb56dc1438c3
Signed-off-by: Xinmudotmoe <xinmu@xinmu.moe>
Signed-off-by: Kent Russell <kent.russell@amd.com>
2024-03-13 09:18:42 -04:00
Stella Laurenzo 7c10e1e4f5 Link CMAKE_DL_LIBS.
Was failing to link on AlmaLinux8.

Change-Id: Id7df245f1063c2bebd0f07efc352f1b9017eda0e
Signed-off-by: Stella Laurenzo <stellaraccident@gmail.com>
Signed-off-by: Kent Russell <kent.russell@amd.com>
2024-03-13 09:18:03 -04: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
Harish Kasiviswanathan 341ecaf1d9 libhsakmt: Associate correct GPU with queue memory
Pass the correct gpu_id to KFD for system memory that is allocated for
the queue and eop buffer

Change-Id: I43bb6333560a7d9d38293c191303161ab1443b5d
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
2024-02-26 14:20:16 -05:00
Harish Kasiviswanathan 191caf46ac libhsakmt: Move global zfb_support to globals.c
zfb_support needs to accessed from multiple places, so move to globals.c
file

Change-Id: I40b487c26a13e7cc6fc01b671d6166e7114e02d2
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
2024-02-26 09:08:11 -05:00
Harish Kasiviswanathan 858dfd364f libhsakmt: Use correct gpu_id for GPU system memory
For GTT memory allocation if GPU is provided honour it.

Change-Id: Iea9a26bc44cd3daa2337845f53dc430787b0643b
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
2024-02-25 10:45:36 -05: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
James Zhu f75fddb9bd kfdtest: change Largest Buffer search algorithm
The old Largest Buffer search algorithm is using Binary Search
algorithm to find last successful memory allocation. But each
successful memory allocation takes times. Since the unsuccessful
memory allocation returns very quick. Changing the search algorithm
to find first successful memory allocation starting from MAX, each
testing step with granularity interval will speed up this test.

Change-Id: I07daea05423c33e72a483f0013e8ea1b5dabf989
Signed-off-by: James Zhu <James.Zhu@amd.com>
2024-01-19 10:42:40 -05:00
David Yat Sin 0accd17b6e HSA_USE_SVM to override SVMAPISupported node prop
When HSA_USE_SVM is 0, thunk uses non-SVM path, but upper layers still
use SVM path. That is not as expected.

Suggested-by: Lang Yu <Lang.Yu@amd.com>
Change-Id: I1ae0b4faa2f8af5ec69a81cfeb7661bd47d739d4
2024-01-16 22:44:38 -05:00
Ranjith Ramakrishnan a7d8b1c287 Use relative path rather than hard coded path in package config file
Change-Id: Ia35fadeead69f84f4f4d32ab0c04f2f391aba4f4
2024-01-07 20:51:59 -08:00
Jeremy Newton 42581d4172 Fix missing global symbol
If using hsakmt as a shared library

Change-Id: I66a1849a46bd7009813d49824d0d059e8a511038
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
2024-01-04 11:14:39 -05:00
Yifan Zhang 808a4428b6 kfdtest: add APUs judgement in LargestVramBufferTest criteria
This patch is to add APUs judgement in LargestVramBufferTest criteria.

Change-Id: Ic69093f8ebed8be0b1c58787e2a294d86fb49bb0
2023-12-28 17:17:31 +08:00
Yifan Zhang 92c0015787 kfdtest: finetune MMBench subtest criteria
Change the proportion to 6/10 on APUs.

Change-Id: I3576cb23d0f14ff6d576a5db4bdeef9446aa10d2
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
2023-12-28 17:12:44 +08:00
Yifan Zhang 72324444cc kfdtest: finetune LargestVramBuffer subtest criteria
Change the proportion to 3/5 on APUs.

Change-Id: I0dc37fb1c309605811551b88259473603c81f9ae
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
2023-12-27 16:23:17 +08:00
Xiaogang Chen 1a7162731e kfdtest: use svm range granularity in KFDSVMEvictTest.QueueTest/1
When xnack is on shadder code in this test triggers gpu page fault that migrate
data from system ram to vram. Use svm range granularity to move all data from
system buffer to vram to reduce system ram pressure to avoid system ram oom for
systems that has less system ram.

Signed-off-by: Xiaogang Chen <Xiaogang.Chen@amd.com>
Change-Id: I219472210756be319491f7827f7209fe32726f81
2023-12-15 13:27:22 -06:00
gaba 4bf73f521b libhsakmt: Fix CPU cache issue
For "Intel Meteor lake Mobile", the cache info is not in sysfs,
    That means /sys/devices/system/node/node%d/%s/cache is not exist,
    but system working fine.

Change-Id: Ie7c04426791a84c2288ff21df093226828a5f629
Signed-off-by: Gang Ba <Gang.Ba@amd.com>
2023-12-08 15:29:19 -05:00
David Yat Sin 01ff2f7934 libhsakmt: Handle HW_EXCEPTION events
Add new structures for HW Exception events and copy data from KFD to
expose to upper layers.

Change-Id: Icd5eb98997c47620e3b86277ab6d3abb7ed7d56f
2023-11-17 04:43:51 +00:00
Yifan Zhang 46fe316348 kfdtest: Change SetGetAttributesTest range granularity
granularity check is added in kfd w/ below patch:

commit 270c7a8375a91fec2fb4e2c253e3955d9b7540b4
Author: Jesse Zhang <jesse.zhang@amd.com>
Date:   Fri Oct 20 09:43:51 2023 +0800

    drm/amdkfd: Fix shift out-of-bounds issue

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
index a690dced6860..f2b33fb2afcf 100644

Change-Id: I8cb037e3bf5db0a85661494b77e59984eca4d98d

--- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
@@ -781,7 +781,7 @@ svm_range_apply_attrs(struct kfd_process *p, struct svm_range *prange,
                        prange->flags &= ~attrs[i].value;
                        break;
                case KFD_IOCTL_SVM_ATTR_GRANULARITY:
-                       prange->granularity = attrs[i].value;
+                       prange->granularity = min_t(uint32_t, attrs[i].value, 0x3F);
                        break;
                default:
                        WARN_ONCE(1, "svm_range_check_attrs wasn't called?");

Test cases have to been modified accordingly otherwise KFDSVMRangeTest.SetGetAttributesTest
fails.

Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Change-Id: Ifff47556bc398da6b18ad26ac545d139b63b0c92
2023-10-23 23:21:40 +08:00
Rajneesh Bhardwaj 5047eb161f libhsakmt: Use MADV_HUGEPAGE for large allocations
For large memory allocations (>2MB) the thunk should use the
MADV_HUGEPAGE flag for madvise call to optimize allocation performance
on certain operating systems that rely on madvise hint when Traspatent
Huge Pages is not set to always.

Suggested-by: Joseph Greathouse <joseph.greathouse@amd.com>
Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@amd.com>
Change-Id: Ic0c753f89a177b0f715942d6e2a7108b08a85f20
2023-10-12 17:01:34 -04:00
Tomasz Kłoczko a226542fc3 install .pc files in libdir
Provided pkgconfig file contains interface description which is arch
dependent. In such cases .pc files should be installed in libdir.

Signed-off-by: Tomasz Kłoczko <kloczek@github.com>
Change-Id: Ibbc85ad4aee1ef014c409dfa63313873b590464b
2023-10-11 15:50:38 -04:00
Torsten Keßler b44cca813d Mark new symbols in ROCm 5.7.0 as global
Change-Id: Ia0391cac7f432f019dea94f98a145dbf8120817d
2023-10-11 15:50:27 -04:00
Philip Yang 85a47fa66b libhsakmt: Set CWSR range granularity
Set CWSR svm range granularity to 0xff, then KFD will migrate the entire
CWSR range from VRAM back to system memory when recovering the CPU page
fault if rocgdb access CWSR area, this avoid the partial CWSR range
migration and stall CWSR GPU mapping issue.

This is a temporary workaround, it should be reverted once the KFD is
fixed.

Change-Id: I80a7248244574edba25b13858b7ebcf1c77b8930
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
2023-10-06 10:46:40 -04:00
David Yat Sin 73efd3a14e libhsakmt: Fix incorrect flags for ext coherence
Change-Id: I89c838b9fbdb85589691f29806ae15884b25592f
2023-10-04 15:00:58 +00:00
James Zhu 693e686c4d kfdtest: remove IOMMUv2 performance monitor support
IOMMUv2 is removed from AMDGPU/KFD.

Change-Id: Ia00f9aa879a5f32a42bec914936d105d6845bc60
Signed-off-by: James Zhu <James.Zhu@amd.com>
2023-09-30 09:16:49 -04:00
James Zhu d195deeec4 libhsakmt: remove share resource in performance counter
This share resource is for IOMMUv2 which is removed from
AMDGPU/KFD.

Change-Id: Ia6e9311f1adc56fac2c9e8fa05b24c5ec8c272a5
Signed-off-by: James Zhu <James.Zhu@amd.com>
2023-09-30 08:54:10 -04:00
James Zhu 277d5e27ff libhsakmt: remove iommu_block which supports IOMMUv2 performance
IOMMUv2 is removed from AMDGPU/KFD.

Change-Id: I9fcf20ae9288cb40bb4b696284fc70534fb6484b
Signed-off-by: James Zhu <James.Zhu@amd.com>
2023-09-30 08:54:10 -04:00
James Zhu 274b5b51ca libhsakmt: remove IOMMUv2 performance monitor support
IOMMUv2 is removed from AMDGPU/KFD.

Change-Id: Ib87f501c07d9de90e6b83b98f98daacd5913e98a
Signed-off-by: James Zhu <James.Zhu@amd.com>
2023-09-30 08:54:10 -04:00
David Yat Sin 8e06dce573 Add extended coherence memory flag
Add support for new flag for memory allocation that will provide
system-scope coherent atomics

Change-Id: I426d66223e8d2b570f69b4c0e61145ce9b2290d2
2023-09-22 11:03:00 -04:00
Jonathan Kim 986e82d677 kfdtest: temporarily exclude address watch testing
The debug address watch test will hang when running with the
entire KFD test.

Disable it for now.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Change-Id: I1d0479fa2717d2f398cc32e0605ca6dcc17ebcd5
2023-09-14 09:07:20 -04:00
Jonathan Kim fcec22716a Use camel case for KFDDBGTest shaders
Debug test shaders should use camel case and suffix *Isa to match other
test shader naming convention.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Change-Id: I64e14183ba1c7c9664b13a742a0e5683866e8223
2023-09-12 15:38:12 -04:00
Ori Messinger 5f117f7608 kfdtest: Fix String NULL Check
MCPU const char * always returns true, so check the value instead.

Before: if (!MCPU) {
After: if (!*MCPU) {

Signed-off-by: Ori Messinger <Ori.Messinger@amd.com>
Change-Id: I414e091ca764095937311648c534351d6abf30e6
2023-09-08 16:36:01 -04:00
Jonathan Kim 6ec529fe68 kfdtest: temporarily exclude debug suspend queues test
For some reason, non-Ubuntu builds have some sort of memory
corruption when running this test, which affect subsequent running
tests.  Disable it for now.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Change-Id: I5f54ee4c63286a33c6948bc818aa1501c4a6751e
2023-09-08 12:12:13 -04:00
Jonathan Kim f9e20c8a93 kfdtest: replace 0 initialized dbg structs with memset
Use memset to avoid general 0 set padding issues and ASAN compile issues
for debug tests.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Change-Id: I0a5aca5b7b631083599573b47f1ae87d5d0d5d71
2023-08-29 11:25:56 -04:00
Lang Yu 65ca3317f2 kfdtest: add blacklist for gfx1150 and gfx1151
Change-Id: If78840e57c2523696c620d28f4c4ffb004128c0c
Signed-off-by: Lang Yu <Lang.Yu@amd.com>
2023-08-24 17:27:04 +08:00
Ranjith Ramakrishnan 65911e8368 Use memset for initializing variable sized array
In ASAN builds, the compiler used is clang. The initialization of
variable sized array using assignment operator is causing compilation
failure in ASAN builds. Used memset to fix the same.

Change-Id: I02aef3b99a6cad0cce3a378210a48732e07a88fb
2023-08-21 12:01:58 -07:00
Jonathan Kim a3f8085025 kfdtest: add trap on wave start and end test
Add test to catch trap on wave start or end override event.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Change-Id: Icb57af64475fbd2d8a6c0af9a2ee5db5d1a169c6
2023-08-18 12:15:08 -04:00
Jonathan Kim 8311ca5bfa kfdtest: add address watch test
Address watch test will test read and write operations.
Test will also check if operation is precise if precise
address watch is available.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Change-Id: I7ef835790e26bf6345682755d7dd26a35853bcd5
2023-08-18 12:15:07 -04:00
Jonathan Kim 431dc8d403 kfdtest: Add ops for address watch test
Add wave launch override, set/clear address watch and precise memops
test.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Change-Id: Ib405d5570cd304e02c2e76eca3593cbd9a5937d9
2023-08-18 12:11:48 -04:00
Jonathan Kim d4029a9492 kfdtest: add memory violation test
Add memory violation detection test.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Change-Id: I1b56f684682836fc84fbec713bd81c53bdd6d413
2023-08-18 12:11:48 -04:00
Jonathan Kim 6c5121faff kfdtest: allow toggle of dispatch privilege
For GFX11 debugger testing, waves require to start in non-priv mode for
some test cases, so allow tester to set this.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Change-Id: Iee93fda926bfd336d51c79c086f1f75bc35b70e5
2023-08-18 12:09:07 -04:00
Ranjith Ramakrishnan 96c8bb11b1 Disable file reorg backward compatibility support by default
Change-Id: I157e05e52a1a61b86fa2fc6f29d31361a688fa10
2023-08-09 12:31:27 -04:00
Jonathan Kim d20f0bbb90 kfdtest: add suspend resume test
Add queue suspend and resume test.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Change-Id: I2ade721026cbb458a3597b7858a164e70fe05f4f
2023-08-09 09:26:46 -04:00
Jonathan Kim b0e84183c1 kfdtest: add snapshot operations
Add queue and devices snapshot operations.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Change-Id: I836884c9f3b65dd9e5e444d554d3eb87938e1634
2023-08-09 09:26:29 -04:00
Jonathan Kim 5a675921ea kfdtest: add suspend and resume queues operation
Add base debug operations to suspend and resume queues.
Routine will return the number of queues successfully
suspended or resumed.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Change-Id: I8f18317f70464b04231c5cf822e11d545ebfa02a
2023-08-09 09:26:09 -04:00
Jonathan Kim b77189cf83 kfdtest: add hit trap event test
Check that a jump to trap event can be picked up by the debugger.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Change-Id: Iad5f87092f2b82d5018013bba548979122a9bd02
2023-08-08 16:01:23 -04:00
Jonathan Kim 97fc25bb8d kfdtest: add set exceptions enable base debug operation
Add set exceptions enabled debug option

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Change-Id: I6ee1769bbbb90a74074d8100974c4bfeabaf7f2c
2023-08-08 16:01:03 -04:00
Jonathan Kim 097ee967d1 kfdtest: add runtime enable and attach test
Add debug attach and runtime enable test for attaching to a spawned and
running process.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Change-Id: I72302ff73494d9dae0c79a299508085d7ca0552b
2023-08-08 16:00:44 -04:00
Jonathan Kim bfb0d15ee8 kfdtest: add query operations
Add polling query debug event operation.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Change-Id: Ic82ce4a393bfb28c9f32e7920f80c12da7f627d5
2023-08-08 16:00:25 -04:00