3115 Коммитов

Автор SHA1 Сообщение Дата
shaoyunl 677448a6ea Thunk : Add gfx1011 support from thunk side
Change-Id: I6b202b75fc1ad0e69576a35a6a3e499818137e04
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>


[ROCm/ROCR-Runtime commit: a1e399a3ff]
2019-09-25 11:02:33 -04:00
Philip Yang 45d37b9665 libhsakmt: correct number of NUMA nodes calculation
numa_max_node() return the highest node number available on the current
system, number of NUMA nodes should be numa_max_node() + 1.

Change-Id: I20a6c17af071e73e853cb5ea6d0304c8aca52681
Signed-off-by: Philip Yang <Philip.Yang@amd.com>


[ROCm/ROCR-Runtime commit: 71cf3cf5d3]
2019-09-16 16:25:57 -04:00
Philip Yang 88f727ab6e kfdtest: use flag NoNUMABind to allocate system memory
Allocate system memory from node id 0 will fail on NUMA system which has
no memory on node 0. Change to use new flag NoNUMABind to allocate
system memory from NUMA nodes which have free memory.

Change-Id: I8ef9ca28fc2ab5dd31d07a2d3eaf1d5886e798a0
Signed-off-by: Philip Yang <Philip.Yang@amd.com>


[ROCm/ROCR-Runtime commit: 69d8f2d734]
2019-09-16 12:25:01 -04:00
Philip Yang 92dd1072a0 libhsakmt: handle NUMA system with no memory on node 0
on NUMA system, node 0 may have no memory, application pass node id
0 to hsaKmtAllocMemory will fail because mbind to specify the allocation
from node 0 return EINVAL.

Add new flag NoNUMABind for application to pass it to hsaKmtAllocMemory
to skip mbind.

hsaKmtCreateEvent and hsaKmtCreateQueue specify the new flag NoNUMABind
to allocate system memory for event page and CWSR area, don't bind the
system memory to a specific NUMA node.

Change-Id: I854e5a57502c7807c4c5ff2e441d499ae515c309
Signed-off-by: Philip Yang <Philip.Yang@amd.com>


[ROCm/ROCR-Runtime commit: 42392f093f]
2019-09-16 11:30:24 -04:00
Jay Cornwall 27ea6107f8 Disable SDMA HDP flush on gfx10
Not currently functional, triggering SRBM write protection.

Change-Id: Ib0b832357e3df5a6a0d0b46648515ec9bd70f017


[ROCm/ROCR-Runtime commit: 906cd84186]
2019-09-14 14:08:47 -04:00
Jay Cornwall fe6a31ee4e Set MTYPE field in SDMA fence command on gfx10
This is the only SDMA command with an MTYPE field.

Change-Id: Ice146ace9c3e8e7aff038e1e004be73c070f48fe


[ROCm/ROCR-Runtime commit: e0358d7dc2]
2019-09-14 14:07:57 -04:00
Jay Cornwall d597f80b04 Add gfx1010, gfx1011, gfx1012 ELF types to loader
Change-Id: I23a1159fb10f60881ea6830ba13ee73bd373bfc9


[ROCm/ROCR-Runtime commit: 32a9a5dbb0]
2019-09-14 14:07:16 -04:00
Jay Cornwall 933f052033 Implement code cache (SQC I$, SQC K$, TCP, GL1, GL2) invalidation for gfx10
Change-Id: I8b2a59118094fbb55e3f575fa9f79959d3725d7d


[ROCm/ROCR-Runtime commit: 5b64fbd0e5]
2019-09-14 14:06:31 -04:00
Jay Cornwall e729948e41 Add binary shaders for gfx10
Change-Id: Iaf586a15a2f2aebc266da5148aa8637b092c1002


[ROCm/ROCR-Runtime commit: d1c5a079cd]
2019-09-14 14:05:35 -04:00
Chris Freehill e44fecc07c Add gfx10,11,12 old to new name format conversion
Change-Id: I792c840d8d819d1d48f95fc4167b2e25c6beec23


[ROCm/ROCR-Runtime commit: 0afe6618a6]
2019-09-14 10:37:19 -04:00
Jay Cornwall b25eda2db7 Support wave32/wave64 scratch allocations on gfx10
- Use new buffer resource descriptor layout
- Handle wave32 scratch allocation error from CP
- Make wavefront size a property of scratch allocation requests
- Repurpose wave64-specific amd_queue_t.scratch_workitem_byte_size field
- Clear index_stride field in V# on gfx10, calculated per-dispatch by CP

Change-Id: If2acdf6430772abd4d6a8c792fc8c11260764dda


[ROCm/ROCR-Runtime commit: f8d0ccd159]
2019-09-13 17:22:59 -04:00
Philip Yang 0cb538eae8 libhsakmt: fix mbind failed on docker
Docker seccomp by default blocks mbind system call, so mbind return
failed on docker. thunk should not fail this otherwise application
cannot allocate system memory on docker.

Use pr_warn_once and pr_err_once to avoid duplicate same error messages



Change-Id: I61a7c0e4abaa3dcfe7abf2ea48db90f669f9638a
Signed-off-by: Philip Yang <Philip.Yang@amd.com>


[ROCm/ROCR-Runtime commit: 4da09813a3]
2019-09-13 15:01:47 -04:00
Chris Freehill 5fbd73af1d Update addrlib to pull in gfx10
This is mostly un-edited from Perforce. We will make other required
edits in future commits.

Change-Id: I55a809f2f23f03d60e4dcd1fb947ad558e737027


[ROCm/ROCR-Runtime commit: 08841faf4c]
2019-09-13 11:44:23 -04:00
Chris Freehill aad11979eb Make gfx10 use OSS defined packet fields
Change-Id: Icf622c22a17005aaeafb24f80a414319bebb891f


[ROCm/ROCR-Runtime commit: 0ec781478d]
2019-09-13 08:14:24 -04:00
Chris Freehill 547f41e83a Add gfx10 as a target ID
Change-Id: Ib9a78776af9f26ff9278a06b059cb8b7ee216ee2


[ROCm/ROCR-Runtime commit: b104031628]
2019-09-12 20:24:40 -05:00
Chris Freehill f2023220fd Initial support for gfx1010, gfx1011, gfx1012
Change-Id: I9ec398070c85db08aea72947557c6e1b5f7d541d


[ROCm/ROCR-Runtime commit: 6ebdad5896]
2019-09-12 20:24:30 -05:00
Yong Zhao 9093e12693 kfdtest: Automate the gtest filter name generation
This will emilinate the need of updating the run_kfdtest.sh every time
a new platform is added.

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


[ROCm/ROCR-Runtime commit: ec1375ac66]
2019-09-12 15:57:20 -04:00
Sean Keely 286cf8f732 Enable trap handler on APUs.
Change-Id: Ifdc8c2782498b3fbe238d773120d378c47918d07


[ROCm/ROCR-Runtime commit: f2599fccb6]
2019-09-06 18:10:20 -04:00
Sean Keely 9c6f904413 Correct doorbell_queue_map allocation.
doorbell_queue_map should always be allocated or we will need to
add branches around all accesses.

Change-Id: I994c0eaf4be62c1a4a37bd06894272dba1fc1da6


[ROCm/ROCR-Runtime commit: f9d3796db8]
2019-09-06 18:10:20 -04:00
Yong Zhao c3a66a975b kfdtest: Add gfx1012 initial test coverage
Change-Id: I983d4dd6c17b2eaadd5abf4b71e090a14cace303
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>


[ROCm/ROCR-Runtime commit: baa2957895]
2019-09-06 14:42:43 -04:00
Yong Zhao 7f5a93ef2a libhsakmt: Support gfx1012
The gfx version item is yet to be added.

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


[ROCm/ROCR-Runtime commit: 3ecd83e52d]
2019-09-06 14:42:32 -04:00
Yong Zhao fab21d6d81 libhsakmt: Implement HSA_FORCE_ASIC_TYPE to overwrite asic type
Force all the GPUs to a certain type, use the below command:
HSA_FORCE_ASIC_TYPE="10.1.0 1 gfx1010 14"
meaning major.minor.step dgpu asic_name asic_id

This will faciliate the cooperation across the teams for bringing up
ASICs which reuse existing device IDs.

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


[ROCm/ROCR-Runtime commit: d6539ddc24]
2019-09-06 12:12:42 -04:00
Yong Zhao cc050951de kfdtest: Remove useless test cases
Those tests are actually did not function up to its expectation because
some underlying functions such as suspend/resume and disable/enable KFD
were not implemented. Those interfaces would never be implemented, so
delete them.

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


[ROCm/ROCR-Runtime commit: 09d192802a]
2019-09-06 11:12:17 -04:00
Yong Zhao 9b1e0f5a5e kfdtest: Implement SuspendAndWakeUp()
Change-Id: I16384cd0ca35f15841344ded4d4237a0a862a934
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>


[ROCm/ROCR-Runtime commit: 9048fb5a1a]
2019-09-06 11:11:49 -04:00
Christian Sigg c28aadf5a8 Add missing include to lazy_ptr.h
Change-Id: I5b061692a4ec6def631d7c3182e5b644b6b9c519


[ROCm/ROCR-Runtime commit: 00b0ee15b3]
2019-09-05 02:44:27 -04:00
Christian Sigg e17c7e24d6 Change #include of libelf.h from quote to angle.
Change-Id: Ie940ed0f78e95224e42978381c552861e6d58ee4


[ROCm/ROCR-Runtime commit: 1f177cf9c2]
2019-09-05 02:43:54 -04:00
Christian Sigg dea46036d3 Adding missing includes to sdma_registers.h
Change-Id: Idb2a54f45c810508ae0ebac0ca12853df8025c7a


[ROCm/ROCR-Runtime commit: 912c23a6d5]
2019-09-04 20:15:13 -04:00
Felix Kuehling b8c767b42a kfdtest: Use CoarseGrain for VRAM buffers
Change-Id: I320099e61fc8f1012184fc68c248da4e224bc3ca
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>


[ROCm/ROCR-Runtime commit: 01957d4da3]
2019-09-04 14:45:01 -04:00
Felix Kuehling 89999a5a0e kfdtest: Enable more tests on gfx802
A number of tests are no longer broken on gfx802.

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


[ROCm/ROCR-Runtime commit: 8f91d6a222]
2019-08-30 19:06:24 -04:00
Felix Kuehling 36b4574427 libhsakmt: Fix userptr mappings on gfx802
The memory size alignment workaround for a TLB bug on gfx802 was
breaking userptrs because it would attempt to get_user_pages beyond
the end of a VMA. Refine this workaround based on our understanding
of the HW bug. It only affects L2 cacheline allocation, which is
decided by the last page in the cache line (8 entries = 32KB of
address space). Thus aligning memory allocation so that the last
page falls on the end of a 8 entry TLB cache line allows caching
to work correctly.

Imported images require specific alignments. If their size is not
naturally aligned with 8 cache lines, it may have bad TLB cache
performance.

This patch will only have the desired effect if redundant size
padding in KFD is also removed.

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


[ROCm/ROCR-Runtime commit: e320913e9e]
2019-08-30 19:06:24 -04:00
Sean Keely 4edf1a4cf1 Remove sdma ts pool.
sdma end ts must be 256 bit aligned in oss 3.0 and prior.  Using
the ts pool requires copying into the signal and is a significant
performance penalty for small copies.

SharedSignal is 128 bytes due to alignment so can host the end ts.
Move sdma end ts into SharedSignal and remove ts pool and ts copy.

Change-Id: I7899bda36ebc9adcaad1d3a3d2b7a489857cc9e8


[ROCm/ROCR-Runtime commit: ec5ac95dce]
2019-08-29 20:24:05 -05:00
Craig Andrews 921aa5a7ea hsakmt-dev should not install linux kernel headers
hsakmt-dev should not install include/linux/* (currently just kfd_ioctl.h)
as those are linux kernel headers provided by the linux kernel header
packages (`linux-headers-*` on Debian/Ubuntu or `kernel-headers-*` on
Red Hat / Fedora)

Change-Id: Ib6e62ca2f3582c5ad7351225f5827081bf8e05c0
Signed-off-by: Craig Andrews <candrews@integralblue.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>


[ROCm/ROCR-Runtime commit: ec1461b84b]
2019-08-29 19:22:47 -04:00
Craig Andrews 937aa8b047 Install libhsakmt.pc to the standard location
pkgconfig files should be installed to /usr/share/pkgconfig/, not /usr/libhsakmt/

Change-Id: Ifd08f612addb375de1d00282ee9e7c257528bf74
Signed-off-by: Craig Andrews <candrews@integralblue.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>


[ROCm/ROCR-Runtime commit: eebbb5a0ea]
2019-08-29 19:22:47 -04:00
Craig Andrews 5e89b20d6d Install LICENSE.md to DOCDIR
LICENSE.md should be installed to the DOCDIR, not /usr/libhsakmt

Change-Id: I2020547b3174b9d91c1f800d9db2d73f627a6ce3
Signed-off-by: Craig Andrews <candrews@integralblue.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>


[ROCm/ROCR-Runtime commit: 6c9a49076a]
2019-08-29 19:22:47 -04:00
Felix Kuehling 2883133015 kfdtest: Use hsakmt header files from source tree
Instead of the installed hsakmt header files, use the ones from the
source tree, since they are in the same git repository. This allows
using kfd_ioctl.h even when we don't install this file with an
upcoming change.

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


[ROCm/ROCR-Runtime commit: 8f9f9a47ff]
2019-08-29 19:22:47 -04:00
shaoyunl ba6ea018b3 KFDTest: Add gfx1010 support in KFDTest script
Change-Id: I3c7132c73c68139677259aa57ea0b443ed664c14
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>


[ROCm/ROCR-Runtime commit: c7a946dd5d]
2019-08-29 18:59:15 -04:00
Lad, Aditya 7b73909a5a Support for SLES on thunk
Made changes in the CMakeLists.txt
1) Detects the OS of the system
2) Accordingly setsup the runtime dependencies

Change-Id: Ief9a0217caae77d4be4850167e2a9b8387f639e4
Signed-off-by: Lad, Aditya <aditya.lad@amd.com>


[ROCm/ROCR-Runtime commit: cabebaa091]
2019-08-29 14:06:55 -04:00
Sean Keely b66e58a053 Allow default kernel to spin freely at first.
Impacts GPU_ONLY signal type latency when waiting for small operations.
Using this type improves total SDMA small copy performance by ~40% if
the signal is allowed to spin freely.

Change-Id: I27aa128c63a1bacb3f51fb08f166e4e1d6fef651


[ROCm/ROCR-Runtime commit: 5adb73fffd]
2019-08-29 02:46:56 -05:00
Sean Keely 919e5dc802 Correct copy completion signal handling.
Remove agent lookup in time stamp translation for IPC signals.  The copy
agent handle is not shared so does not need to be checked for cross
process use.  Cross process copy-timestamp read is illegal and continues
to deliver garbage.

Store the copy agent properly when doing CPU-CPU copies.

Change-Id: Ib4008f66ff866922047749dd556c84a32021c1fd


[ROCm/ROCR-Runtime commit: ea8c99f452]
2019-08-29 02:46:56 -05:00
Sean Keely e00fc1b0a2 Enable HDP flush for all gfx9+ clients.
ucode versions are per asic so not valid for feature enablement outside
of bringup/dev.  Feature is older than the latest ioctl change that
the thunk depends on so use of this patch with kernel packages that
don't contain the feature is not possible in a supported environment.

Change-Id: I36b14176a7d642017ef1518aeade454b0f3dc749


[ROCm/ROCR-Runtime commit: 8133563a93]
2019-08-29 02:46:56 -05:00
Sean Keely 92575fd1c5 Allow concurrent copies in blit kernel path.
Also removed an unnecessary cache flush in dependency barrier packet.

Change-Id: I573df3bdf0a10df0bcd78025672c44038f8091ff


[ROCm/ROCR-Runtime commit: 4647a5454d]
2019-08-29 02:46:56 -05:00
Jack Zhang 878819e428 add device ID for gfx908 VF
SRIOV: Fix issue that kfdtest cannot
detect gfx908 VF inside VM.

Change-Id: Ie05fd66d4e14b47818fddbe404df1059567b76a2
Signed-off-by: Jack Zhang <Jack.Zhang1@amd.com>


[ROCm/ROCR-Runtime commit: 545ca6263f]
2019-08-29 15:29:34 +08:00
Yong Zhao b4fa91b983 libhsakmt: Improve the confusing code
The code tends to confuse readers. Improve it.

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


[ROCm/ROCR-Runtime commit: dbe9af7777]
2019-08-28 18:43:24 -04:00
Kent Russell 2fc7cb6a62 topology: Fix compile warnings regarding snprintf and path
snprintf throws a warning from -Wformat-truncation where the string
could be truncated. We address this by referencing the maximum size that
can be returned from a file according to MAXNAMLEN . This should safely
guard us from truncating the path value.

Change-Id: If1d208990d8775e9494835b0deb890d2616fd15b
Signed-off-by: Kent Russell <kent.russell@amd.com>


[ROCm/ROCR-Runtime commit: ccac07cb14]
2019-08-27 11:06:06 -04:00
Sean Keely 1ce4bebec2 Initialize dirp in topology_create_temp_cpu_cache_list to NULL.
Avoids uninitialized use in early exit (error) paths.

Change-Id: I5fb24863f0a5da48776608d47f25e1c8d8aafe35


[ROCm/ROCR-Runtime commit: 8ab8b14902]
2019-08-27 00:37:05 -05:00
Amber Lin 98604d9885 libhsakmt: get cpu cache info from sysfs
Replace cpuid call with sysfs data to get CPU cache information. With this
change, x86 check is also removed since sysfs applies to other platforms.
CPU cache information can be retrieved from
/sys/devices/system/node/nodeX/cpuY/cache where Y is processor number
represented in /proc/cpuinfo at "processor" entry.

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


[ROCm/ROCR-Runtime commit: 4fa930af5a]
2019-08-26 14:52:01 -04:00
Ramesh Errabolu 08e994db50 Initial support for xgmi sdma queues
Change-Id: I1aee379c7b9eede5f4b913cf2f9af3abb32e5baa


[ROCm/ROCR-Runtime commit: 8864c188b4]
2019-08-24 02:03:37 -04:00
Sean Keely 5e5b7fac71 Correct ROCr library path in rocrtst.
Change-Id: I3624f37e256a0b61f55b1eb1ae48dabd87481b5f


[ROCm/ROCR-Runtime commit: 324e0e5e0a]
2019-08-23 19:29:30 -04:00
Sean Keely 5df1a8ae77 Report PCIe domain number.
Adds HSA_AMD_AGENT_INFO_DOMAIN.

Change-Id: I2ffcae474e18b2fe5f962b499e02eb9dfe2e62cd


[ROCm/ROCR-Runtime commit: f343f6706e]
2019-08-23 19:28:37 -04:00
Ramesh Errabolu 61b9d4e8b2 Update memory allocation guide in using pool apis
This is to allow allocations in system memory that exceed sizes
reported by a CPU device

Change-Id: I3d10d192aafcefbe4107f69b7c5e30bf7f836619


[ROCm/ROCR-Runtime commit: 3201f68f72]
2019-08-23 14:55:40 -04:00