IPC memory was previously returned as HSA_POINTER_ALLOCATED and
had garbage in the node_id field. Due to ROCR_VISIBLE_DEVICES
we need to be able to distinguish between imported memory and
regular memory because imported memory may not be owned by an
agent that is visible in the process. Differentiating these flags
allows the users to expect null agent for the owning agent.
Fixes
Change-Id: Ide3489cec1ee2072dc9697fa5cb71ddb17999d14
The name changed and thus will end up throwing errors if an upgrade is
done, compared to a plain install
Change-Id: Ibc7876a66a414034a00f924cdd750e6a08d6c9cc
From Thunk spec, flag NoSubstitute = 0, if specific memory type is not
available on node, allocation may fall back to other memory that can
replace it on that node. mbind return failure if no memory available on
the specific node, we should ignore the mbind failure for this case.
Change-Id: I651a1bedf1852330604e56965cc17862403ebf87
Signed-off-by: Philip Yang <Philip.Yang@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>
Attribute optimize(0) doesn't appear to be helpful helpful. This
prevents optimization in the function but not at call sites to the
function. The function may still be inlined since it has no side
effect (in some cases that we currently don't support).
Having a side effect prevents a call site optimization that allows
removal of a noinline function call with no side effect. Call site
optimization should only happen (in GCC at least) when using whole
program optimization so this may be stronger than we strictly need.
Also added _amdgpu_r_debug to the exported symbol list (global) and
switched to the standard macro for an exported symbol (HSA_API).
Without being in the global list the debugger will not find this
symbol if the binary has been stripped.
Change-Id: Ieb00175ccc55fda4491deee44711cd55b3f24aeb
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>
Adding patch number based on ROCM build/release to have unique
file name for libraries across multiple versions of ROCM.
Signed-off-by: Pruthvi Madugundu <pruthvi.madugundu@amd.com>
Change-Id: I58d665b0e7d577b5bd7a6000d1202a0242672727
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>
CMake 3.6.0 and older don't have CPACK_RPM_FILE_NAME support, so make
the packaging simpler by checking the OS. If it's Ubuntu, call the dev
package hsakmt-roct-dev, otherwise call it hsakmt-roct-devel, since
Ubuntu is the only officially-ROCm-supported deb-based OS, and
deb-based dev packages end with -dev (while rpm-based use -devel)
Change-Id: If75324f82f507c3b312bb6176c06643d521ccb68
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>
Lack of cache controls only allow operating SDMA at
agent scope. All copy APIs are defined at system scope so may
result in data errors.
Change-Id: I9cd10007defddcbf8feb14a2e3daa1ba17c0489f
The initial baseline measurements are proving inconsistent, which
results in the test failing more often with different variant rates
Change-Id: I1f4e04bf7d615cf39de9605bd5141a997b22cdfc
Instead of letting CPack generate the filename according to
CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME},
set the package name ourselves. Also take the change to fix the name of
hsakmt-dev to hsakmt-devel for RPM, since that's their convention
Previous packaging format:
hsakmt-roct-1.0.9-229-g2144854-Linux.deb
hsakmt-roct-1.0.9-229-g2144854-Linux.rpm
hsakmt-roct-dev-1.0.9-229-g2144854-Linux.deb
hsakmt-roct-dev-1.0.9-229-g2144854-Linux.rpm
New format:
hsakmt-roct-1.0.9-292-gc66f8cf.x86_64.deb
hsakmt-roct-1.0.9-292-gc66f8cf.x86_64.rpm
hsakmt-roct-dev-1.0.9-292-gc66f8cf.x86_64.deb
hsakmt-roct-devel-1.0.9-292-gc66f8cf.x86_64.rpm
Change-Id: I4fc4e0fd2eafd25669c1cfffb39860e25a0b645c
Signed-off-by: Kent Russell <kent.russell@amd.com>
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>
Queues should transition to ref counting for all queues eventually.
That cleanup will be part of shared queue pooling support.
Change-Id: I217ff5d573156678b9559da6fb81baa8cd31c617
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>
Temporary workaround for 2.10 release. RCCL, compiler, or firmware
must be corrected and this code reverted before another ASIC release.
Change-Id: I27851353289b93df9acb72d28b8c6ccb9f7f7d7a
We should be using bin/clang, not the build/lightining/bin/clang since
build/ is the project's internal build directory. This patch corrects
this where possible.
However, lightning does not install all it's end user files under out/
so some headers can not be found anywhere in out/ in an incremental build.
This header (opencl-c.h) if fetched out of the lightning source tree if
necessary.
Change-Id: I083d8b27bb39dd615fba3bb0711a789318f95e77
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>