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

2925 Коммитов

Автор SHA1 Сообщение Дата
Philip Yang 7100af1b99 kfdtest: query userptr pointer alloc flags
Test if query userptr pointer info return correct alloc flags,
CoarseGrain by default.

Test if query hsaKmtAllocMemory pointer info return correct alloc
CoarseGrain flags.



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


[ROCm/ROCR-Runtime commit: c3c1618db7]
2021-07-22 21:14:46 -04:00
Philip Yang f11efa6ee2 kfdtest: RegisterGraphicsHandle check CoarseGrain set
Register graphics memory should always coarse grain.



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


[ROCm/ROCR-Runtime commit: db288df695]
2021-07-22 21:14:46 -04:00
Philip Yang c26f323d51 libhsakmt: Qyery pointer info flags for registered memory
hsaKmtQueryPointerInfo return vm_obj flags for all below registered
memory types other than hsaKmtAllocMemory, and set the CoarseGrain flag
correctly for:

Graphics: always coarse grain.

Shared: hsaKmtShareMemory pass mflags with export handle to KFD to store
in KFD objs, hsaKmtRegisterSharedHandle get mflags from KFD with import
handle.

Userptr: it is already coarse-grain by default, or based on mflags
provided in hsaKmtRegisterMemoryWithFlags call.



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


[ROCm/ROCR-Runtime commit: fa7b4a6268]
2021-07-22 21:14:46 -04:00
Philip Yang 178c985a8b libhsakmt: Query pointer info returns HsaMemFlags
Query pointer info returns KFD_IOC_ALLOC_MEM_FLAGS_* flags, it should
return HsaMemFlags, fix it by renaming vm_obj->flags to mflags and
always saving HsaMemFlags.

Use consistent function parameter and variable name to avoid confusion:
mflags for HsaMemFlags and ioc_flags for KFD_IOC_ALLOC_MEM_FLAGS_*
flags.

AMDKFD_IOC_GET_DMABUF_INFO return ioc_flags, translate it to mflags
using new helper fmm_translate_ioc_to_hsa_flags.



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


[ROCm/ROCR-Runtime commit: 2c796e62be]
2021-07-22 21:14:46 -04:00
Aaron Liu e709fed186 libhsakmt: add yellow carp DID
Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Change-Id: If798dc733bc8d65c67922fb5d2e32aa1dada8381


[ROCm/ROCR-Runtime commit: 3d12437f1b]
2021-07-22 21:18:42 +08:00
Kent Russell 8d90ef172c libhsakmt: Add gfx1032 DID
0x73E3 DID was missing, add it.

Signed-off-by: Kent Russell <kent.russell@amd.com>
Change-Id: Id1ae2f268e0e8b5cfec5ae2065153fe73854b93a


[ROCm/ROCR-Runtime commit: ed62c7aa1c]
2021-07-22 07:37:19 -04:00
Aaron Liu eb72821574 Add gfx1035 for yellow carp
Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Change-Id: I1e3e44352b5825fc0f249c39aed703d4990995ca


[ROCm/ROCR-Runtime commit: 4032070c3e]
2021-07-22 13:48:31 +08:00
Philip Yang 6a15d17257 libhsakmt: update to KFD ioctl version 1.6
sync with KFD ioctl version 1.6:

1.6 - Query clear flags in SVM get_attr API

Change import export handle args pad field to flags, to pass memory
alloc flags from alloc process to import process.

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


[ROCm/ROCR-Runtime commit: dee9c023a2]
2021-07-21 21:48:18 -04:00
Icarus Sparry e97ebfd200 Add dependency on rocm-core
Signed-off-by: Icarus Sparry <icarus.sparry@amd.com>
Change-Id: I5f99114e9186679585862f05db8a508663b74b0d
Signed-off-by: Icarus Sparry <icarus.sparry@amd.com>


[ROCm/ROCR-Runtime commit: b63dde24d0]
2021-07-21 15:57:54 -04:00
Kent Russell 77588e8159 Fix drm.h include path
kernel-headers provides the drm/drm.h path, while libdrm-dev[el]
provides the libdrm/drm.h path, which is what we want to use. Fix the
path so we use the newer drm.h header, as well as fixing SLES, which
doesn't provide drm.h in their kernel-headers.

Change-Id: Icb2b6643698d356169e3baeef17527a1b4e05483


[ROCm/ROCR-Runtime commit: 4f3440a8ac]
2021-07-20 12:49:15 -04:00
Jonathan Kim de34fa23ed libhsakmt: add drm.h header dependency for sles
Update to thunk API introduced dependency on drm.h in commit
1001f27cb5 libhsakmt: update thunk api for exception handling
so update dependency list in SLES builds.

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


[ROCm/ROCR-Runtime commit: 303c0748ce]
2021-07-19 12:48:13 -04:00
Sean Keely 32766de851 Add support for reporting vm faults through the queue error handler.
Under xnack we can now identify the queue which generated a vm fault.
This allows users to identify which queue, and therefore which
dispatch, a vm fault came from.

Change-Id: If72ff3de05800f2b811aa7842a15eedff8b5e45a


[ROCm/ROCR-Runtime commit: 59ee761f81]
2021-07-16 18:03:26 -05:00
Laurent Morichetti 0a2ad007a4 Fix incorrect packet index in ttmp6
ttmp6.packet_index is reported as 0 for all waves, regardless of the
dispatch packet position in the queue, due to an issue in the clearing
of the previous trap_id and saved status.halt bit.

Fixed TTMP6_SAVED_STATUS_HALT_MASK to only be one bit, 1<<29.

Change-Id: Ia4934e51123a40d71de658efc387a1f3a6344f05


[ROCm/ROCR-Runtime commit: ef1955ad42]
2021-07-16 18:03:26 -05:00
Jay Cornwall b65eb065c3 Report union of wave errors as a bitmask in trap handler
Also fix incorrect PC increment on host trap.

Change-Id: Ic8bbf2b90f9f879ba62b558b909d010a8939a663


[ROCm/ROCR-Runtime commit: f3d942b67f]
2021-07-16 18:03:26 -05:00
Jay Cornwall 690aef5c9e Clear queue error code when not handling exceptions
If left non-zero the event loop will keep reinvoking the callback,
preventing AqlQueue::ExceptionHandler from running.

Change-Id: If85fbaf62f04ffd327ecf9d649aa23afad4442ce


[ROCm/ROCR-Runtime commit: 8d4608ed0e]
2021-07-16 18:03:26 -05:00
Jay Cornwall 06cc198b57 Add new trap handler, bump debug API version
Also fix hsaKmtRuntimeEnable error handling. Continue if ioctl fails.

Change-Id: I754ccba5910ccfef6f1ada1415593ef89ce33aba


[ROCm/ROCR-Runtime commit: 7e4088309d]
2021-07-16 18:03:26 -05:00
Sean Keely 0bb9344674 Initialize new exception handler state.
Change-Id: Ibcb699760837b9ec1508d6af948a272a81ddcd02


[ROCm/ROCR-Runtime commit: 0159aea4c9]
2021-07-16 18:03:26 -05:00
Sean Keely 5c9500d50b Support debugging hw exceptions.
Change-Id: I9780147294af2e9457fa54693580735452ee2ae6


[ROCm/ROCR-Runtime commit: 206e87d28b]
2021-07-16 18:03:26 -05:00
Jonathan Kim 6c4717ae7a libhsakmt: add runtime enable and disable calls
Add hsaKmtRuntimeEnable and disable.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Change-Id: I083f9293948e975546a1b3c1334cb41499b9ab1f


[ROCm/ROCR-Runtime commit: 1ce548829b]
2021-07-16 18:37:41 -04:00
Jonathan Kim 1001f27cb5 libhsakmt: update thunk api for exception handling
The debugger and debug agent no longer use the Thunk API.
Remove all deprecated functions and keep commented
references for future KFD tests.

Update and the keep the version checks for future use
and hsaKmtRuntimeEnable/Disable.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Signed-off-by: Laurent Morichetti <laurent.morichetti@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Change-Id: Ia2f10d82f5ac36d0bd1bda233810f26e8a154d55


[ROCm/ROCR-Runtime commit: 31ac82617c]
2021-07-16 18:36:18 -04:00
Jonathan Kim fe03b35c8e libhsakmt: update create queue for exception handling
Update hsaKmtCreateQueue to initialize the new save area header with the
exception payload and event ID.

Signed-by-off: Jonathan Kim <jonathan.kim@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Reviewed-by: Sean Keely <sean.keely@amd.com>
Change-Id: Icd38062dc982cb29b30644699014eeb0b3e26d00


[ROCm/ROCR-Runtime commit: 96c7a5c9dc]
2021-07-16 18:34:35 -04:00
Felix Kuehling 14d821391e libhsakmt: Fix deadlocks in __fmm_release
__fmm_release is sometimes called with the aperture lock, and sometimes
without. Consistently call it with the aperture lock held and remove the
lock/unlock calls from this function.

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


[ROCm/ROCR-Runtime commit: 5fac7dcc3b]
2021-07-12 18:27:55 -04:00
Felix Kuehling 559bb50c6a libhsakmt: Fix deadlock in map_mmio
Unlock mutex if MMIO mapping fails. This happens on all GFXv8 GPUs.

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


[ROCm/ROCR-Runtime commit: 19536080a8]
2021-07-09 17:07:42 -04:00
Kent Russell 1da08cffe1 kfdtest: Ensure devices are peer-accessible for peer mapping
If the devices aren't peer-accessible, we shouldn't try to run a test
that requires that the devices be peer-accessible. Thus, add a check in
MapVramToGPUNodesTest to check for peer accessibility before executing
the peer mappings.

Signed-off-by: Kent Russell <kent.russell@amd.com>
Change-Id: Ib79b141f8c1ac6d85f5ab49d62af62ec10b988b7


[ROCm/ROCR-Runtime commit: bdfe3a12a8]
2021-07-09 15:45:01 -04:00
Philip Yang c63b87aed2 kfdtest: add KFDMemoryTest MultiThreadRegisterUserptrTest
Test Thunk multiple threads register and deregister same userptr race
condition, to emulate application register same userptr to multiple
GPUs using multiple threads.

Use thread barrier to sync the threads, to start register userptr at
same time.



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


[ROCm/ROCR-Runtime commit: 92076f6f1b]
2021-07-07 17:52:31 -04:00
Aaron Liu 9c544da3f6 kfdtest: add yellow_carp blacklist
Signed-off-by: Chen Gong <curry.gong@amd.com>
Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Change-Id: Ib3a3172b0ac40109acbe42b9dc92517b3fedc84c


[ROCm/ROCR-Runtime commit: ef9c532187]
2021-07-07 09:47:05 +08:00
Aaron Liu 09d3f9749c libhsakmt: add yellow carp support
This patch is to add yellow carp support on thunk.

Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Change-Id: Icfecc3fd1f472c9924f934c6a5352448356d83df


[ROCm/ROCR-Runtime commit: a55551309c]
2021-07-06 21:46:28 -04:00
Aaron Liu bb0146488f kfdtest: MigrateLargeBufTest support APU
Limit test buffer size to 3/4 total VRAM size, and max 1GB.

Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Change-Id: I937e10b0a6bd8215e3865b50f22ce75b3982a6f7


[ROCm/ROCR-Runtime commit: fd131e875e]
2021-07-06 21:44:23 -04:00
Kent Russell ef56da6539 kfdtest.exclude: Add NV12 blacklist
Add a blacklist for gfx1xxx12, using the same list as gfx1012

Change-Id: I7e620dba8a36f6f89152a48066234884150a15dd


[ROCm/ROCR-Runtime commit: b2fb2a3470]
2021-07-06 11:58:53 -04:00
Sean Keely 4c960d7b3d Add error message to assertion.
Warn that HSA_FORCE_ASIC_TYPE may be needed if the engine major id
assertion fails.

Change-Id: I67e01e99c3d1bdc84630ccfae489dce5e77961b5


[ROCm/ROCR-Runtime commit: 408fca0278]
2021-06-28 23:18:43 -04:00
changzhu 1d15f33b5c kfdtest: skip KFDSVMRangeTest.MigrateAccessInPlaceTest for gfx902 and gfx90c
Change-Id: I671440c212a07fdfdb1c4245b4551c6344eaedc6
Signed-off-by: changzhu <Changfeng.Zhu@amd.com>


[ROCm/ROCR-Runtime commit: 1a9604ad57]
2021-06-28 13:37:52 +08:00
Philip Yang f94be2078c libhsakmt: fix multiple threads register userptr race
Aperture locking is too fine-grained, it has race between find userptr
and allocate userptr object.

Change _fmm_allocate_device and fmm_allocate_memory_object to not take
the aperture lock, the callers take it, this implements an atomic find
userptr or allocate a new one.



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


[ROCm/ROCR-Runtime commit: c4d5ee28f0]
2021-06-25 14:16:20 -04:00
Sean Keely 183531963c Always execute the first satisfied async signal handler.
Certain special signals do not carry their updates via their signal
value.  These signals are wrappers around special KFD events, of
which the only current instance informs about VM faults.  We either
need to check each signal for this special event type or rely on
the checking done in hsa_amd_signal_wait_any.  Since there will always
be a small number of these signals it doesn't make much since to
penalize the performance path with this check.  Additionally we know
that the signal indicated by hsa_amd_signal_wait_any is satisfied so
don't need to recheck it's conditions.

Change-Id: I9fc6298300ad543d823ecd28ca8fab4ad26c23ef


[ROCm/ROCR-Runtime commit: 3d6a18b67c]
2021-06-24 02:45:31 -05:00
Sean Keely 4f2d6f763b Correct clang build error.
Clang now warns about set but unused variables.  It also now
recognizes -Wno-error=unused-but-set-variable so this patch moves
that option back to the general options list.

Change-Id: Id800e87eb688b9441b14380e2246ad586179f31a


[ROCm/ROCR-Runtime commit: 26808295f8]
2021-06-23 15:04:58 -05:00
Sean Keely d139055431 Locate kernel directory from device name.
Search child directories when locating device code.

Change-Id: I51515f002ad60878a2be0b6e9ee6416c67a1d799


[ROCm/ROCR-Runtime commit: 74bcd6ee90]
2021-06-17 22:57:21 -04:00
Kent Russell 1b33825c8d kfdtest: Remove EvictTest.BasicTest from gfx906
This is causing PSDB/OSDB failures so disable it until investigation is
done

Signed-off-by: Kent Russell <kent.russell@amd.com>
Change-Id: I666cd45fdf8ae585486adc7cf43eacd1700704bb


[ROCm/ROCR-Runtime commit: 5796225011]
2021-06-17 17:07:22 -04:00
Sean Keely b8533eec6d Add agent info query for HSA_AMD_AGENT_INFO_SVM_DIRECT_HOST_ACCESS.
Allows determining if the host can directly access HMM memory that
is physically resident in vram.

Change-Id: Ie452eedd0e27fe1b511afd416f5a1cd01b3d84e8


[ROCm/ROCR-Runtime commit: 9e53cab613]
2021-06-17 03:45:26 -04:00
Philip Yang 2401e9aafd kfdtest: add KFDSVMRangeTest MigrateAccessInPlaceTest
To test ACCESS_IN_PLACE GPU mapping update to system memory.

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


[ROCm/ROCR-Runtime commit: 351a41ac76]
2021-06-14 11:03:09 -04:00
Alex Sierra 221f75ea7a libhsakmt: move CoherentHostAccess prop to HSA_CAPABILITY
CoherentHostAccess flag member moved from HSA_MEMORYPROPERTY
to HSA_CAPABILITY struct. Now this is reported to the
topology as a capability of the device instead of a device
memory property.

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


[ROCm/ROCR-Runtime commit: f85b428265]
2021-06-10 22:21:17 -05:00
Sean Keely 0100fa968c Allocate any size vram request through the fragment allocator.
Enables the fragment allocator to handle >2MB allocations, maintaining
good TLB alignment.  Prior code contained a bug that caused the effective
API granule for vram allocations >2MB to be bumped to 2MB.

Also adjusts the block cache's block retention heuristic to not
count discarded blocks as in use.  This will reduce block retention
when a significant amount of large blocks or IPC is in use.

Change-Id: I30bd85eb87951df822211f799d9cfe579ab109c6


[ROCm/ROCR-Runtime commit: 8adbda1c18]
2021-06-10 19:30:54 -05:00
Sean Keely 426a9f4df0 Remove unused GpuAgent.local_region_ member.
Change-Id: I99526e6b1f64e810f7fed5d922c540d252a46d80


[ROCm/ROCR-Runtime commit: 981c6bd8c3]
2021-06-07 19:59:58 -04:00
Sean Keely c35562e45b Add debugging checks for packet type in the scratch handler.
Change-Id: I84a6f18548ac39349595e3a1c8a5a9ff27d4e178


[ROCm/ROCR-Runtime commit: bd59789f0b]
2021-06-07 15:36:18 -04:00
Yifan Zhang b3e0b236df libhsakmt: add colon after KFDQMTest.SdmaConcurrentCopies
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Change-Id: Ief14e513e4b09db0607f5533a55f80d3b0be017e


[ROCm/ROCR-Runtime commit: c24ed10dfa]
2021-06-07 18:21:59 +08:00
Yifan Zhang eb6d16072b kfdtest: Temporarily blacklist some svm related test cases for gfx902.
move blacklisted test case from gfx902 iommuv2 to dgpu path.

Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Change-Id: I8b101226ca8dcd0c12c484f5f6ce12fe73a75bdc
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
(cherry picked from commit 9cf4377572321396225950b9a58beb549120c2a3)


[ROCm/ROCR-Runtime commit: e72be0e54d]
2021-06-06 23:07:29 -04:00
Sean Keely 67029106d9 Limit reporting of GPU_ONLY signal waits from host.
Such waits must spin but are functionally correct.

Change-Id: I4992852f04da788495c6f566c46a3dffaf38397c


[ROCm/ROCR-Runtime commit: 3323e18f3e]
2021-06-03 15:26:40 -05:00
Sean Keely 2c4b216db6 Allow limiting debug warning messages.
Add macro debug_warning_n to stop printing a message after
N instances.

Change-Id: Id5f84b11eb63b3a20bd2bcb2ea8f10a066b457ef


[ROCm/ROCR-Runtime commit: ca8387768e]
2021-06-03 15:25:55 -05:00
Sean Keely 76c8067786 Improve async handler performance.
Under high async handler load signal retention and event sorting
become bottlenecks.  This change processes more handlers in a
single pass to amortize wait_any overheads.

Change-Id: I8b276e102db647e3858e120547aa0c6fca85ab4c


[ROCm/ROCR-Runtime commit: 6b398eb72c]
2021-06-02 23:52:07 -05:00
Sean Keely 530385e8e8 Add Read Mostly attribute support.
Change-Id: Ia7c60edacb892cbf14bdb50350c0a0a627e53964


[ROCm/ROCR-Runtime commit: f6c2aa1c78]
2021-06-01 23:39:12 -05:00
Alex Sierra dd5e49d846 libhsakmt: change memory allocation alignment
it is to optimize memory allocation latency, which
changes alignment from 2MB to 1GB.

Signed-off-by: Alex Sierra <alex.sierra@amd.com>
Signed-off-by: Eric Huang <jinhuieric.huang@amd.com>
Change-Id: I7818e9f13b17e2c0992e75b17f978dc03a018a57


[ROCm/ROCR-Runtime commit: 973b35bc06]
2021-06-01 11:33:16 -04:00
Sean Keely 2cf9abaa06 Recognize gfx1034 in image device family id.
Change-Id: I2a529b5e91fae9f3697ddbccaaf0e97c87d59837


[ROCm/ROCR-Runtime commit: 7361fc18ee]
2021-05-25 16:43:20 -05:00