This patch is the hot fix to fix the param number checking after remove
dgpu input.
Signed-off-by: Huang Rui <ray.huang@amd.com>
Change-Id: Ic980588f78616f99076de742af580afb4273fb2f
gfx90c should use GFX902 which is the same with gfx902.
Signed-off-by: Huang Rui <ray.huang@amd.com>
Change-Id: Id24dc2c85c9f49f36b00889c3b8b1b19cce34e09
These are removed now that we've consolidated the dev package
information into CMakeLists.txt from hsakmt-dev.txt.
Change-Id: I49496ec5def85b0af7fa6b15110910528a8e0be0
Add extended descriptions and e-mail address to CMakeLists
A lintian error will remain regarding stripping the .so, as we
will not be doing this for Release versions of the hsakmt .so
Signed-off-by: Kent Russell <kent.russell@amd.com>
Change-Id: I41c768dee28c0564d92b9c103a6e2d97590e4589
Whether use dgpu path will check the props which exposed from kernel.
We won't need hard code in the ASIC table.
Signed-off-by: Huang Rui <ray.huang@amd.com>
Change-Id: I0c018a26b219914a41197ff36dbec7a75945d452
KFD already implemented the fallback path for APU. Thunk will use flag
which exposed by kfd to configure is_dgpu instead of hardcode before.
Signed-off-by: Huang Rui <ray.huang@amd.com>
Change-Id: I445f6cf668f9484dd06cd9ae1bb3cfe7428ec7eb
Gfx10 need 12bytes/wave control stack
Change-Id: I6c6f2819572e6b43aa3140d4dbe79d930e4c1c9c
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
Signed-off-by: Jay Cornwall <Jay.Cornwall@amd.com>
This is needed to avoid additional references to mapped BOs in child
processes that can prevent freeing memory in the parent process and lead
to out-of-memory conditions.
Change-Id: I25c90510a14dde515cc23ea5dc1f68e8d7e37a66
Signed-off-by: Philip Cox <Philip.Cox@amd.com>
strlen(src) should not be used as the length in strncpy. Use memcpy
since we know the length of the string, and ensure that we
NULL-terminate regardless of length
Signed-off-by: Kent Russell <kent.russell@amd.com>
Change-Id: I21cc6d106510c69464e7ac9d3fc7da3a1e6d1a68
The option to use kfd_fd for cpu mapping is for very old broken KFD
version, it is not used in upstreaming process. This causes issue when
multiple process uses shared system memory because the GTT address is
over 40 bits.
Change to always use render node fd to create CPU mapping.
Change-Id: Id7e7b2a2e2f13c6e62c5de170589abfff4d456b0
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
This reverts commit d675d1cce1.
Reason for revert: Change was submitted by accident
Change-Id: If05c705e22296fd3ca789f269737d379a933361d
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Since CMAKE_MODULE_PATH can already be set by another project,
we should just append the libhsamkt cmake module directory to it.
Change-Id: I999dc52a2862e4bbff02e0a8e8b39530f4dae2cd
Signed-off-by: Vlad Sytchenko <vladislav.sytchenko@amd.com>
Default is OFF to conform to latest cmake standard (3.15) and
because this feature can cause some confusion for unaware developers.
Change-Id: I6fdbd5ab76c90b73ac6451a383334a83cabef438
Signed-off-by: Sean Keely <Sean.Keely@amd.com>
Immediate benefit is that this enables cmake native find_package
support including transitive passthrough of link dependencies,
options, and include paths.
It does require a bump to cmake 3.6 to enable proper package file
names.
Change-Id: I3f4e2f2db745c04a7f686111b080098a0d92fbf5
Signed-off-by: Sean Keely <Sean.Keely@amd.com>
KFD now passes the ASIC revision to user level through some bits
in the HSA topology's capability field. Some user-level software
wants this because different ASIC revisions may require user-level
software to do different things (e.g. patch code for things that
are changed in later hardware revisions).
Change-Id: I16f2a15ae0875edd01ebdb1f1685ec7865f7049e
Using static_assert breaks in "Many Linux" build environment. It is not
supported by that libc version. _Static_assert is a compiler built-in
and does not depend on the libc version.
Change-Id: I37cf0ad10de94d8f6fc8cefc4fdda55c9520d599
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Update the non-upstream ioctl numbers to align with the change in the
kernel.
Signed-off-by: Amber Lin <Amber.Lin@amd.com>
Change-Id: Ie0ddccb343a023b55eb18477c59341acaa666e99
The purpose of this KFDTest is to investigate the behaviour of an
SDMA queue when an invalid memory address is used.
v2: Don't wait for SDMA queue to finish - it won't finish because of
the gpuvm fault.
v3: Create kfd event before SDMA queue submission. This fix the issue
that gpuvm fault happens earlier than kfd event is created then KFD
exception handler can't find the kfd event (to wake up kfd test)
v4: Instead of using 0x12345678 as the invalid VA, map one page of
FB to gpu and unmap it. Use the mapped GPUVA as the
invalid address
Change-Id: I58af1511f75d869adddede302b238c2725f3fe5a
Signed-off-by: Ori Messinger <Ori.Messinger@amd.com>
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
We need HostAccess for large-bar XGMI configs for this test,
but we can't use it on small-bar XGMI configs, so deal with it
appropriately
Change-Id: Ic16b810de03adfc63de21a00c55e5f3ea1ce66d1
New queue suspend/resume update can now return the number of successful
queue requests so return success if IOCTL return is non-negative.
This should be backwards compatible since old queue suspend/resume returns
0 on success.
Signed-off-by: Jonathan Kim <Jonathan.Kim@amd.com>
Change-Id: I06b70d95d203b2bfc19a0cc1b88c5719c695159a
This is needed to allow gdb to access the memory.
Change-Id: I96c084b714e952d7b7000f0dd41e1c530fdd092f
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Make the hsakmt library take the value from CMake regarding
static/shared
KFDTest automatically grabs the right one due to it checking the normal
shared folders. Tested locally (and via automation by the time that this
is merged)
Also set the default to building SOs if BUILD_SHARED_LIBS is not defined
Change-Id: I7f8b76a7e60f3b41e5981f472b388301ae09e2c6
Signed-off-by: Kent Russell <kent.russell@amd.com>
Using the building OS isn't guaranteed, as we can theoretically build
RPMs in Ubuntu or DEBs in CentOS. Use CPack's DEB/RPM-specific variables
to get around this issue
Change-Id: I404246c070eac2c74b45ae4b763c612891d66de1
Signed-off-by: Kent Russell <kent.russell@amd.com>
Do not request host accessible memory otherwise small-bar XGMI fails.
Change-Id: I6b1e750839ae66a34c85405fa8d0a4aa455399ef
Signed-off-by: Jonathan Kim <Jonathan.Kim@amd.com>
When running run_kfdtest.sh through a wrapper script that sources
run_kfdtest.sh, kfdtest.exclude isn't found because $0 points to the
location of the wrapper script. User $BASH_SOURCE instead of $0 to
find the location of the correct run_kfdtest.sh script.
Change-Id: I0ae7899e527e6d98bb8651197484e5ee03a5fd7b
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Some systems don't support coarse-grained DPM, so performance level will
fail. Remove the compute_utils.sh references, and just use the SMI if we
request clocks be high, without throwing errors if it fails.
Change-Id: Ic5beda9921128be36ac2d58cae3f0608618a8e21
Don't set kfd_open_count=1 unless hsaKmtOpenKFD actually succeeds.
This prevents returning HSAKMT_STATUS_KERNEL_ALREADY_OPENED in
subsequent calls when KFD is actually closed.
Signed-off-by: Sean Keely <Sean.Keely@amd.com>
Change-Id: Ia870b5faa8626826a6c8795aa10784d376cf2e80
libpci was only used to find a marketing string for a device.
This patch looks for a pci.ids on disk and parses it to extract the
same string, using 'Device xxxx' as the fallback on file i/o error
or missing data from the text file. Tested by checking every vendor/
device pair against the values returned from libpci.
Change-Id: I21af3157472c1824d57fcee31393c6ee8ce07330
Signed-off-by: Jon Chesterfield <Jonathan.Chesterfield@amd.com>
Read device unique id from sysfs and expose it in HsaNodeProperties.
For devices not supported the value will be 0
Signed-off-by: Divya Shikre <DivyaUday.Shikre@amd.com>
Change-Id: I97b8689dfa090971c6876de6feaa97652e28c03d