Commit grafiek

1239 Commits

Auteur SHA1 Bericht Datum
Mihai Preda 69c283ef3d Free the malloc'ed event on page alloc failure
Change-Id: I009a9a6e2f67545c51470e86eac1adb78d6181b4
Signed-off-by: Mihai Preda <preda@users.noreply.github.com>
Signed-off-by: Kent Russell <kent.russell@amd.com>


[ROCm/ROCR-Runtime commit: fa0c182325]
2024-03-26 09:57:26 -04:00
James Zhu 8fd711ac59 kfdtest: add kfdtest test cases for pc sampling
Add kfdtest test cases for pc sampling.

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


[ROCm/ROCR-Runtime commit: daf99471a4]
2024-03-26 02:06:19 -04:00
David Yat Sin 19c7b5b4f6 libhsakmt: add PC sampling support
Add pc sampling support.

Change-Id: I08199024ba5a8eb2845c048d499fc8fcd260d2e8
Signed-off-by: David Yat Sin <David.YatSin@amd.com>
Signed-off-by: James Zhu <James.Zhu@amd.com>


[ROCm/ROCR-Runtime commit: f94e2530fb]
2024-03-25 15:53:38 +00:00
David Yat Sin a88194702c libhsakmt: Update Linux header for PC Sampling
Add pc sampling support

Change-Id: I2c472ce00ff8648904cf7e585687e81d3f493049
Signed-off-by: David Yat Sin <David.YatSin@amd.com>
Signed-off-by: James Zhu <James.Zhu@amd.com>


[ROCm/ROCR-Runtime commit: 4f554988b6]
2024-03-22 15:06:10 +00:00
Philip Yang 96206ef888 libhsakmt: Add memory alloc flag GTTAccess
To allocate GTT memory for MES AQL queue structure, KFD will create GART
mapping for the memory to be accessed by MES.

Change-Id: Iae7b33d1e70861109f1551d3a71dc60dfde9de61
Signed-off-by: Philip Yang <Philip.Yang@amd.com>


[ROCm/ROCR-Runtime commit: 9fbe853fea]
2024-03-20 10:41:51 -04:00
Ori Messinger 6d04547b22 kfdtest: Exclude KFDQMTest.QueueLatency test
The purpose of this patch is to add KFDQMTest.QueueLatency to
kfdtest.exclude file temporarily for the following ASIC filters:
  -GFX940
  -GFX941
  -GFX942

This test is failing due to an issue with the way it was coded,
not due to an issue with the ASICs it is now blacklisted on.

Signed-off-by: Ori Messinger <Ori.Messinger@amd.com>
Change-Id: Ic993629a2400449f598e73fe616a4572a38e2310


[ROCm/ROCR-Runtime commit: 656234abb8]
2024-03-19 14:37:49 -04:00
David Belanger ddcccab5ba 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


[ROCm/ROCR-Runtime commit: e738648c8f]
2024-03-19 11:30:05 -04:00
David Belanger dd4079f8f1 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


[ROCm/ROCR-Runtime commit: 66e3a09a42]
2024-03-19 11:29:38 -04:00
Xinmudotmoe 3b6146e7db 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>


[ROCm/ROCR-Runtime commit: 0c06bec272]
2024-03-13 09:18:42 -04:00
Stella Laurenzo 4fbec4e774 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>


[ROCm/ROCR-Runtime commit: 7c10e1e4f5]
2024-03-13 09:18:03 -04:00
Sv. Lockal 760647dd19 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>


[ROCm/ROCR-Runtime commit: 9a89997b5f]
2024-03-11 10:46:55 -04:00
Harish Kasiviswanathan 2f05682f29 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>


[ROCm/ROCR-Runtime commit: 341ecaf1d9]
2024-02-26 14:20:16 -05:00
Harish Kasiviswanathan de1c7daba7 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>


[ROCm/ROCR-Runtime commit: 191caf46ac]
2024-02-26 09:08:11 -05:00
Harish Kasiviswanathan aeddcb8156 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>


[ROCm/ROCR-Runtime commit: 858dfd364f]
2024-02-25 10:45:36 -05:00
David Belanger 9345569ac7 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>


[ROCm/ROCR-Runtime commit: 3dd98d075f]
2024-02-06 20:56:32 -05:00
James Zhu 72775ad4e4 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>


[ROCm/ROCR-Runtime commit: f75fddb9bd]
2024-01-19 10:42:40 -05:00
David Yat Sin 68522c65a9 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


[ROCm/ROCR-Runtime commit: 0accd17b6e]
2024-01-16 22:44:38 -05:00
Ranjith Ramakrishnan ed4861e951 Use relative path rather than hard coded path in package config file
Change-Id: Ia35fadeead69f84f4f4d32ab0c04f2f391aba4f4


[ROCm/ROCR-Runtime commit: a7d8b1c287]
2024-01-07 20:51:59 -08:00
Jeremy Newton b2b4d5e7b5 Fix missing global symbol
If using hsakmt as a shared library

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


[ROCm/ROCR-Runtime commit: 42581d4172]
2024-01-04 11:14:39 -05:00
Yifan Zhang 29820a0887 kfdtest: add APUs judgement in LargestVramBufferTest criteria
This patch is to add APUs judgement in LargestVramBufferTest criteria.

Change-Id: Ic69093f8ebed8be0b1c58787e2a294d86fb49bb0


[ROCm/ROCR-Runtime commit: 808a4428b6]
2023-12-28 17:17:31 +08:00
Yifan Zhang f5125d542a 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>


[ROCm/ROCR-Runtime commit: 92c0015787]
2023-12-28 17:12:44 +08:00
Yifan Zhang 1c0d18bce6 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>


[ROCm/ROCR-Runtime commit: 72324444cc]
2023-12-27 16:23:17 +08:00
Xiaogang Chen 2a1b821740 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


[ROCm/ROCR-Runtime commit: 1a7162731e]
2023-12-15 13:27:22 -06:00
gaba dcf8b5fd6c 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>


[ROCm/ROCR-Runtime commit: 4bf73f521b]
2023-12-08 15:29:19 -05:00
David Yat Sin 8151aad0c2 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


[ROCm/ROCR-Runtime commit: 01ff2f7934]
2023-11-17 04:43:51 +00:00
Yifan Zhang cc58a01e06 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


[ROCm/ROCR-Runtime commit: 46fe316348]
2023-10-23 23:21:40 +08:00
Rajneesh Bhardwaj bb813a14d4 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


[ROCm/ROCR-Runtime commit: 5047eb161f]
2023-10-12 17:01:34 -04:00
Tomasz Kłoczko 3c5a5397fe 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


[ROCm/ROCR-Runtime commit: a226542fc3]
2023-10-11 15:50:38 -04:00
Torsten Keßler 7d30e82f41 Mark new symbols in ROCm 5.7.0 as global
Change-Id: Ia0391cac7f432f019dea94f98a145dbf8120817d


[ROCm/ROCR-Runtime commit: b44cca813d]
2023-10-11 15:50:27 -04:00
Philip Yang cf6745a36c 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>


[ROCm/ROCR-Runtime commit: 85a47fa66b]
2023-10-06 10:46:40 -04:00
David Yat Sin 254e8219b3 libhsakmt: Fix incorrect flags for ext coherence
Change-Id: I89c838b9fbdb85589691f29806ae15884b25592f


[ROCm/ROCR-Runtime commit: 73efd3a14e]
2023-10-04 15:00:58 +00:00
James Zhu cc54135848 kfdtest: remove IOMMUv2 performance monitor support
IOMMUv2 is removed from AMDGPU/KFD.

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


[ROCm/ROCR-Runtime commit: 693e686c4d]
2023-09-30 09:16:49 -04:00
James Zhu 0379e077b4 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>


[ROCm/ROCR-Runtime commit: d195deeec4]
2023-09-30 08:54:10 -04:00
James Zhu 6d52c1f332 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>


[ROCm/ROCR-Runtime commit: 277d5e27ff]
2023-09-30 08:54:10 -04:00
James Zhu 9533c318bb libhsakmt: remove IOMMUv2 performance monitor support
IOMMUv2 is removed from AMDGPU/KFD.

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


[ROCm/ROCR-Runtime commit: 274b5b51ca]
2023-09-30 08:54:10 -04:00
David Yat Sin 351cbe9dc7 Add extended coherence memory flag
Add support for new flag for memory allocation that will provide
system-scope coherent atomics

Change-Id: I426d66223e8d2b570f69b4c0e61145ce9b2290d2


[ROCm/ROCR-Runtime commit: 8e06dce573]
2023-09-22 11:03:00 -04:00
Jonathan Kim abc017f83b 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


[ROCm/ROCR-Runtime commit: 986e82d677]
2023-09-14 09:07:20 -04:00
Jonathan Kim 8283807bca 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


[ROCm/ROCR-Runtime commit: fcec22716a]
2023-09-12 15:38:12 -04:00
Ori Messinger 805eeffa32 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


[ROCm/ROCR-Runtime commit: 5f117f7608]
2023-09-08 16:36:01 -04:00
Jonathan Kim 6746de9752 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


[ROCm/ROCR-Runtime commit: 6ec529fe68]
2023-09-08 12:12:13 -04:00
Jonathan Kim c7942fd93f 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


[ROCm/ROCR-Runtime commit: f9e20c8a93]
2023-08-29 11:25:56 -04:00
Lang Yu 9bfa5c5737 kfdtest: add blacklist for gfx1150 and gfx1151
Change-Id: If78840e57c2523696c620d28f4c4ffb004128c0c
Signed-off-by: Lang Yu <Lang.Yu@amd.com>


[ROCm/ROCR-Runtime commit: 65ca3317f2]
2023-08-24 17:27:04 +08:00
Ranjith Ramakrishnan 245c5e2a40 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


[ROCm/ROCR-Runtime commit: 65911e8368]
2023-08-21 12:01:58 -07:00
Jonathan Kim 9bcc4bafdf 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


[ROCm/ROCR-Runtime commit: a3f8085025]
2023-08-18 12:15:08 -04:00
Jonathan Kim 1cd6019517 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


[ROCm/ROCR-Runtime commit: 8311ca5bfa]
2023-08-18 12:15:07 -04:00
Jonathan Kim 8d3881c268 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


[ROCm/ROCR-Runtime commit: 431dc8d403]
2023-08-18 12:11:48 -04:00
Jonathan Kim 616f5ed0af kfdtest: add memory violation test
Add memory violation detection test.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Change-Id: I1b56f684682836fc84fbec713bd81c53bdd6d413


[ROCm/ROCR-Runtime commit: d4029a9492]
2023-08-18 12:11:48 -04:00
Jonathan Kim e8ea199d97 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


[ROCm/ROCR-Runtime commit: 6c5121faff]
2023-08-18 12:09:07 -04:00
Ranjith Ramakrishnan 78f32a3b5e Disable file reorg backward compatibility support by default
Change-Id: I157e05e52a1a61b86fa2fc6f29d31361a688fa10


[ROCm/ROCR-Runtime commit: 96c8bb11b1]
2023-08-09 12:31:27 -04:00
Jonathan Kim 526952d090 kfdtest: add suspend resume test
Add queue suspend and resume test.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Change-Id: I2ade721026cbb458a3597b7858a164e70fe05f4f


[ROCm/ROCR-Runtime commit: d20f0bbb90]
2023-08-09 09:26:46 -04:00