コミットグラフ

2959 コミット

作成者 SHA1 メッセージ 日付
Pruthvi Madugundu 87955f8551 Fix for uninstallation problem of hsa-rocr-dev
- /opt/rocm-xx/hsa/include directory wasnt deleted after
  debian package uninstallation
- , 

Signed-off-by: Pruthvi Madugundu <pruthvi.madugundu@amd.com>
Change-Id: I213439d73f6533ff3a55e2b0071061d970cf56d4
2020-11-11 12:32:11 -08:00
Ashutosh Mishra aefc173da4 Standardizing Package names
: Enables standards compliant package naming for debian and rpm

Signed-off-by: Ashutosh Mishra <ashutosh.mishra@amd.com>
Change-Id: I177af15ec7a3f909d05135be30a0acc7b0b20745
2020-11-11 00:37:20 -05:00
Konstantin Zhuravlyov 3a08d0964e Implement Target ID Proposal
Changes from Konstantin Zhuravlyov, Tony Tye

Change-Id: I532801193afa9d5b8ac2a877b5497eab661f0597
2020-11-10 13:42:35 -05:00
Tianci.Yin 1231570441 kfdtest: add DID for gfx1010 blockchain SKU
Change-Id: Icd52c5db4dd975086fcfb13deb6727919c1f5809
Signed-off-by: Tianci.Yin <tianci.yin@amd.com>
2020-11-04 01:14:32 -05:00
Chengming Gui f283fe2854 kfdtest: update shader code for gfx10.3 kfdtest
s_store_* instruction set was retired from gfx10.3

Signed-off-by: Chengming Gui <Jack.Gui@amd.com>
Change-Id: Ibe41a3fe7e053fb345b1af6ad4abc22a0885bc81
2020-11-03 22:25:39 -05:00
Felix Kuehling e515fd818b Revert "libhsakmt: optimize system memory allocation"
This reverts commit 8f26c0c40c.

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


Change-Id: I15330625603f893200a08cd8b5b097f9bf95361f
2020-11-03 12:19:56 -05:00
Jeremy Newton 8026ba250c 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>
2020-11-02 16:46:45 -05:00
Kent Russell e34dfa8ebd 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
2020-11-02 06:03:59 -05:00
Kent Russell 761d9d84d2 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
2020-11-02 06:03:59 -05:00
Kent Russell 025036a662 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
2020-10-30 06:44:48 -04:00
Felix Kuehling c7e6f5a274 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>
2020-10-26 18:46:24 -04:00
Felix Kuehling 8f26c0c40c 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>
2020-10-26 18:44:20 -04:00
Sean Keely a09ba8bcc8 Diable sram ecc reporting.
Temporary workaround while language and compiler teams sort out
handling both modes.

Change-Id: I5d676cd546382dba05ec0b62bb885baa854614f6
2020-10-20 17:06:30 -05:00
Laurent Morichetti 783e346777 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
2020-10-16 12:35:11 -07:00
Arun Sunil 8d00f1aa59 CMakeLists.txt: Fix issue with rocrtst
Fix for issue where rocrtst could not be built if out directory 
was outside the src (WORK_ROOT) directory due to hard-coded 
relative path for OPENCL_INC_DIR.

Change-Id: Icb93de2266d568e9c2437166e34c88ec526fb45c
2020-10-13 18:14:26 -04:00
Evgeny 0d1e5cbcb6 aqlprofile: adding counters DISABLE get-info id
Change-Id: I90d0f6ae96b0d80c481648eecf907301fc13ab74
2020-10-12 17:12:25 -05:00
Chengming Gui 4a9d55c414 kfdtest: Add gfx1032 support
Signed-off-by: Chengming Gui <Jack.Gui@amd.com>
Change-Id: I04cd412a5e243dfe7aa7596287341e1671c1521a
2020-10-12 11:30:39 +08:00
Chengming Gui b543f4f77c libhsakmt: Prepare gfx1032 support
PCI IDs have yet to be added later.

Signed-off-by: Chengming Gui <Jack.Gui@amd.com>
Change-Id: I28f657201868423012e856df4310a493b7cd5752
2020-10-12 11:30:39 +08:00
Sean Keely 9192dfe1b0 Initialize intercept queue packets properly.
Change-Id: I0ff1540940665409a9ade3a517dd576a8f334c7b
2020-10-08 15:33:43 -05:00
Laurent Morichetti 2ed2e46b9b 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
2020-10-05 12:10:58 -07:00
Chris Freehill 2b41fb9fdc Add README for rocrtst
Change-Id: Icd43a243ccfc9caf5ade3cd0e7ffc00e251fc0a2
2020-09-28 20:27:53 -05:00
Jay Cornwall 44f80d170d 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>
2020-09-28 18:14:57 -05:00
Sean Keely a3c4aaf95a Correct return type error in hsa_amd_signal_wait_any.
The error checking macro IS_OPEN returns an hsa_signal_t.
This conflicts with the return type of uint32_t.

Add an assert and rely on spurious return rule to return zero
when rocr is not initialized.

Change-Id: Ifc9bb75e22ecdd675273de59b31e5026a69c62e0
2020-09-25 21:33:23 -04:00
Sean Keely 248904ab26 Add try/catch blocks to image APIs.
Change-Id: I724dcc8015ac556649278dd6cdf1ad4097aaa846
2020-09-22 19:49:36 -04:00
Sean Keely 33a57ddf72 Correct image limits tables to SI limits.
Limits remain unchanged through gfx1030.

Change-Id: Ibdd39b7b97101ea0133af6cebdf295aeef81ac45
2020-09-22 19:49:08 -04:00
Harish Kasiviswanathan 3311785c7b libhsakmt: add device ID for gfx1030
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Change-Id: I3024bf706f88c0e612391f6d8045020101007bdc
2020-09-21 14:23:46 -04:00
Chengming Gui befc7edaea kfdtest: fix MTYPE error when init sdma fence packet
Signed-off-by: Chengming Gui <Jack.Gui@amd.com>
Change-Id: I14a1ef204dbd5ab1e9f1840b9555f88b0df361c0
2020-09-21 03:57:12 -04:00
Jinzhou.Su 7efa823ec8 kfdtest: fix gfx90c blacklist issue
This patch is the hot fix to update gfx90c blacklist 

Change-Id: I41f48154ad5ec3035fcb7891a224fc940dca991f
2020-09-16 09:42:01 +08:00
Jinzhou.Su 36249ddc0e 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
2020-09-14 22:49:53 -04:00
Huang Rui 8fc816affe 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
2020-09-11 10:25:37 -04:00
Chris Freehill 4944c74189 Add gfx1031 support
Change-Id: I855f7fe8d096331d0c1da10b10adf6b1e75a527f
2020-09-10 11:06:58 -04:00
Huang Rui 8ea0d49337 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
2020-09-09 22:10:58 -04:00
Kent Russell 654ee83ac8 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
2020-09-09 11:28:18 -04:00
Kent Russell 0a4b23d625 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
2020-09-09 11:28:18 -04:00
Kent Russell ae4e980ea8 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>
2020-09-09 11:28:18 -04:00
Huang Rui ad87f38dad 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
2020-09-09 20:56:50 +08:00
Huang Rui 12813691a2 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
2020-09-09 20:56:39 +08:00
Sean Keely 2a0c6774fb Use SDMA for small copies in VRAM.
For small copies cache flush latency is larger than data transfer
latency in local VRAM.  Select SDMA for small copies.

Environment key HSA_FORCE_SDMA_SIZE is added for easy adjustment
of the small copy size.  This may be removed after tuning is done.

Change-Id: I733fa0ae01c616617c5de50e71226b51fd589ef2
2020-09-03 03:11:57 -05:00
Oak Zeng 3d3b28b670 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>
2020-09-01 21:34:00 -07:00
Sean Keely 9c20f0e649 Correct memory release function.
l_name is populated by strdup which requires using free rather
than delete.

Change-Id: I9d9bdcfaa3ef095502270f332b95a0ee5c0bbcfc
2020-08-26 18:22:59 -05:00
Sean Keely 5f43778a51 Convert from double to uint64_t in two steps.
We want wraparound behavior here but we don't want to trigger sanitizer
warnings.  Converting to int64_t and then wraping around by cast to
uint64_t avoids the UB issue that triggers the sanitizer warning.

Change-Id: I9400b988dce7899e9ba42cab3e35c7ffedec8fe1
2020-08-25 20:12:52 -05:00
Cole Nelson 24bad55dc7 packaging: set arch, field separators, vendor info
Enables standards compliant package naming for debian and rpm.

Change-Id: Iad86bf942b4e2938516ef46cda6fa2e4bb3744cc
Signed-off-by: Cole Nelson <cole.nelson@amd.com>
2020-08-21 11:33:05 -04:00
Philip Cox f7a3427c99 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>
2020-08-19 13:33:47 -04:00
Chris Freehill 78be4b8225 Fix build issue with memset use on newer gcc version
Change-Id: I57824a3dac94d3da3675f7c74f2e3bc5ac1052ed
2020-08-19 09:13:24 -05:00
Jinzhou.Su a69830917f 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>
2020-08-19 10:20:24 +08:00
Kent Russell 04f6b9e16b 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
2020-08-14 07:10:19 -04:00
Kent Russell 6085baa2dc Fix typo lager->larger
Signed-off-by: Kent Russell <kent.russell@amd.com>
Change-Id: I188d629b6441e5ebb14f104869e871d003c78c9d
2020-08-13 06:34:42 -04:00
Sean Keely 1d919adc75 Add gfx1030 to image blit kernel build list.
Change-Id: I2ddb6a595bb7ca5f6a94f38f8ecc2e40831c52fd
2020-08-12 16:38:39 -05:00
Sean Keely 78e5c06ea8 Switch to release e_flags id for gfx1030.
Change-Id: I51c9ecdf78d6ec56ccc70ca5777bb011db35fda3
2020-08-12 16:38:16 -05:00
Sean Keely dc7e5e7e46 Add xnack isa recognition to gfx1030.
Change-Id: I99301a62f1952b6a3cc548272f4129ad8c0542da
2020-08-12 16:34:17 -05:00