The KFD patch "drm/amdkfd: Ignore bogus signals from MEC efficiently" will
reserve one signal slot that user mode cannot use any more. Update
the maximum event number in KFDEventTest to match that change.
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Change-Id: Ic789e16b6d73dfea66ab51c5bbc075c8e8e2d052
[ROCm/ROCR-Runtime commit: 347bf6a03c]
On the some platform there's only 256MB vram and then will fail to
allocate 256MB vram. So let's limit a small vram allocation for
ensuring vram allocated successfully.
Change-Id: Iba4c469de56925675e5624b300a6153e24ab19b3
Signed-off-by: Prike Liang <Prike.Liang@amd.com>
[ROCm/ROCR-Runtime commit: c86a0b8332]
It's not possible to allocate the 3/4 vram size with granularityMB
being 128 when vram size < 512MB and decrease granularityMB to 16 has
no significant impact on ROCt test on other system. So let's decrease
granularityMB on small vram system for handling LargestVramBufferTest().
Change-Id: Iea7c29abfd382a20761b653730fd09a220ad2fd0
Signed-off-by: Prike Liang <Prike.Liang@amd.com>
[ROCm/ROCR-Runtime commit: 6c103877dd]
Tested on Talos II with Vega 64
POWER systems allocate NUMA nodes on multiples of 8 to allow CPU
onlining / offlining
Set the correct NUMA mask bits when requesting node-bound memory
allocations
This is a cleanup/squash/rebase of:
https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface/pull/47
Change-Id: Id4af6dff7e66e9d464d6b17a1e99087eb3ac8e51
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
[ROCm/ROCR-Runtime commit: 5fd3c868b2]
Some VRAM access tests in MMBandWidth can be very slow on systems with
complicated PCIe topology. Skip tests that take a long time to avoid
excessively long running tests with little benefit.
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Change-Id: I2950237347fc2f764f6aa3292ab819051472bf37
[ROCm/ROCR-Runtime commit: 3ecd54f098]
Map failures happen in AllocBuffers function when there
isn't enough space to move BO to vram. In such cases, the
function retries allocation/map until successful to continue
testing eviction and restore.
Print a message in KFDEvictTest when this happens to correlate
to the message seen in the kernel log.
amdgpu 0000:c1:00.0: amdgpu: Failed to map peer:0000:c1:00.0 mem_domain:4
Signed-off-by: Divya Shikre <DivyaUday.Shikre@amd.com>
Change-Id: I0475d8d9521a07612182e54fc7cddb9bd44353e6
[ROCm/ROCR-Runtime commit: 0d07b3477b]
If PCIe Atomics aren't supported, we shouldn't try to run a test that
tests PCIe Atomics. Check for support, and bail early if it's not there
Signed-off-by: Kent Russell <kent.russell@amd.com>
Change-Id: Ie9aa0fed3ece07fb83a33e6cacef2961626afab4
[ROCm/ROCR-Runtime commit: f62e9b9821]
While this is currently only used in one subtest, it's useful to have
this separated into the test utilities. This will also allow us to check
for PCI Atomics support before trying to run them.
Signed-off-by: Kent Russell <kent.russell@amd.com>
Change-Id: I9704d151bfaa627eceae8399cc46c15babde6ff1
[ROCm/ROCR-Runtime commit: 8b54459e12]
Import the latest version from the kernel tree.
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Change-Id: If5f998ad55085ebd5020adaa382181204d834e3e
[ROCm/ROCR-Runtime commit: f88aaa933b]
This error messages should be handled by the caller.
Signed-off-by: Alex Sierra <alex.sierra@amd.com>
Change-Id: I68d879d6d41835f47b8ac138c2218eaa6b86a512
[ROCm/ROCR-Runtime commit: dc33a092c0]
Currently, context save area size passed to KFD includes the
size of the debug area. Change this to report the actual size
of the context save area to KFD.
Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Change-Id: I5d440ae802255a97ade046775f6a000bae79d5d5
[ROCm/ROCR-Runtime commit: b8dc875b3c]
Include the upgrade operation check in the prerm and postun scripts
in package.
Signed-off-by: Saravanan Solaiyappan <saravanan.solaiyappan@amd.com>
Change-Id: Ib95ea72f15bfbf4141b69b0a8ca4d3a71fe1c093
[ROCm/ROCR-Runtime commit: 046f2e9116]
Add PCI DID for cyan skillfish.
Signed-off-by: Lang Yu <Lang.Yu@amd.com>
Change-Id: I1d06936cccdf99af76fe5ca3ff323538fac76c9c
[ROCm/ROCR-Runtime commit: 052b7957ea]
The gfx version of gfx90c is 90C instead of 902.
Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Change-Id: Id009c9357f816b8ccab605090df47626f1a579ef
[ROCm/ROCR-Runtime commit: 7cdf38f6c0]
Incease more timeout according to peers number to pass the
test on some PCIe link platforms.
Change-Id: Ifcb8c7297d6960c96fc18d29bc0a48733ca50165
Signed-off-by: Eric Huang <jinhuieric.huang@amd.com>
[ROCm/ROCR-Runtime commit: 7c62a12918]
Mapped memory areas become invalid after fork, and the child process is
required to remap the memory areas after a fork. So we mark these device
memory mappings with MADV_DONTFORK so that they are removed from the
child process after fork.
This was causing some issues when doing CRIU checkpoint/restore because
CRIU and amdgpu_plugin were not able to handle these mappings.
Change-Id: I50eb334aecea6dab7522d94da0273adcf4fb1ce0
Signed-off-by: David Yat Sin <david.yatsin@amd.com>
[ROCm/ROCR-Runtime commit: 4986f4a5c2]
Total VRAM size on APU is 512M usually,
Framebuffer also is allocated from VRAM.
There is no enough memory for this case.
/home/ruiliji2/p5/libhsakmt/tests/kfdtest/src/KFDMemoryTest.cpp:1285: Failure
Value of: (hsaKmtMapMemoryToGPUNodes(bufs[i], bufSize, &altVa, mapFlags, 1, &defaultGPUNode))
[ FAILED ] KFDMemoryTest.MMBench (1034 ms)
Change-Id: Ib4201291122d85f6512a85859aea9a4713fb4f5c
(cherry picked from commit a9f924484e7022a2d53ee02811b080f0833eba55)
[ROCm/ROCR-Runtime commit: 0340c68031]
skip HDP flush test when remap feature is not supported.
Backgroud:
the HDP register remap is skipped in sriov mode,
it will cause mmio base is nullPtr.
Signed-off-by: Yang Wang <KevinYang.Wang@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Change-Id: Ib9aea1900931e30571656397a485ee4db051ec0a
[ROCm/ROCR-Runtime commit: 033b52c4e4]
Explicitly free the user buffer ptr before test's tear down. Otherwise
the svm_bo object will never be released, causing a BUG error. Due to
a late callback to svm_migrate_page_free when prange not longer exist.
Also did cosmetic adjustments.
Signed-off-by: Alex Sierra <alex.sierra@amd.com>
Change-Id: I989c62de8a9634faa84e42def956cecb3f84e329
[ROCm/ROCR-Runtime commit: 2dbee30232]
The AMD compiler team has confirmed that they expect gfx90c
to be gfx90c, with a major/minor/stepping of 9, 0, and 12
respectively. It appears that there is a typo in the libhsakmt
topology information that lists this part as gfx902. This patch
fixes the issue.
Signed-off-by: Joseph Greathouse <Joseph.Greathouse@amd.com>
Change-Id: I6f907a7aa6f190b12aba8bb4210c7b341b3c720b
[ROCm/ROCR-Runtime commit: a06d1a3884]
This is causing issues with side by side, sorry for the noise.
This license location isn't ideal but it's good enough for now.
Change-Id: Iba2a84cedf22466fdaaf3c63b6ea49c9fc277967
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
[ROCm/ROCR-Runtime commit: 3f90750304]
Calling cmake replaces this file, so no need to commit it.
Change-Id: Ic4747cc9eebd9cbfc61d524a31d2025c04eda12e
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
[ROCm/ROCR-Runtime commit: 3b64517787]
The copyright file will conflict if multiple thunks are installed. This
should resolve the issue by adding the version to the install path.
Change-Id: Ieac5a3eba979b3e934fb9100f890b92fc7c35d71
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
[ROCm/ROCR-Runtime commit: 348a3613d6]
CPACK doesn't have proper logic for installing the license as described
by CPACK_RESOURCE_FILE_LICENSE.
For Debian packaging, the license is expected to be installed as:
/usr/share/doc/PACKAGENAME/copyright
To do this, I've added a bit of logic for CPACK to copy this into the
package using CPACK_INSTALL_COMMANDS to prep the directory, and
CPACK_INSTALLED_DIRECTORIES to add it to the package. This applies to
both RPM and DEB, so I've added some logic to the spec file to exclude
this file (note that CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION does
not work for files installed with CPACK_INSTALLED_DIRECTORIES).
For RPM install, I've just added a small bit of logic to the spec file
to handle it. The file needs to be copied into the spec working
directory, then a macro is used to handle the rest. Note the license
macro does not work on EL6, but I don't think we want to support this.
Change-Id: I06ce63d300419893cb8274bc504a15633e304d91
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
[ROCm/ROCR-Runtime commit: 7649cd862e]
I used the binary directory instead of the source directory to specify
the spec.in path, which passed local testing since these directories
are in the same location. This is not guarenteed to be true.
Change-Id: I1b49ca8453b9c074a947104c26fb39667d728a8e
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
[ROCm/ROCR-Runtime commit: 529c96c08b]
CPack does not support recommends for RPM generation, so I've generated
a template RPM SPEC files in order to make modifications to allow for
support of recommends.
The spec.in file was generated using the cpack option
"CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE" and was modified very
sparingly to avoid any maintanance burden, e.g. can be easily
regenerated. The CPACK_RPM_USER_BINARY_SPECFILE is then used to specify
the customized template file, instead of using the cmake's template.
From what I understand, the point of these two options is to allow
developers to tailor the specfile to their desire, since rpm spec files
are much more advanced then the equilivent debian file.
Change-Id: I80c69be58a3c57729ed997fd2ce01f5d16b9e9b9
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
[ROCm/ROCR-Runtime commit: 3c0e4fee0f]
For the use of libdrm-amdgpu-amdgpu1 and libdrm-amdgpu, we should use
recommends, as we want these packages installed with a strong dependency
but avoid a strict dependency, since this is enhancement feature.
Using the newer libdrm, which is build for amdgpu-dkms, is ideal since
it will produce more correct marketing names, but should not be mandated
due to two reasons:
- A user may not want to install both libdrms on their system
- The system might not have the newer libdrm available
This patch only fixes the Ubuntu/debian package since recommends is not
properly implemented for the RPM generator for CPACK. For now,
"suggests" will have to do, since it's the closest option we have. I
will investigate if we can get around this issue.
Change-Id: I33a90c3ead235bbbe265238c026933688ea63fe3
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
[ROCm/ROCR-Runtime commit: 86c27a7af8]
This reverts commit af55f02fab.
Reason for revert: Infra still not ready for it yet
Change-Id: I03e043c1ca7924264e3e70e3e82c73b4efc2ae75
[ROCm/ROCR-Runtime commit: e842d7f480]
SUGGESTS doesn't get installed by default by dpkg, it requires
--install-suggests. While the libdrm-amdgpu-amdgpu1 lib might not be
critical to core thunk usage, it's necessary enough to increase the
dependency from weak to strong, thus we use RECOMMENDS instead
Since CPack doesn't support RECOMMENDS for RPMs, and SUGGESTS isn't
strong enough, we just set it as REQUIRED. This should handle any
standard installation situations instead of trying to be fancy to try to
make things exactly the way we want them to be.
Signed-off-by: Kent Russell <kent.russell@amd.com>
Change-Id: I5a676fb4a3fbf5c7b35f503acc30cf01c056266d
[ROCm/ROCR-Runtime commit: 9529bf7063]
This really should be set to conform to distro standards.
Change-Id: I63442b9ad58f70c4691c499b666f7c359dc9609d
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
[ROCm/ROCR-Runtime commit: fa2309fcdd]
The infra is in place to make sure that we can get around the issue
where older versions of rpm don't know what "Suggests" is. Using the
HSAKMT_REQUIRES_LIBDRM variable will force the package to require
libdrm-amdgpu1 instead of just suggesting it in newer distros.
Change-Id: I5d595c4e4be5ad8e8c411dcec3a58365e1984f05
[ROCm/ROCR-Runtime commit: 7e90eef254]
We need to add some more information about the debug features supported
by the platform. We are adding the following:
- debug supported
- dispatch info always valid
- precise memop supported
- watchpoints shared
Change-Id: I68deed98619396d17e28c6e18bad424b58297485
Signed-off-by: Philip Cox <Philip.Cox@amd.com>
[ROCm/ROCR-Runtime commit: 489db9fac6]
Since it's shader-based, the GFX9 shader won't work for GFX10. Blacklist
it for now until we move to a more ASIC-agnostic shader
Signed-off-by: Kent Russell <kent.russell@amd.com>
Change-Id: I353e9a3fe8c7ba6f33556e39c7e4f6b36e010480
[ROCm/ROCR-Runtime commit: 2801342048]
This is required for Marketing Name, but Marketing Name isn't a hard
requirement for ROCT, so make it a Suggested package for DEBs.
Adding a commented-out possible solution for RPM-based distros, as
unfortunately SLE <10 and CentOS/RHEL <8 don't know what "SUGGESTS"
means. Potentially we will add a check that the build environment
that determines if we require the REQUIRES field to be used.
Hopefully we can work out the RPM side quickly, but for now enable
SUGGESTS on DEB as a start
Signed-off-by: Kent Russell <kent.russell@amd.com>
Change-Id: Icea689a14c185964e7f47fb23ee432f9b35ccb03
[ROCm/ROCR-Runtime commit: f7e90798a0]
The shader is incompatible with gfx1030, so blacklist it there until we get
to some more ASIC-agnostic shader generation
Signed-off-by: Kent Russell <kent.russell@amd.com>
Change-Id: I71f362a80e6e8f87ecece6afa6b34a5f02bc56bf
[ROCm/ROCR-Runtime commit: 5a8c9a54f1]
The return code is just -1 if any error occurs. To detect debugger
unavailable we need to check the actual ioctl error code.
Change-Id: I8a294c754196aec916809497ec8e810da2f072b8
Signed-off-by: Sean Keely <Sean.Keely@amd.com>
[ROCm/ROCR-Runtime commit: b67bc6fcc9]
For userptr, after taking aperture lock, decrease registration_count and
ensure object registration_count equal to 0 to release KFD and thunk
object.
Move decrementing of registration count from fmm_deregister_memory into
__fmm_release to avoid a race condition when dropping the aperture lock
in fmm_deregister_memory.
Change-Id: I5381fa6b8a77a1516af2554e5174e91969c338c4
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
[ROCm/ROCR-Runtime commit: f82927ad65]
This test requires KFD patch "drm/amdkfd: SVM map to gpus check vma
boundary" to pass, the patch is on staging-dkms branch, not land on
mainline branch. Temporary blacklist this to unblock QA, as QA reports
kfdtest failure.
Change-Id: I00515cd5d5d1c5612f4f8d48605d86f4a7e62ce2
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
[ROCm/ROCR-Runtime commit: 5adb142dc7]
After adjusting the memory usage, re-enable KFDEvictTest.BasicTest on
gfx906 and KFDEvictTest.QueueTest on GFX10
Change-Id: I401e679e447f3150241078154635f0b30692513d
Signed-off-by: Kent Russell <kent.russell@amd.com>
[ROCm/ROCR-Runtime commit: 392e0e2afc]
We were hitting memory map errors and segfaults when trying to use 7/8
VRAM on certain cards (dmesg showing "Failed to map to gpu 0/1"), as the
original check didn't see if this would exceed the GTT size.
Allocate the smaller of 1/3 of SRAM or 7/16 of VRAM (7/8 / 2) for the
tests
Signed-off-by: Kent Russell <kent.russell@amd.com>
Change-Id: Ic11a5cee058535418eef903a28846e00e1839969
[ROCm/ROCR-Runtime commit: d5d8c022f1]
SDMA firmware of gfx902 has a regression which causes cp hang
in kfdtest, blacklist related test cases.
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Change-Id: Ie75b72a952a29d6b1394c5fcb67ff9a5143b3b07
[ROCm/ROCR-Runtime commit: 04b149b7fd]
This reverts commit 919cd43da5.
Reason for revert: Breaking on Centos7
Change-Id: Ibd5a7c5d4e8c07defec45821ae1faa525cfc916d
[ROCm/ROCR-Runtime commit: 06b1f25172]
This is required for Marketing Name, but Marketing Name isn't a hard
requirement for ROCT, so make it a Suggested package
Change-Id: Ibafcce2c59dc8bdba90c171e766122bebf548a48
Signed-off-by: Kent Russell <kent.russell@amd.com>
[ROCm/ROCR-Runtime commit: 4144a0d2a4]
Use alloca to replace variable size array.
Change-Id: I81e5a7d8f6ace203b81f5f5a651b2a6aa948821c
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
[ROCm/ROCR-Runtime commit: 88e6921d45]
This was never validated on GFX10, so remove it for now until it's
either validated and confirmed, or move the check to the test itself
Change-Id: Ie4d8b31885fbe6e5ed84b7b174c0bfed60879741
[ROCm/ROCR-Runtime commit: f2f86591b6]
to faciliate debugging, print errno when queue destroy fail
current log give very little information when fail:
[ RUN ] KFDQMTest.AllSdmaQueues
[ ] Regular SDMA engines number: 1 SDMA queues per engine: 2
[ OK ] KFDQMTest.AllSdmaQueues (11 ms)
[ RUN ] KFDQMTest.AllXgmiSdmaQueues
[ ] XGMI SDMA engines number: 0 SDMA queues per engine: 2
[ OK ] KFDQMTest.AllXgmiSdmaQueues (6 ms)
[ RUN ] KFDQMTest.AllQueues
/home/foreman/build/hsakmt-roct-amdgpu-1.0.9.40500/sources/libhsakmt/tests/kfdtest/src/KFDQMTest.cpp:381: Failure
Value of: (cpQueues[i].Destroy())
Actual: 1
Expected: HSAKMT_STATUS_SUCCESS
Which is: 0
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Change-Id: I5b1b5b616a5fd7ff198360c893a7aeed685022bd
[ROCm/ROCR-Runtime commit: db1d6d92ab]
After calling ioctl to create userptr obj, take aperture lock, check if
there is same userptr obj created after finding object, to catch the
race that multiple threads register same userptr to multiple GPUs.
If same userptr obj exist, then increase userptr registeration_count,
and free the newly create obj.
Change-Id: I63ae3a4f54da8aedd11c124d8d53ebe727b8203a
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
[ROCm/ROCR-Runtime commit: 8f7443494a]
This reverts commit f94be2078c.
Change-Id: I954326d9a291280de7c9b7ef49a8cce0cd9dd9ad
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
[ROCm/ROCR-Runtime commit: a809a5bf32]
This reverts commit 559bb50c6a.
Change-Id: Ibd32ac36bcb9ee418957d25b240ef9dd9172fbd3
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
[ROCm/ROCR-Runtime commit: 91b0fce535]