Grafico dei commit

741 Commit

Autore SHA1 Messaggio Data
Felix Kuehling d8ded1fa6e Revert "libhsakmt: optimize system memory allocation"
This reverts commit 35b07e1e28.

Reason for revert: This commit caused a regression rocrtst memory
subtest: Maximum Single Allocation in Memory Pools failed.


Change-Id: I15330625603f893200a08cd8b5b097f9bf95361f


[ROCm/ROCR-Runtime commit: e515fd818b]
2020-11-03 12:19:56 -05:00
Jeremy Newton a803c56889 kfdtest: Use ldflags for drm
This fixes a build issue with kfdtest and the amdgpu pro driver build.

This was requested as kfdtest is needed for regular testing due to the
inclusion of the ROCr/KFD stack in the amdgpu pro driver (OSGSUP-199)

Change-Id: I224d2e9ee3f02065596890b4d8226484f4fac04f
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>


[ROCm/ROCR-Runtime commit: 8026ba250c]
2020-11-02 16:46:45 -05:00
Kent Russell 693a1d2b95 kfdtest: Fix bit compare logic by using | instead of ||
We want to compare bits, not check if a defined value is true

Change-Id: Ie51ede96d18eae01aff6677d852a056ee12bd9c6


[ROCm/ROCR-Runtime commit: e34dfa8ebd]
2020-11-02 06:03:59 -05:00
Kent Russell 9057877de1 kfdtest: Add missing default switch label in GetQueue function
There is no default case, and we were missing a few types defined from
hsakmttypes.h. This was found via clang

Change-Id: I26193cb111a9d8220b1eff21c7313fe060288f36


[ROCm/ROCR-Runtime commit: 761d9d84d2]
2020-11-02 06:03:59 -05:00
Kent Russell 85b0b04903 Remove extra strlen call
While the ternary is nice to read, strlen in general is an expensive
call, so call it once and check if the value is greater than our maximum
allowable string length and adjust accordingly

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


[ROCm/ROCR-Runtime commit: 025036a662]
2020-10-30 06:44:48 -04:00
Felix Kuehling acdda4811b libhsakmt: handle GPU mapping errors
Don't update the vm_object if GPU mapping failed. Print an error message
to help diagnose underlying problems.

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


[ROCm/ROCR-Runtime commit: c7e6f5a274]
2020-10-26 18:46:24 -04:00
Felix Kuehling 35b07e1e28 libhsakmt: optimize system memory allocation
Use MAP_POPULATE when allocating anonymous system memory for later
GPU mapping as a userptr. This can speed up large allocations by
more than factor 2. I suspect populating pages in this way is more
efficient than the CPU page fault code path triggered by
get_user_pages in the kernel.

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


[ROCm/ROCR-Runtime commit: 8f26c0c40c]
2020-10-26 18:44:20 -04:00
Laurent Morichetti d933e70089 libhsakmt: Fix the ctrl stack size calculation
On gfx9, the maximum number of wavefronts per queue is the minimum of
40 waves per compute units, or 512 waves per shader engine.  On gfx10,
there can only be 32 waves per compute units.

Signed-off-by: Laurent Morichetti <laurent.morichetti@amd.com>
Change-Id: I148d1a4fe6c07cdbfaa1f77939eb29311c81c008


[ROCm/ROCR-Runtime commit: 783e346777]
2020-10-16 12:35:11 -07:00
Chengming Gui 120457680e kfdtest: Add gfx1032 support
Signed-off-by: Chengming Gui <Jack.Gui@amd.com>
Change-Id: I04cd412a5e243dfe7aa7596287341e1671c1521a


[ROCm/ROCR-Runtime commit: 4a9d55c414]
2020-10-12 11:30:39 +08:00
Chengming Gui c5429d56c1 libhsakmt: Prepare gfx1032 support
PCI IDs have yet to be added later.

Signed-off-by: Chengming Gui <Jack.Gui@amd.com>
Change-Id: I28f657201868423012e856df4310a493b7cd5752


[ROCm/ROCR-Runtime commit: b543f4f77c]
2020-10-12 11:30:39 +08:00
Laurent Morichetti 18240aa6d6 Update the context save area size
Reserve some space in the context save area for the debugger's
use. There should be 32 bytes per wave for a given queue.

Change-Id: I65ddb6123d0f6afd3149844617ad19023009101d


[ROCm/ROCR-Runtime commit: 2ed2e46b9b]
2020-10-05 12:10:58 -07:00
Jay Cornwall 7821213760 libhsakmt: Limit control stack size on gfx10
The queue control stack size cannot exceed 0x7000 on ASICs
gfx1010 through gfx1031. The lower limit is not achievable
with AQL so this should have no practical effect.

Fixes control stack size overflow on large ASICs.

Change-Id: Ib78cf6e4c5f096044bf8de24debe211689891caa
Signed-off-by: Jay Cornwall <jay.cornwall@amd.com>


[ROCm/ROCR-Runtime commit: 44f80d170d]
2020-09-28 18:14:57 -05:00
Harish Kasiviswanathan 0e9dbc61d2 libhsakmt: add device ID for gfx1030
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Change-Id: I3024bf706f88c0e612391f6d8045020101007bdc


[ROCm/ROCR-Runtime commit: 3311785c7b]
2020-09-21 14:23:46 -04:00
Chengming Gui 90298c1436 kfdtest: fix MTYPE error when init sdma fence packet
Signed-off-by: Chengming Gui <Jack.Gui@amd.com>
Change-Id: I14a1ef204dbd5ab1e9f1840b9555f88b0df361c0


[ROCm/ROCR-Runtime commit: befc7edaea]
2020-09-21 03:57:12 -04:00
Jinzhou.Su 8fc695a7c1 kfdtest: fix gfx90c blacklist issue
This patch is the hot fix to update gfx90c blacklist 

Change-Id: I41f48154ad5ec3035fcb7891a224fc940dca991f


[ROCm/ROCR-Runtime commit: 7efa823ec8]
2020-09-16 09:42:01 +08:00
Jinzhou.Su 0b78c33201 kfdtest:Update gfx90c blacklist
1. Add KFDEvictTest.* for gfx90c based on CI test results

2. Remove SDMA blacklist based on SDMA issue fixed:

Change-Id: I86910fc98a5141f29959b35248a900f0c098a6e8


[ROCm/ROCR-Runtime commit: 36249ddc0e]
2020-09-14 22:49:53 -04:00
Huang Rui 2b2835e596 libhsakmt: fix to update the param number after remove to dgpu input
This patch is the hot fix to fix the param number checking after remove
dgpu input.

Signed-off-by: Huang Rui <ray.huang@amd.com>
Change-Id: Ic980588f78616f99076de742af580afb4273fb2f


[ROCm/ROCR-Runtime commit: 8fc816affe]
2020-09-11 10:25:37 -04:00
Huang Rui e2de06530f libhsakmt: update gfx90c isa version
gfx90c should use GFX902 which is the same with gfx902.

Signed-off-by: Huang Rui <ray.huang@amd.com>
Change-Id: Id24dc2c85c9f49f36b00889c3b8b1b19cce34e09


[ROCm/ROCR-Runtime commit: 8ea0d49337]
2020-09-09 22:10:58 -04:00
Kent Russell 0ec9c67e02 Remove -dev make instructions
These are removed now that we've consolidated the dev package
information into CMakeLists.txt from hsakmt-dev.txt.

Change-Id: I49496ec5def85b0af7fa6b15110910528a8e0be0


[ROCm/ROCR-Runtime commit: 654ee83ac8]
2020-09-09 11:28:18 -04:00
Kent Russell 3262952918 Fix lintian errors in deb packages
Add extended descriptions and e-mail address to CMakeLists
A lintian error will remain regarding stripping the .so, as we
will not be doing this for Release versions of the hsakmt .so

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


[ROCm/ROCR-Runtime commit: 0a4b23d625]
2020-09-09 11:28:18 -04:00
Kent Russell f28303dd25 README: Update README info and installation instructions
Added caveat regarding Ubuntu 20.04 /dev/kfd permissions
Edit copyright date, remove outdated HW support list

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


[ROCm/ROCR-Runtime commit: ae4e980ea8]
2020-09-09 11:28:18 -04:00
Huang Rui bbc6eb6f3f libhsakmt: remove is_dgpu flag in the hsa_gfxip_table
Whether use dgpu path will check the props which exposed from kernel.
We won't need hard code in the ASIC table.

Signed-off-by: Huang Rui <ray.huang@amd.com>
Change-Id: I0c018a26b219914a41197ff36dbec7a75945d452


[ROCm/ROCR-Runtime commit: ad87f38dad]
2020-09-09 20:56:50 +08:00
Huang Rui 51a5e47a1b libhsakmt: implement the method that using flag which exposed by kfd to configure is_dgpu
KFD already implemented the fallback path for APU. Thunk will use flag
which exposed by kfd to configure is_dgpu instead of hardcode before.

Signed-off-by: Huang Rui <ray.huang@amd.com>
Change-Id: I445f6cf668f9484dd06cd9ae1bb3cfe7428ec7eb


[ROCm/ROCR-Runtime commit: 12813691a2]
2020-09-09 20:56:39 +08:00
Oak Zeng a1aec2cc19 CWSR control stack size calculation for gfx10
Gfx10 need 12bytes/wave control stack

Change-Id: I6c6f2819572e6b43aa3140d4dbe79d930e4c1c9c
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
Signed-off-by: Jay Cornwall <Jay.Cornwall@amd.com>


[ROCm/ROCR-Runtime commit: 3d3b28b670]
2020-09-01 21:34:00 -07:00
Philip Cox 52a223ac90 libhsakmt: call madvise() from fmm_allocate_device
This is needed to avoid additional references to mapped BOs in child
processes that can prevent freeing memory in the parent process and lead
to out-of-memory conditions.

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


[ROCm/ROCR-Runtime commit: f7a3427c99]
2020-08-19 13:33:47 -04:00
Jinzhou.Su 32cb33a6a6 kfdtest: remove test cases on gfx90c which block IQE test
SDMA_BLACKLIST, KFDMemoryTest.LargestSysBufferTest,
KFDQMTest.BasicCuMaskingEven

Change-Id: Ic603452ede5ef14f5fcb49925d57d3a656d48a08
Signed-off-by: Jinzhou.Su <Jinzhou.Su@amd.com>


[ROCm/ROCR-Runtime commit: a69830917f]
2020-08-19 10:20:24 +08:00
Kent Russell 0c1420ef32 Fix GCC warning regarding strncpy in CPU info
strlen(src) should not be used as the length in strncpy. Use memcpy
since we know the length of the string, and ensure that we
NULL-terminate regardless of length

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


[ROCm/ROCR-Runtime commit: 04f6b9e16b]
2020-08-14 07:10:19 -04:00
Kent Russell 0fd38ef996 Fix typo lager->larger
Signed-off-by: Kent Russell <kent.russell@amd.com>
Change-Id: I188d629b6441e5ebb14f104869e871d003c78c9d


[ROCm/ROCR-Runtime commit: 6085baa2dc]
2020-08-13 06:34:42 -04:00
Philip Yang bbe2fd7b02 libhsakmt: always use render fd to create CPU mapping
The option to use kfd_fd for cpu mapping is for very old broken KFD
version, it is not used in upstreaming process. This causes issue when
multiple process uses shared system memory because the GTT address is
over 40 bits.

Change to always use render node fd to create CPU mapping.

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


[ROCm/ROCR-Runtime commit: 9e9771a7d9]
2020-08-04 12:54:57 -04:00
Chengming Gui 11c3d639c2 kfdtest: Add gfx1031 support
Signed-off-by: Chengming Gui <Jack.Gui@amd.com>
Change-Id: I3806ec33eefd84ff1dd690dd142889e076b7ef43


[ROCm/ROCR-Runtime commit: 72294266c2]
2020-07-28 18:02:51 -04:00
Chengming Gui 8cd0bc0134 libhsakmt: Add gfx1031 support
Signed-off-by: Chengming Gui <Jack.Gui@amd.com>
Change-Id: Ic1e78e5c3a453eb01f725612cf9ecc702ce2e132


[ROCm/ROCR-Runtime commit: bf1a7acea3]
2020-07-28 15:01:00 -05:00
Ramesh Errabolu df461e1efa Fix typo in the field name Mem_EDCSupport of HSA_CAPABILITY entity
Change-Id: Ic1aba0b2c6e7bc8324fe756df84998f32a8c09da


[ROCm/ROCR-Runtime commit: b0b0a1b479]
2020-07-09 12:42:30 -04:00
Yong Zhao 69159934ae kfdtest: Add gfx1030 support
Change-Id: I5fd0d9af09cbefc0acbe24397a7e2f3aa14a7c97
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>


[ROCm/ROCR-Runtime commit: 76a6781c2d]
2020-07-07 18:09:56 -04: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