Граф коммитов

2930 Коммитов

Автор SHA1 Сообщение Дата
Sean Keely 56085e26f7 Add USER GCR packet
Allows cache flush from SDMA.

Change-Id: Iecae0b49519b2d4da7b1c053b03f721544439e71


[ROCm/ROCR-Runtime commit: ddebda6433]
2020-05-16 00:59:03 -04:00
Sean Keely 699a60f2db Remove gfx1030 references.
Options seem to be gfx1030 and gfx1030.

Change-Id: I3e33e3a950d1b950e10163612b892d9c382628fa


[ROCm/ROCR-Runtime commit: 2ffc9ecbb3]
2020-05-15 16:53:11 -05: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
Sean Keely 62a1cbbcea Correct HSA_AMD_AGENT_INFO_MAX_ADDRESS_WATCH_POINTS text.
Missing attribute type.  Also remove dangling word in
HSA_AMD_AGENT_INFO_MEMORY_WIDTH.

No code change, documentation only.

Change-Id: I1d0efdb721eaa0e2fb0bdb21f8d5e034beaf8857


[ROCm/ROCR-Runtime commit: 012ffed459]
2020-05-13 22:40:25 -05: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
Laurent Morichetti 6d8700198f Set ttmp11[8] for all memory violation errors
In the case where SQ_WAVE_TRAPSTS_XNACK_ERROR_MASK is set, we also need
to set the TTMP11_EXCP_RAISED_BIT in ttmp11. If we don't, the debugger
may think that the wave is halted at launch (halted without events).

Change-Id: I8c19605bbfc145275728de4ad1979d3ba8bb478a


[ROCm/ROCR-Runtime commit: 838c6bd6ad]
2020-05-12 00:44:06 -04:00
Sean Keely 31268c6f4d Allow linear swizzle mode with tiled image requests.
Mesa address lib faults if the only acceptable swizzle modes are
forbidden.  The old address lib simply ignored the forbidden list
in this case.  Mesa addrlib will not select linear unless there
is no other option so allowing linear mode for tiled images will
still use tiled modes when possible.

Change-Id: I1aa44d072db902c968484dbff67b482af03b45d9


[ROCm/ROCR-Runtime commit: c60364e1e0]
2020-05-11 23:34:44 -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
Sean Keely a3728476bf Correct async_mem_copy sample.
Peer accessibility query was not previously directed at the peer agent.

Change-Id: I259f0afac827a6e4778a56419a3acd296d00391b


[ROCm/ROCR-Runtime commit: 9c9064c2b7]
2020-05-11 18:39:39 -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
Sean Keely 9aa86bb1e4 Correct handling of failed lazy_ptr constructors.
Contructor function must not be attempted twice even if the construction
attempt returns nullptr.

Change-Id: I75353e5e511769a96e4332f7f60887f6559c1cd5


[ROCm/ROCR-Runtime commit: 2fbacccaed]
2020-05-08 22:23:46 -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
Tony fbb4e4c2c3 Make HSA_QUEUE_TYPE_COOPERATIVE a queue type value
- Correct defintion of HSA_QUEUE_TYPE_COOPERATIVE to be a queue type
  and not a bit mask.
- Correct implementation of hsa_queue_type_t to treat is as an
  enumeration type and not a bit mask. In particular
  HSA_QUEUE_TYPE_COOPERATIVE is a distinct queue type that uses the
  multi producer protocol, and is not a bit set value.

Change-Id: I9415be8853671e5511e16e306caf16020e8c84af


[ROCm/ROCR-Runtime commit: bccb25fc33]
2020-05-07 19:24:19 -04:00
Matt Arsenault b5f6574895 Do not use llvm-dis to pick the triple
There are a couple problems with this. First, llvm-dis is an unstable
llvm development tool and 3rd party users should generally not rely on
it. The text format is unstable, and the regex here isn't even
explicitly looking for the target triple field, so it could
accidentally find something else. Second, picking the target to
compile based on the library you are linking is a fundamentally
backwards decision. The target you're compiling for changes the
library you would want to link. The device libraries are only ever
compiled with amdgcn-amd-amdhsa. If we had a second triple, this
should be explicitly building for any it cares about.

Change-Id: I3bae8398f60f78df61ab2177aa9e83f47ec6dea4


[ROCm/ROCR-Runtime commit: 96d4140609]
2020-05-06 13:28:39 -04:00
Laurent Morichetti ed6147a506 Check all s_endpgm instructions
The ROCR trap handler should check for all end program instructions
and not halt on them. Mask off the imm16 before comparing the
instruction to the s_endpgm opcode.

Change-Id: I669ffc7f5b699d7daf0c8ec5761ed7bb193f07a7


[ROCm/ROCR-Runtime commit: df03a377f5]
2020-05-04 19:52:53 -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
Sean Keely 3b0c3e83a3 Update addrlib with latest Mesa source.
Change-Id: Idd8cdaac9ad370397d62f6a32687ca7bc7d7462b


[ROCm/ROCR-Runtime commit: 3da81968cb]
2020-05-01 20:33:09 -04:00
Sean Keely 2269234579 Remove dead code from image_manager_xx.cpp
Image swizzle mode will be set by the preferred surface info
function.

Change-Id: I41e639be53cafbb4db6cf15c159aa2bd457ec5be


[ROCm/ROCR-Runtime commit: 1440da3e15]
2020-05-01 20:32:45 -04:00
Sean Keely 1fc7f2dec7 Move Images code to hsa-runtime folder
Change-Id: I53c1845d985ac3e9708d952865009c0021f3bb4f


[ROCm/ROCR-Runtime commit: 7e3db20826]
2020-04-30 19:35:57 -05:00
Ramesh Errabolu bd5ef0eff8 Update Image code base to use addrlib from mesa
Change-Id: I31355d7fc3db423c16772cf105e9b6b59a3a6307


[ROCm/ROCR-Runtime commit: 1a3ee2fd03]
2020-04-30 19:35:56 -05:00
Laurent Morichetti 3ead90a027 Add debugger support for wave halted at launch
New trap handler ABI: Record in ttmp11[8:7] the event that caused the
trap handler to be entered. We currently record 2 events, trap_raised
if an s_trap instruction was executed, or excp_raised if an exception
(MEM_VIOL or ILLEGAL_INST) was raised.

Change-Id: Ie278c8277437b3b67c2737dcd1a12fe6511df428


[ROCm/ROCR-Runtime commit: 00da82f951]
2020-04-29 19:29:56 -04:00
Matt Arsenault 15e5e6364d Use -nogpulib in another place
Change-Id: I9cc1daa7db7d1f2ff07a0dbfb403dbf41f4bbffb


[ROCm/ROCR-Runtime commit: 2e73d52ac6]
2020-04-28 13:46:01 -04:00
Matt Arsenault 70c54eba7a Use -nogpulib as a quick build fix
Change-Id: I28ca7d53c76f0829719079dfb67b6314f5ff27cc


[ROCm/ROCR-Runtime commit: 0d84b66b1e]
2020-04-28 10:08:37 -04:00
Kent Russell d94a09bc46 CMakeLists: Support static building of hsa-runtime
Remove the hard-coding of "SHARED" as the lib type, and move any
SO-specific linking to only happen if the .so exists in the first place

Change-Id: I3f0bfd5c03f19b2425423b4dc8eed8fd87acc1d6


[ROCm/ROCR-Runtime commit: 33133ebd07]
2020-04-27 20:52:07 -04:00
Sean Keely 7936a4b3bf Adapt to new LLVM location in repo build.
This will reenable incremental PSDB builds.

Change-Id: I2311c124b06b544202f7c1db31b6607f2580194e


[ROCm/ROCR-Runtime commit: 675f73cda9]
2020-04-27 17:58:35 -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
Austin Kerbow 3e9e830351 Update IsaRegistry for backend changes
Changes in the compiler are being made to add controls for XNACK and SRAM ECC
for all targets which can support these features. By default the conservatively
correct settings of XNACK on and SRAM ECC on will be used. This change is to
facilitate these backend updates.

Change-Id: I2fd6b6bc1d32937737e7f56d8e08c70fe781c745


[ROCm/ROCR-Runtime commit: 87202d4408]
2020-04-25 04:45:28 -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
Sean Keely 9319b029f2 Correct IPC fragment validation.
IPC create must only be used on whole ROCr allocations.
Fragments were allowing handle creation with offsets.

Change-Id: I1faa96d36bc7a6199bdc2e3ff1b8871d1a36a2fa


[ROCm/ROCR-Runtime commit: 7712c7e743]
2020-04-24 00:08:53 -04:00
Sean Keely 71f3dbe6eb Correct capture of PoolInfo::allocable_size_.
Change-Id: I80757bb36048bc15b928220aca0a1eb5d898ab22


[ROCm/ROCR-Runtime commit: b90bf473c1]
2020-04-21 19:03:24 -05:00
Sean Keely 9eb712762e Suppress Finalizer loading attempts.
This has been the default mode for a while now since we don't
distribute or build the finalizer.  Removing the attempt cleans
up debug mode messages that are causing confusion.

Change-Id: I8162c95abd5bbedaa22b90191f7a384a34c388ae


[ROCm/ROCR-Runtime commit: 3fe891d5da]
2020-04-18 00:06:42 -04:00
Sean Keely 358c091a13 Remove references to finalizer header.
Change-Id: I6608c95268ab4bc66053d889cf7d5a30cd8fccab


[ROCm/ROCR-Runtime commit: e25ae1263b]
2020-04-17 23:50:23 -04:00
Sean Keely c354858217 Correct rocrtst numa awareness.
Pool size was being used where alloc_max_size should be.
Changes are necessary on NUMA systems where not all nodes have
installed memory.

Change-Id: If8f507cae50a8dfeae8572d4e39df757abe28599


[ROCm/ROCR-Runtime commit: a9470e3563]
2020-04-17 23:43: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
Sean Keely 9989d79543 Don't lock KFD allocated system memory.
Lock API suceeds but the GPU still faults on the address.
This should be fixed in Thunk and/or KFD as well.

Change-Id: I8b2fbcae61ab181e4fe7f0b64e43a5f0772efb24


[ROCm/ROCR-Runtime commit: 9fe44ed675]
2020-04-17 21:45:01 -04:00
Ramesh Errabolu 9ebd4f7163 Extend RocrTst to query UUID of ROCm devices
Change-Id: I6c9fa9751c893ba119e8b7a2808a8ab2aebeba3b


[ROCm/ROCR-Runtime commit: 7434fa14d4]
2020-04-16 21:29:32 -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
Ramesh Errabolu bad458e27b Stop building and packaging Tools library
Change-Id: Iee430c24e32ea7412f21564fe8970749e4954b91


[ROCm/ROCR-Runtime commit: 30f46e4e24]
2020-04-15 13:58:33 -04:00
Laurent Morichetti 124a7e0e0c Return a file URI for elf images in shared objects
Iterate the loaded shared objects to see if the given elf image binary
is part of a loaded segment.

Change-Id: I074cacd99eb5b59f883f4ce2bd901e0e35a660b8


[ROCm/ROCR-Runtime commit: 5f783494f1]
2020-04-14 15:22:43 -04:00
Nathan O cb264557f5 Fix hsa_amd_agents_allow_access documentation
- Update the documentation comment in hsa_ext_amd.h, which contained
   contradictory and incorrect information about an argument to the
   hsa_amd_agents_allow_access function.

Change-Id: I60b0dbbdc761078cd81906bc2c63a27d7e6b53e1


[ROCm/ROCR-Runtime commit: 6d5781bb14]
2020-04-10 18:26:13 -04:00
Ramesh Errabolu ccd4e85fc9 Extend Rocr Visible Devices functionality to include UUIDs
Change-Id: Ia2892e4033717556a422fe33dec0294fe2ca9e28


[ROCm/ROCR-Runtime commit: 89f7ef224c]
2020-04-09 00:42:53 -05:00
Ramesh Errabolu e8f4f2d9e2 Extend ROCr to surface UUID of GPU devices that suppport
Change-Id: I478db68d69a01578770403fa695f9e6391637573


[ROCm/ROCR-Runtime commit: 45958c727d]
2020-04-08 19:19:22 -05: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
Pruthvi Madugundu ae435f8253 Updating the hsa include directory symlink creation
- Symlink creation is corrected only for deb packages
- It is follow up package of http://git.amd.com:8080/c/hsa/ec/hsa-runtime/+/334403
- configure_file() is called to update the scripts with proper cmake variable values

Signed-off-by: Pruthvi Madugundu <pruthvi.madugundu@amd.com>
Change-Id: I0e833ead265166411e83593fd57265a9ab356904


[ROCm/ROCR-Runtime commit: 241cdfdd01]
2020-04-01 02:17:11 -07:00
Sean Keely f4843faeec Fix Debian package build on CPack 3.10.
CPack now incorrectly adds two copies of directory symlinks when
building Debian packages.  This causes dpkg to see a file conflict
and fail installing.

The correct long term solution is to remove the symlink and use a
flat directory structure.  This patch adds the symlink in the post
install script as a workaround until we can switch to flat layout.

Change-Id: I879b6cbc2661c19df3db639cb42fba0972fddb93


[ROCm/ROCR-Runtime commit: f3b532b42d]
2020-03-20 21:35:32 -05: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