We need to add some more information about the debug features supported
by the platform. We are adding the following:
- debug supported
- dispatch info always valid
- precise memop supported
- watchpoints shared
Change-Id: I68deed98619396d17e28c6e18bad424b58297485
Signed-off-by: Philip Cox <Philip.Cox@amd.com>
[ROCm/ROCR-Runtime commit: 489db9fac6]
Since it's shader-based, the GFX9 shader won't work for GFX10. Blacklist
it for now until we move to a more ASIC-agnostic shader
Signed-off-by: Kent Russell <kent.russell@amd.com>
Change-Id: I353e9a3fe8c7ba6f33556e39c7e4f6b36e010480
[ROCm/ROCR-Runtime commit: 2801342048]
This is required for Marketing Name, but Marketing Name isn't a hard
requirement for ROCT, so make it a Suggested package for DEBs.
Adding a commented-out possible solution for RPM-based distros, as
unfortunately SLE <10 and CentOS/RHEL <8 don't know what "SUGGESTS"
means. Potentially we will add a check that the build environment
that determines if we require the REQUIRES field to be used.
Hopefully we can work out the RPM side quickly, but for now enable
SUGGESTS on DEB as a start
Signed-off-by: Kent Russell <kent.russell@amd.com>
Change-Id: Icea689a14c185964e7f47fb23ee432f9b35ccb03
[ROCm/ROCR-Runtime commit: f7e90798a0]
The shader is incompatible with gfx1030, so blacklist it there until we get
to some more ASIC-agnostic shader generation
Signed-off-by: Kent Russell <kent.russell@amd.com>
Change-Id: I71f362a80e6e8f87ecece6afa6b34a5f02bc56bf
[ROCm/ROCR-Runtime commit: 5a8c9a54f1]
The return code is just -1 if any error occurs. To detect debugger
unavailable we need to check the actual ioctl error code.
Change-Id: I8a294c754196aec916809497ec8e810da2f072b8
Signed-off-by: Sean Keely <Sean.Keely@amd.com>
[ROCm/ROCR-Runtime commit: b67bc6fcc9]
For userptr, after taking aperture lock, decrease registration_count and
ensure object registration_count equal to 0 to release KFD and thunk
object.
Move decrementing of registration count from fmm_deregister_memory into
__fmm_release to avoid a race condition when dropping the aperture lock
in fmm_deregister_memory.
Change-Id: I5381fa6b8a77a1516af2554e5174e91969c338c4
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
[ROCm/ROCR-Runtime commit: f82927ad65]
This test requires KFD patch "drm/amdkfd: SVM map to gpus check vma
boundary" to pass, the patch is on staging-dkms branch, not land on
mainline branch. Temporary blacklist this to unblock QA, as QA reports
kfdtest failure.
Change-Id: I00515cd5d5d1c5612f4f8d48605d86f4a7e62ce2
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
[ROCm/ROCR-Runtime commit: 5adb142dc7]
After adjusting the memory usage, re-enable KFDEvictTest.BasicTest on
gfx906 and KFDEvictTest.QueueTest on GFX10
Change-Id: I401e679e447f3150241078154635f0b30692513d
Signed-off-by: Kent Russell <kent.russell@amd.com>
[ROCm/ROCR-Runtime commit: 392e0e2afc]
We were hitting memory map errors and segfaults when trying to use 7/8
VRAM on certain cards (dmesg showing "Failed to map to gpu 0/1"), as the
original check didn't see if this would exceed the GTT size.
Allocate the smaller of 1/3 of SRAM or 7/16 of VRAM (7/8 / 2) for the
tests
Signed-off-by: Kent Russell <kent.russell@amd.com>
Change-Id: Ic11a5cee058535418eef903a28846e00e1839969
[ROCm/ROCR-Runtime commit: d5d8c022f1]
SDMA firmware of gfx902 has a regression which causes cp hang
in kfdtest, blacklist related test cases.
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Change-Id: Ie75b72a952a29d6b1394c5fcb67ff9a5143b3b07
[ROCm/ROCR-Runtime commit: 04b149b7fd]
This reverts commit 919cd43da5.
Reason for revert: Breaking on Centos7
Change-Id: Ibd5a7c5d4e8c07defec45821ae1faa525cfc916d
[ROCm/ROCR-Runtime commit: 06b1f25172]
This is required for Marketing Name, but Marketing Name isn't a hard
requirement for ROCT, so make it a Suggested package
Change-Id: Ibafcce2c59dc8bdba90c171e766122bebf548a48
Signed-off-by: Kent Russell <kent.russell@amd.com>
[ROCm/ROCR-Runtime commit: 4144a0d2a4]
Use alloca to replace variable size array.
Change-Id: I81e5a7d8f6ace203b81f5f5a651b2a6aa948821c
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
[ROCm/ROCR-Runtime commit: 88e6921d45]
This was never validated on GFX10, so remove it for now until it's
either validated and confirmed, or move the check to the test itself
Change-Id: Ie4d8b31885fbe6e5ed84b7b174c0bfed60879741
[ROCm/ROCR-Runtime commit: f2f86591b6]
to faciliate debugging, print errno when queue destroy fail
current log give very little information when fail:
[ RUN ] KFDQMTest.AllSdmaQueues
[ ] Regular SDMA engines number: 1 SDMA queues per engine: 2
[ OK ] KFDQMTest.AllSdmaQueues (11 ms)
[ RUN ] KFDQMTest.AllXgmiSdmaQueues
[ ] XGMI SDMA engines number: 0 SDMA queues per engine: 2
[ OK ] KFDQMTest.AllXgmiSdmaQueues (6 ms)
[ RUN ] KFDQMTest.AllQueues
/home/foreman/build/hsakmt-roct-amdgpu-1.0.9.40500/sources/libhsakmt/tests/kfdtest/src/KFDQMTest.cpp:381: Failure
Value of: (cpQueues[i].Destroy())
Actual: 1
Expected: HSAKMT_STATUS_SUCCESS
Which is: 0
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Change-Id: I5b1b5b616a5fd7ff198360c893a7aeed685022bd
[ROCm/ROCR-Runtime commit: db1d6d92ab]
After calling ioctl to create userptr obj, take aperture lock, check if
there is same userptr obj created after finding object, to catch the
race that multiple threads register same userptr to multiple GPUs.
If same userptr obj exist, then increase userptr registeration_count,
and free the newly create obj.
Change-Id: I63ae3a4f54da8aedd11c124d8d53ebe727b8203a
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
[ROCm/ROCR-Runtime commit: 8f7443494a]
This reverts commit f94be2078c.
Change-Id: I954326d9a291280de7c9b7ef49a8cce0cd9dd9ad
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
[ROCm/ROCR-Runtime commit: a809a5bf32]
This reverts commit 559bb50c6a.
Change-Id: Ibd32ac36bcb9ee418957d25b240ef9dd9172fbd3
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
[ROCm/ROCR-Runtime commit: 91b0fce535]
This reverts commit 14d821391e.
Change-Id: Idf636655ac01f569d8e92e9c0e100e5db7d1cb61
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
[ROCm/ROCR-Runtime commit: 445fcd803b]
Map readonly range to GPU, test GPU can read range but write to
range trigger GPU vm fault.
Change-Id: Id2ce106055a353f21f4c34fa7f562d546523bc49
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
[ROCm/ROCR-Runtime commit: f9648c5014]
To test if SVM support address mmap on file backed memory.
Change-Id: I227cc0b44d167c4fa2e63257e13a481aefa4f750
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
[ROCm/ROCR-Runtime commit: d91f92669b]
This reverts commit 8f735fb9d5.
Reason for revert: aqlprofile has merged
Change-Id: Iee0fbe8ac1e475123273b328949f68f10490d3ca
[ROCm/ROCR-Runtime commit: 268bb1ae84]
g_props is intialized in topology_take_snapshot which needs to call
hsaKmtAcquireSystemProperties. In hsaKmtOpenKFD, it doesn't call hsaKmtAcquireSystemProperties.
So it needs to change parameter of topology_is_svm_needed from node_id
to EngineId to avoid Segmentation fault on gfx902.
Signed-off-by: changzhu <Changfeng.Zhu@amd.com>
Change-Id: Iba8d20a9142510c70927454d26bdcaf579ad5574
[ROCm/ROCR-Runtime commit: 978028d3f6]
Use the database provided by libdrm-amdgpu,as this is maintained by AMD
Signed-off-by: Mike Li <Tianxinmike.Li@amd.com>
Change-Id: I319a46d833cb23173a77fdff1deae69ea58588b8
[ROCm/ROCR-Runtime commit: cb1c84d99b]
Consolidate all thunk components into a single development package
Also declare build dependencies via find_package/library and report the
location of said dependencies during build time
Change-Id: I8524ad1a2d9a664accd93471abacc4bac82b9a7c
Signed-off-by: Kent Russell <kent.russell@amd.com>
[ROCm/ROCR-Runtime commit: 79d00a35f9]
The major version of the debug ioctl functions has been updated to 10.
Change-Id: Iddc8656ad07c92aa30c6a7a99add28ab3a3f5a80
[ROCm/ROCR-Runtime commit: d0ae4b1f3f]
Update KFDCWSRTest.BasicTest to run CWSR test with legacy HWS,
MES, and software scheduler.
Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Change-Id: I09af904507109c2bbbace6ff616a57fa2b1b8aa9
[ROCm/ROCR-Runtime commit: acd5eda54f]
This is reported as failing on pretty much every ASIC, so move it to the
temporary exclude list for all ASICs until the test can be fixed.
Signed-off-by: Kent Russell <kent.russell@amd.com>
Change-Id: I2973feb5705c178db32009e4603376d1f5e94a2f
[ROCm/ROCR-Runtime commit: 52f5b666d6]
If lookup is successful, device info from find_hsa_gfxip_device() is
used to populate props->EngineId.ui32 gfx version fields and node CAL
name (props->AMDName).
If unsuccessful, uses gfx_target_version sysfs field if present
(otherwise results in error), and sets the node CAL name to
"GFX<GFX_VERSION>" (e.g. 9.0.8 -> GFX090008).
Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: Id39c521b769aebbe40c934f19e03150a66884cce
[ROCm/ROCR-Runtime commit: bb8deeae11]
Some g_system and Node ID checks already performed by validate_nodeid().
Fixes bug where hsaKmtGetNodeProperties() would return on
validate_nodeid() error without releasing lock. Switches some
conditionals to return INVALID_NODE_UNIT instead of INVALID_PARAMETER if
NodeId >= NumNodes. Removes some g_system assertions to return error
code rather than trigger a hard fault.
Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: Id1604b20c2cef8808b98cdad61bd47aa7ea3d229
[ROCm/ROCR-Runtime commit: 29369753f5]
All conditional logic previously dependent on asic_family now dependent
on gfx version. As such, HSA_FORCE_ASIC_TYPE is now deprecated and
HSA_OVERRIDE_GFX_VERSION should be used instead.
device_info structs containing asic_family, eop_buffer_size, and
doorbell_size removed (alongside dev_lookup_table[]). eop_buffer_size
and doorbell_size now determined via macro, with eop_buffer_size and
full gfx version field being added to queue struct.
Certain funcs previously dependent on DID or GPU ID now dependent on
Node ID (due to use of get_gfxv_by_node_id()).
Fixes sleeper bug where ctl_stack_size and debug_memory_size were being
incorrectly programmed on gfx90a.
Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: Iaabdc5c73920ad83b4b379cd6086992357b8ff10
[ROCm/ROCR-Runtime commit: 8f883d0830]
get_block_properties() switch statement now based on major GFX version
instead of asic_family. Addition for NPI bringup only needed on major
GFX revisions unless differing perf_counter_block assignment necessary.
Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: Ia02676d2a3a8f968b67feeafbab534ef4c01c0dd
[ROCm/ROCR-Runtime commit: 0b46d418c3]
Add defines for converting between full gfx version (in decimal) to
major/minor/stepping values, and major/minor/stepping values to full gfx
version (in hex). The first is to be used when grabbing the gfx version
from sysfs, the second when returning the gfx version in
get_gfxv_by_node_id() for comparisions in Thunk.
Add enum for defines of full gfx versions for various cards. These are
to be used in conditionals to replace CHIP_*/asic_family comparisons. On
NPI bringup, addition to this enum will not be required for
functionality unless explicitly needed for a conditional. Most ASICs in
this enum simply for completeness.
Add get_gfxv_by_node_id(): returns full gfx version in hex.
Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I9d1dba7fdd4a587a000eea2f4141a1d301bf4776
[ROCm/ROCR-Runtime commit: 8880610265]
This was an implicit requirement, but the change to needing libdrm/drm.h
means we should be explicitly looking for this package during the build
Change-Id: I75064bf6f5477cb1ca99318681afca76c0060f72
[ROCm/ROCR-Runtime commit: 6778da4460]
Expand check control stack size for Beige Goby, Van Gogh and Yellow Carp.
Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Change-Id: I6c8345bbb751eb9179fc740fe1674504b4295a5f
[ROCm/ROCR-Runtime commit: fc216a3668]
Put CHIP_gfx90a next to CHIP_gfx908 to keep all the GFXv9
chips together.
Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Change-Id: I32b4b7f7746ae4bdaff7e178f13307c1bcfa93e1
[ROCm/ROCR-Runtime commit: 80e4cb6261]
Query pointer info return HsaPointerInfo with MemFlags for all pointer
type now.
Change-Id: I3c02b7b71ba0af953035e3ed9cd6bb6435bb9b65
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
[ROCm/ROCR-Runtime commit: 991cde0656]
hsaKmtAllocMemory with mflags.HostAccess=1 will fail on desktop gfx1xxx GPU
because it's small bar PCIe. Remove this flag.
Child process exit status should use current_test_info, not unit test
info.
Change-Id: I060f23aa98a42251921d003878e70a409c92a4de
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
[ROCm/ROCR-Runtime commit: 413979c319]