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
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
Move the shader code before the test case code so that all test case
code is consecutive.
Rectify the print messages and avoid calling GetSysMemSize() repeatedly.
Change-Id: I1c4aa5552de4d74163717fe66ad9759fb09e1316
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
The original test takes forever to run on emulators because emulators
are much slower than Asic. So intelligently detect the emulator scenarios
and reduce the run time by slashing the iteration times.
Change-Id: I087f43c04c2b23b5ab2ecaad07533b767c337e94
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
Use an "if 0" to remove the code, as it is not working as expected. The
test is supposed to test mapping from a foreign device (like a NIC), so
it uses a separate GPU to map, but this mapping can be evicted and thus
the test can fail unexpectedly. Remove the code until the test can be
reworked
Change-Id: Ie4a15c2a018bbd8e931b06b6700d10b3be86e410
This will allow it to be installed with the ROCm suite,
and centralize things a little bit more
Also update run_kfdtest.sh to reflect the changes
Lastly, remove "die" reference as compute_utils.sh
may not be packaged with KFDTest
Change-Id: I4c30cd29979192496419e71e3685937d7417f739
Tests run in the order in which they are linked. Currently that order
is non-deterministic. Listing source files in the Makefile explicitly
makes the order deterministic.
The order chosen runs basic tests before more advanced tests before
stress tests.
Change-Id: I5bc032bcd589f92a51db36acb518bb4d8ef778d3
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
when variable interval become zero, the loop of while (timeConsumption >= interval)
will be a infinite loop. The fix is to avoid that case.
Change-Id: I8fd07296925300bace5ab7d3da86482b6d8b0d03
Signed-off-by: Eric Huang <JinhuiEric.Huang@amd.com>
Check for errno == EBADF in kmtIoctl to detect misuse of the kfd_fd
in a forked child process.
Detect being in a forked child process pro-actively by implementing
a pthread_atfork callback.
Make sure all mutexes get reinitialized in the child process to avoid
deadlocks.
Check for being in a forked child process in CHECK_KFD_OPENED so that
all hsaKmt functions will return the appropriate status
HSAKMT_STATUS_KERNEL_IO_CHANNEL_NOT_OPENED.
Update InvalidKFDHandleTest to expect that error code.
Change-Id: I0238e5fba344dcaa454e97a35db2e2dcc8d1f607
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
After XGMI SDMA queues were separated from regular SDMA queues, they
were not covered in the current tests. Add tests for them now.
Change-Id: I036e3ca5d583ab7f022a9dc6cda3ef867f4773a0
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
On gfx1012, allocating 1/4 of the system memory on a 32G RAM machine
could fail, resulting in this test to fail. Limit the maximum buffer
to allocate to be smaller than 3G to accommodate this situation.
Change-Id: I38b0a0f7da1f0b9ca851e04d2d0a51767858c801
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
NumCpQueues and NumSdmaQueuesPerEngine should be got by kfd driver not hardcode.
So add two data fields in HsaNodeProperties then thunk is able to get it from sysfs
that exposed by kfd.
v2: change NumCpQueues/NumSdmaQueuesPerEngine to one byte.
v3: merge two commits as one to avoid ABI update two times.
Change-Id: Ie386e4685f13493e22db6e207a399db6a4c5b9dc
Signed-off-by: Huang Rui <ray.huang@amd.com>
The shader supports multiple work items. It also eliminates one input buffer.
Change-Id: If0596b306065980b74fb92613e95610defc00164
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
The initial baseline measurements are proving inconsistent, which
results in the test failing more often with different variant rates
Change-Id: I1f4e04bf7d615cf39de9605bd5141a997b22cdfc
The old names are not accurate enough and we rename them according to
their corresponding fault types.
Change-Id: Icf4d52ba0ab9d49af5d912a0feb82665b1e8d344
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
The InvalidPPR* tests are only useful for gfx801 right now, on which
they won't trigger exceptions. So they are not relevent in the
KFDExceptionTest category. In addition, given AccessPPRMem already tests
the PPR memory functionality, we can just delete those two tests.
Change-Id: Id5c6e23c4c0ce47a4f04e9e1f0fa9083e0a9d0e0
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
This puts all CP and SDMA queues in a single test, which is
currently missing.
Change-Id: I98bf58df1be65fe9daf6311c016a48569a8ab674
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
To keep normal performance, we have to use symmetrical cu masks
based on shader engines. So change baseline from 1 cu to 1 cu
per SE.
Change-Id: I9e83a87fb670bb406f7983714fa0d8ab673609eb
Signed-off-by: Eric Huang <JinhuiEric.Huang@amd.com>
This will help us triage the unexpected hangs on the farm systems.
Meanwhile, simplify the logic.
Change-Id: Ie50b97a34cb86891720dce11f2d178bff9aa2cd5
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
adds api and test to get newly create queue snapshot per ptraced process.
Change-Id: Ife97123a5b930e837ccaa386801145ef23c2cc2c
Signed-off-by: Jonathan Kim <Jonathan.Kim@amd.com>
SetUpTestCase() and TearDownTestCase() are declared as protected,
preventing us from using TEST_P().
Change-Id: I1d049a475a1b3bd44b5f96305a48751b90d572ce
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
The previous BigBufferStressTest has too much stuff and takes a long
time to run. By separating largest*BufferTest out into other
tests, we dramatically reduce the time to run BigBufferStressTest and
therefore make reproducing issues much easier.
Meanwhile, rename the test to BigSysBufferStressTest to express more
information.
Change-Id: I5911f113c0bd50627ee6d84bbb4f2972cbed8886
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
In order to accommodate the flaky queue submission under memory
shortage scenarios, BigBufferStressTest has become very much a hack,
undermining its purpose of testing the basic memory related operations.
Therefore, remove the queue submission part. The EvictTest should serve
the purpose of testing the memory and queue submission functionalities
when memory eviction happens.
Change-Id: I3c3603a0e834267eccb72f46efeabe1e053c8fc5
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
v2: Remove useless AcquireMem packet after the dispatch
v3: Minimum poll_interval is 4
Change-Id: I352eb21c781ed9e03d62c0febd532da6a9854afa
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
v2: optimize_ace_offload_mode=1, recommended by firmware team
Change-Id: Ia54e37242b4eaaf631c35e61a59f03ee0f85ca35
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
This patch adds the support for gfx90c apu. So far we treat it as "dgpu" and
gfx900. Will update hsa gfxip table while the isa/llvm is implemented on gfx90c.
Change-Id: I6ef164bf3e751fe6dd6287cac212a500dce84b1a
Signed-off-by: Huang Rui <ray.huang@amd.com>
The test actually tested all available SDMA queues, so change the name
to reflect the fact.
Change-Id: Ia23df3e5ac79b692b0b60194b05603ba8dd897a4
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
If NUMA system no available memory on node 0, mbind will fail on node
0, so set flag NoNUMABind=1 to bypass mbind for all test cases which use
node 0 and allocate system memory.
Change-Id: I7962938ad2bed5a293ca5e6a8500c7f7e15ff453
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
This can be used for allocating space in the IB for write-back data
in a NOP-packet with a payload.
Change-Id: I6202b89a455a65326366a15291789004dfdcc0b9
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>