Commit Graph

722 Commits

Author SHA1 Message Date
Eric Huang d6fcfcdccf kfdtest: add function to determine XGMI link to cpu
Signed-off-by: Eric Huang <jinhuieric.huang@amd.com>
Change-Id: I7650f7857f0eecd2ad587634ae11c1cf5116bd97


[ROCm/ROCR-Runtime commit: 198b5bd450]
2021-02-23 12:20:29 -05:00
Jonathan Kim 480618489e libhsakmt: add host trap send
Adding host trap send command.

Signed-off-by: Jonathan Kim <Jonathan.Kim@amd.com>
Change-Id: I291c13f5905e00bc6685a980284a6abd0c98da78


[ROCm/ROCR-Runtime commit: f398d6d204]
2021-02-23 12:20:29 -05:00
Oak Zeng b1a9306ece Add gfx90a Gopher LSE DID (0x54)
Change-Id: Ic0a1e3d01373e0d6ba58e42188dced394423de82
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>


[ROCm/ROCR-Runtime commit: 97ae33f9de]
2021-02-23 12:20:29 -05:00
Mukul Joshi 34283684d0 Update build script for SP3 static library
Update build script and CMakeLists_sp3.txt file as SP3 directory
structure has changed.
The SP3 source code with gfx90a suport is merged into a
new branch mukjoshi/sp3_gfx90a.
Please make sure to checkout this branch before using the
build script to generate the static library.

Change-Id: I2bf0ade8b2d254cd7648cc8a6d69a83ee51344cd


[ROCm/ROCR-Runtime commit: da3abfb0f8]
2021-02-23 12:20:29 -05:00
Amber Lin 8d96c2c71f libhsakmt: Add device ID used in Simnow
Simnow simulator uses 0x7400 as gfx90a's device ID

Signed-off-by: Amber Lin <Amber.Lin@amd.com>
Change-Id: I0022509ef643760bc906e537b4fc64f1523fd8bf


[ROCm/ROCR-Runtime commit: 8c6dd3cbae]
2021-02-23 12:20:29 -05:00
Mukul Joshi 2efdaf30a2 Add SP3 assembler support for gfx90a.
Add updated SP3 static library with support for gfx90a and
also add initial corresponding changes in kfdtest.

Change-Id: I71bc6404ace7f9bf0dd74e712287136aa2b8a03d


[ROCm/ROCR-Runtime commit: c861873dae]
2021-02-23 12:20:29 -05:00
Yong Zhao b1f7193ce6 kfdtest: Add a simple test case to test local memory
Given the chance of local memory breakage is so high on emulators, we
should use this simple test to check the local memory function.

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


[ROCm/ROCR-Runtime commit: 690a148427]
2021-02-23 12:20:29 -05:00
Yong Zhao 2e9e7996e8 kfdtest: Fix a path error in CMakeLists.txt
PKG_CONFIG_PATH environment variable should be set to
<rocm_path>/lib/pkgconfig, because the *.pc file is located there.

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


[ROCm/ROCR-Runtime commit: 33c34506fa]
2021-02-23 12:20:29 -05:00
Yong Zhao 9fe4716bd9 kfdtest: Move the package definitions to the beginning in CMakeLists.txt
This ensures that similiar logic stays together.

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


[ROCm/ROCR-Runtime commit: 87f62056f1]
2021-02-23 12:20:29 -05:00
Eric Huang 9f7ae5b9e2 libhsakmt: add new flag for memory mapped as uncached
It is to provide an option to map specific memory as
uncached on A+A HW platform.

Signed-off-by: Eric Huang <JinhuiEric.Huang@amd.com>
Change-Id: Ib665cb306a0e78aba3ea5ee2f0e46cb62ae139f8


[ROCm/ROCR-Runtime commit: 2464bfc714]
2021-02-23 12:20:29 -05:00
Yong Zhao 61cb037044 kfdtest: Improve the message when CWSR basic test does not pass
This will give out more info.

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


[ROCm/ROCR-Runtime commit: 8881075ab2]
2021-02-23 12:20:29 -05:00
Yong Zhao b0c2b6c429 kfdtest: Support gfx90a
Change-Id: I879ea534729e7adca4892be897dc86f6153aa190
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>


[ROCm/ROCR-Runtime commit: 51b6bcf40d]
2021-02-23 12:20:29 -05:00
Yong Zhao f27f933e53 Program mmCOMPUTE_PGM_RSRC3 on gfx90a
Change-Id: If387d137ebd388f5aea930a5f7bca3413dcbfcce
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>


[ROCm/ROCR-Runtime commit: be09658247]
2021-02-23 12:19:42 -05:00
Yong Zhao 9f0c092c5d libhsakmt: Support gfx90a
Change-Id: I1ad594eab093f5aa30143ade4e72f2379c9e3616
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>


[ROCm/ROCR-Runtime commit: 58ca2b745c]
2020-07-07 15:55:28 -05:00
Yong Zhao 430c7be7e0 libhsakmt: Prepare for gfx1030 support
PCI IDs have yet to be added later.

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


[ROCm/ROCR-Runtime commit: 7c74069d6a]
2020-07-07 11:07:14 -04:00
Cole Nelson 86b8707391 libhsakmt: set packaging arch, field separators, vendor info
Change-Id: Ia1392285f5ee0beeaae136ad7d68e1723bc590ba
Signed-off-by: Cole Nelson <cole.nelson@amd.com>


[ROCm/ROCR-Runtime commit: 141246eeeb]
2020-06-30 07:38:14 -04:00
Gang Ba 04e57413f4 Revert "libhsakmt: add Streaming Performance Monitors APIs"
This reverts commit c0a0ada18b.

Reason for revert: Change was submitted by accident

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


[ROCm/ROCR-Runtime commit: fec3780c1a]
2020-06-29 10:54:54 -04:00
Vlad Sytchenko 7bdf69c167 Correctly set CMAKE_MODULE_PATH
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>


[ROCm/ROCR-Runtime commit: 5fb771a195]
2020-06-24 15:47:06 -04:00
Sean Keely c84d389aa2 Add warning about incorrect package names when using CMake 3.5
Signed-off-by: Sean Keely <Sean.Keely@amd.com>
Change-Id: Ie35b287224ec6b963bc317baf60853fbe223fc17


[ROCm/ROCR-Runtime commit: f101875de8]
2020-06-19 20:12:16 -05:00
Eric Huang 8f8307a739 kfdtest: change shader command to avoid compile error for gfx90a
Signed-off-by: Eric Huang <jinhuieric.huang@amd.com>
Change-Id: I531ebac162403cc957802bbcdb34cdc022be3a50


[ROCm/ROCR-Runtime commit: 0003b6d147]
2020-06-17 10:15:12 -04:00
Yong Zhao db028d945b libhsakmt: Improve the comment regarding queue doorbells
The comment failed to convey the fact.

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


[ROCm/ROCR-Runtime commit: 6a762ec717]
2020-06-16 15:16:03 -04:00
Sean Keely 7f35aa9739 Add optional support for the cmake per user package registry.
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>


[ROCm/ROCR-Runtime commit: f0b0555996]
2020-06-11 14:25:57 -05:00
Sean Keely 676e600040 Update to conform with modern cmake best practices.
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>


[ROCm/ROCR-Runtime commit: 06add334b9]
2020-06-11 14:25:41 -05:00
Gang Ba c0a0ada18b libhsakmt: add Streaming Performance Monitors APIs
Signed-off-by: Gang Ba <gaba@amd.com>
Change-Id: I5c23a8dacf9bc50c740908aabe391432f2c7112e
Signed-off-by: Gang Ba <gaba@amd.com>


[ROCm/ROCR-Runtime commit: d675d1cce1]
2020-05-29 09:34:31 -04:00
Joseph Greathouse efe478aed6 Pull out ASIC revision from HSA capability
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


[ROCm/ROCR-Runtime commit: 5ddd8fb68b]
2020-05-22 10:39:13 -05:00
Philip.Cox@amd.com fc181bcdb1 Initial kfd debugger address watch support
Code for new kfd debugger address watch code.
           -- Adding support for:
              -- add address watch
              -- clear address watch

Change-Id: I9b014e7cee03897157b997b9e5b39b6ed403b8e1
Signed-off-by: Philip.Cox@amd.com <Philip.Cox@amd.com>


[ROCm/ROCR-Runtime commit: 0a55f31463]
2020-05-21 13:41:55 -04:00
Felix Kuehling 164749264e libhsakmt: use _Static_assert instead of static_assert
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>


[ROCm/ROCR-Runtime commit: df16950a0c]
2020-05-15 01:34:10 -04:00
Ranieri Althoff a6c3ce5762 Avoid calculating strlen multiple times
Change-Id: Iec66c7d35e5d6cd2deb02c94ee070d0fa1335147
Signed-off-by: Ranieri Althoff <ranisalt@gmail.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>


[ROCm/ROCR-Runtime commit: aa185380f9]
2020-05-13 00:38:26 -04:00
Amber Lin 2aa89d8bf4 libhsakmt: Sync up the ioctl number
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


[ROCm/ROCR-Runtime commit: a37a88ddcb]
2020-05-12 15:06:07 -04:00
Ori Messinger 2956b62f2a Create KFDTest for SDMA Fault
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>


[ROCm/ROCR-Runtime commit: 46f5e83066]
2020-05-11 18:52:35 -04:00
Kent Russell ff59075907 Fix HostAccess flags for XGMI configs in P2PTest
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


[ROCm/ROCR-Runtime commit: dc784ba482]
2020-05-11 11:12:33 -04:00
Jonathan Kim 7740384eab libhsakmt: queue suspend/resume can return non-zero positive values
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


[ROCm/ROCR-Runtime commit: 93c333711a]
2020-05-08 22:10:41 -04:00
Felix Kuehling 38ab5ed98e libhsakmt: Add PROT_NONE CPU mapping for scratch mappings
This is needed to allow gdb to access the memory.

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


[ROCm/ROCR-Runtime commit: e5062c4383]
2020-05-02 15:52:30 -04:00
Kent Russell 606037de2f Make thunk lib type be defined by cmake
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>


[ROCm/ROCR-Runtime commit: ddd38deab7]
2020-04-27 13:52:42 -04:00
Kent Russell 3984277b1a Fix naming conventions again for -dev package
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>


[ROCm/ROCR-Runtime commit: b72bbeac3e]
2020-04-24 08:06:38 -04:00
Jonathan Kim ceb1917610 kfdtest: do not request host accessible memory for P2P tests
Do not request host accessible memory otherwise small-bar XGMI fails.

Change-Id: I6b1e750839ae66a34c85405fa8d0a4aa455399ef
Signed-off-by: Jonathan Kim <Jonathan.Kim@amd.com>


[ROCm/ROCR-Runtime commit: af249159ee]
2020-04-17 23:42:10 -04:00
Felix Kuehling b92235e1a4 kfdtest: Fix problems finding kfdtest.exclude
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>


[ROCm/ROCR-Runtime commit: 8ee763d94a]
2020-04-16 18:23:33 -04:00
Kent Russell b72f1720ef KFDTest: Use SMI for HIGH clocks, if possible
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


[ROCm/ROCR-Runtime commit: 7ee9e01587]
2020-04-16 07:59:33 -04:00
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