Graf commitů

684 Commity

Autor SHA1 Zpráva Datum
Srinivasan Subramanian 08ae75cfca libhsakmt: check ret and errno for EBADF
Change-Id: I9fcbf955d8b7b01ff1025534a8c2eaa8e6790565
Signed-off-by: Srinivasan Subramanian <srinivasan.subramanian@amd.com>


[ROCm/ROCR-Runtime commit: 5e35364838]
2020-04-15 20:55:40 -04:00
Sean Keely bbb15f8992 Correct initial kfd_open_count increment.
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


[ROCm/ROCR-Runtime commit: 884fed4f04]
2020-04-03 21:05:07 -04:00
Jon Chesterfield ffadc0c8c6 Replace libpci with new parser.
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>


[ROCm/ROCR-Runtime commit: 0a1718b753]
2020-03-20 17:50:47 +00:00
Jeffrey Poznanovic c90e8c1389 Added CentOS-6 mods to support manylinux2010
Change-Id: I8c303ccfdc7d314d1b4609ed6181d46795ada621


[ROCm/ROCR-Runtime commit: 5dcd49f726]
2020-03-20 08:47:25 -04:00
Divya Shikre 24a2a3295c kfdtest: Provide Unique ID information.
Signed-off-by: Divya Shikre <DivyaUday.Shikre@amd.com>
Change-Id: I9a837a3d1ab38f5ad05673406874d862c9e97541


[ROCm/ROCR-Runtime commit: 96259b5830]
2020-03-18 15:55:59 -04:00
Sean Keely 5149a527d7 Handle EBADF when KFD file handle is still open.
Signed-off-by: Sean Keely <Sean.Keely@amd.com>
Change-Id: I23d6c87d5729f57c261030c6baeff4c977eef934


[ROCm/ROCR-Runtime commit: 9efefe6d52]
2020-03-11 18:52:19 -05:00
Divya Shikre b54a23f31a libhsakmt: Expose device Unique Id
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


[ROCm/ROCR-Runtime commit: ebe7de1f99]
2020-03-10 10:06:11 -05:00
Yong Zhao fbec350744 kfdtest: Print a message when there is no GPU
This helps the user to troubleshoot the problem.

Change-Id: If6cf42c488097011285252a6c722d3d74c0f7ce7
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>


[ROCm/ROCR-Runtime commit: 4e7b2f2e27]
2020-03-04 15:00:47 -05:00
Yong Zhao 8769cf0d20 kfdtest: Delete MULTI_GPU usage in run_kfdtest.sh
It is obsolete.

Change-Id: Ifd137ce1ce8d9133cfa5c8bfd46aaeea461b5aa7
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>


[ROCm/ROCR-Runtime commit: 0e5c4d83e6]
2020-03-04 15:00:47 -05:00
Yong Zhao d3cb9399ca kfdtest: Clean up KFDEvictTest
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>


[ROCm/ROCR-Runtime commit: 7a852be42e]
2020-02-13 15:42:04 -05:00
Yong Zhao a139e04896 kfdtest: Adapt the CWSR test for emulators
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>


[ROCm/ROCR-Runtime commit: 21cda69ba9]
2020-02-13 11:35:37 -05:00
Kent Russell 0251b4b0e2 Remove RegisterForeignDeviceMem test code
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


[ROCm/ROCR-Runtime commit: 0d4c209552]
2020-02-13 10:04:01 -05:00
Sean Keely 83fd02c6f7 Update analysis_memory_exception to recognize shared memory.
Add type HSA_POINTER_REGISTERED_SHARED printing.

Change-Id: Ic0400a097ebabde4f035b57fbca4cca12428fc97


[ROCm/ROCR-Runtime commit: e66818e4d3]
2020-02-12 21:51:53 -05:00
Kent Russell 0d0255f6d5 Add DEB/RPM packaging for KFDTest
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


[ROCm/ROCR-Runtime commit: a360c68b0c]
2020-02-11 13:53:09 -05:00
Harish Kasiviswanathan 8b97e62fdc libhsakmt: Child process can reacquire system props
If child process explicitly calls hsaKmtReleaseSystemProperties(), it
fails. Allow child process to release and acquire system properties.



Change-Id: I649a4600212711b2ad4474f605f3ca39a4003d03
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>


[ROCm/ROCR-Runtime commit: 31530da7c6]
2020-02-06 15:09:39 -05:00
Felix Kuehling 986f8ec924 kfdtest: List source files explicitly
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>


[ROCm/ROCR-Runtime commit: 6b8095184f]
2020-02-05 14:34:53 -05:00
Sean Keely 619acf4f75 Update pointer info to include IPC memory.
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


[ROCm/ROCR-Runtime commit: 6957202df8]
2020-02-05 01:55:39 -06:00
Kent Russell 67726d2c2a Fix upgrade for new package name in RPM
The name changed and thus will end up throwing errors if an upgrade is
done, compared to a plain install

Change-Id: Ibc7876a66a414034a00f924cdd750e6a08d6c9cc


[ROCm/ROCR-Runtime commit: f2b8965d7b]
2020-01-31 10:41:35 -05:00
Yong Zhao 3d827edb27 kfdtest: Enable some tests on gfx1xxx series
Those tests are currently all passing.

Change-Id: I233afe33e8275d482bab5b5590b856fce49af76d
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>


[ROCm/ROCR-Runtime commit: 4f2ff25a3d]
2020-01-29 21:23:05 -05:00
Philip Yang 553463578f libhsakmt: Ignore mbind failure if flag NoSubstitute = 0
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>


[ROCm/ROCR-Runtime commit: 5858aa17a9]
2020-01-27 13:27:37 -05:00
Eric Huang 48b44a5b6f kfdtest: fix infinite loop in sdma multicopy
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>


[ROCm/ROCR-Runtime commit: 634b30119a]
2020-01-23 14:54:23 -05:00
Felix Kuehling 2e3ae4b983 libhsakmt: Improve error handling in child process
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>


[ROCm/ROCR-Runtime commit: 87e10cd0b4]
2020-01-20 18:01:21 -05:00
Yong Zhao 3712ff7ddb kfdtest: Add basic tests for XGMI SDMA queues
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>


[ROCm/ROCR-Runtime commit: fe97612800]
2020-01-10 15:32:12 -05:00
Srinivasan Subramanian e003ef836a Use runpath instead of rpath for libraries
enable-new-dtags option is added

Change-Id: I1f406b3f30ddc6491aad3ef7a84dfd415917b1aa
Signed-off-by: Freddy Paul <Freddy.paul@amd.com>


[ROCm/ROCR-Runtime commit: 5c2fc61d95]
2020-01-09 18:05:57 -05:00
Pruthvi Madugundu 19c6d8094f support installtion of multiple ROCM version
Changes to resolve
1) Multiple rocm release installation support
2) Multiple rocm shared lib conflicts

Change-Id: I792feb36cdf4516d108f1ef71abe0c87522f018a
Signed-off-by: Pruthvi Madugundu <pruthvi.madugundu@amd.com>
Signed-off-by: Freddy Paul <Freddy.paul@amd.com>


[ROCm/ROCR-Runtime commit: 3f8a07e460]
2020-01-09 18:05:24 -05:00
Yong Zhao 9fc1362ddc kfdtest: Improve the stablility of SignalHandling test
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>


[ROCm/ROCR-Runtime commit: 2b70d73f68]
2020-01-07 17:28:57 -05:00
Kent Russell c03aa3a429 Fix package naming without using newer variables
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


[ROCm/ROCR-Runtime commit: 1589cf5dc5]
2020-01-06 09:21:58 -05:00
Oak Zeng 1304a3eab1 Fix GWS test function call parameter issue
Change-Id: I3f4fde9ec8268362cffecb2d95177913b583486f
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>


[ROCm/ROCR-Runtime commit: 38b429fd52]
2020-01-06 08:11:49 -05:00
Huang Rui cc2162d8e9 libhsakmt: add NumCpQueues and NumSdmaQueuesPerEngine data field (v3)
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>


[ROCm/ROCR-Runtime commit: 06464b917d]
2020-01-03 23:27:42 -05:00
Oak Zeng 22b5e2b003 Add KFD GWS test
Change-Id: Ie90d9119da6cee41ddab10deb427d4ae9fd9a16b
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>


[ROCm/ROCR-Runtime commit: af7feb93db]
2020-01-03 15:19:56 -05:00
Yong Zhao e737a133a1 kfdtest: Rework the shader used for CWSR test
The shader supports multiple work items. It also eliminates one input buffer.

Change-Id: If0596b306065980b74fb92613e95610defc00164
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>


[ROCm/ROCR-Runtime commit: facb6c056d]
2020-01-02 16:05:01 -05:00
Yong Zhao 65757c59a2 libhsakmt: Add the perf counter support for gfx1012
Change-Id: I55d68a77928617edaabd33ae0807bf23f739c8de
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>


[ROCm/ROCR-Runtime commit: 22e9ef7303]
2019-12-18 20:49:36 -05:00
Yong Zhao 34fc89e397 kfdtest: Enable KFDExceptionTest on gfx906 and gfx1xxx series
KFDExceptionTest on those platform is passing.

Change-Id: I328ee4fd4ff5b339e560f2f79e754fd34459210a
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>


[ROCm/ROCR-Runtime commit: 44db5cb011]
2019-12-18 17:48:16 -05:00
Kent Russell 10134bbdd2 kfdtest.exclude: Remove BasicCuMaskingEven from gfx908
The initial baseline measurements are proving inconsistent, which
results in the test failing more often with different variant rates

Change-Id: I1f4e04bf7d615cf39de9605bd5141a997b22cdfc


[ROCm/ROCR-Runtime commit: 8b14ea2e83]
2019-12-18 14:24:53 -05:00
Kent Russell c463d39ddc Set package name explicitly
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>


[ROCm/ROCR-Runtime commit: 57b42045d0]
2019-12-18 12:21:33 -05:00
Yong Zhao a67ef3e675 kfdtest: Rename two exception test cases
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>


[ROCm/ROCR-Runtime commit: f7c0172385]
2019-12-17 19:46:33 -05:00
Yong Zhao 674f8030a5 kfdtest: Delete two useless exception tests
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>


[ROCm/ROCR-Runtime commit: 1c2c5a7b9a]
2019-12-17 19:37:14 -05:00
Yong Zhao e1d0cd53d8 kfdtest: Add AllQueues test
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>


[ROCm/ROCR-Runtime commit: 10ffc63d7b]
2019-12-17 19:25:14 -05:00
Eric Huang d49fbe2475 kfdtest: change baseline in BasicCuMaskingEven
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>


[ROCm/ROCR-Runtime commit: caa744944e]
2019-12-11 14:48:55 -05:00
Yong Zhao ee8ab015dd kfdtest: Add some logs to Atomics test
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>


[ROCm/ROCR-Runtime commit: 8f140fc03d]
2019-12-02 12:56:03 -05:00
Jonathan Kim efef21f4ff add queue snapshot test
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>


[ROCm/ROCR-Runtime commit: 8b01a1c4c5]
2019-12-02 11:56:04 -05:00
Yong Zhao 8feaf7585f kfdtest: Declare SetUpTestCase() to be public
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>


[ROCm/ROCR-Runtime commit: ad76ffd544]
2019-12-02 11:38:18 -05:00
Oak Zeng 6cb65e8c37 Support XGMI optimized SDMA queue
Change-Id: I6ad62fc94a9838df505879b1ddaccfeb9881a6e8
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>


[ROCm/ROCR-Runtime commit: 0b71bbb787]
2019-11-26 21:42:47 -05:00
Yong Zhao c8eb45a5fa kfdtest: Merge the two largest buffer test helper functions
This is cleaner.

Change-Id: I7740f3e0f93a63b35fefc3cb69712dfad68df552
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>


[ROCm/ROCR-Runtime commit: 4daa25fceb]
2019-11-25 18:45:23 -05:00
Yong Zhao 53c9d60035 kfdtest: Split BigBufferStressTest into two smaller tests
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>


[ROCm/ROCR-Runtime commit: b6cefa7bda]
2019-11-25 18:28:17 -05:00
Yong Zhao 44d016bc49 kfdtest: Remove the queue submission in BigBufferStressTest
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>


[ROCm/ROCR-Runtime commit: cbe21fa261]
2019-11-25 18:25:23 -05:00
Felix Kuehling d89c9c1f64 kfdtest: Change PM4 dispatch to workaround GWS-related FW problem
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>


[ROCm/ROCR-Runtime commit: 8afdf52001]
2019-11-15 15:27:21 -05:00
Felix Kuehling 1ff1d4418d kfdtest: Add PM4WaitRegMemPacket
v2: optimize_ace_offload_mode=1, recommended by firmware team

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


[ROCm/ROCR-Runtime commit: 0b7fcadc63]
2019-11-15 15:27:21 -05:00
Yong Zhao 471f9cf127 kfdtest: Expand KFDQMTest.MultipleCpQueues to cover all CP queues
Because of that, rename the test to AllCpQueues.

Change-Id: I57105f863db2558e850c703d151ffebcce2c7a17
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>


[ROCm/ROCR-Runtime commit: a4d570fa2b]
2019-11-15 08:25:14 -05:00
Huang Rui d0c78bf4d5 libhsakmt: add gfx90c support for thunk
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>


[ROCm/ROCR-Runtime commit: fdba74c2fb]
2019-11-14 20:02:53 -05:00