提交線圖

628 次程式碼提交

作者 SHA1 備註 日期
Sean Keely 75b93b2dcd Disable maybe-uninitialized error reporting in GCC.
New addrlib trips this warning in release builds on UB 18.04 with
gcc.

Change-Id: I4a8aa0e531fa21011ddde99d769a8452d333ff20


[ROCm/ROCR-Runtime commit: 2e1b863195]
2020-06-22 17:02:11 -04:00
Ramesh Errabolu c59a81a4c8 Refactor IPC test files
Change-Id: I879656b9e99f5cffb6adf16e0fea4e75220cd272


[ROCm/ROCR-Runtime commit: 17bd3b7da5]
2020-06-22 15:04:12 -04:00
Sean Keely f2490685ec Update licensing and remove duplicate licenses.
Change-Id: I0aab6f310d96bf6c5a918e7a9c03713a00dc5c4a


[ROCm/ROCR-Runtime commit: e9a4eff8a1]
2020-06-22 14:19:30 -04:00
Laurent Morichetti 3d2a4b7fbd Don't reset queue_address/queue_size
We should preserve the queue address and queue size when suspending a
queue. The ROCdbgapi gets all its information from the KFD, and if we
reset the queue properties, a call to queue snapshot will not return
the correct information.

Change-Id: I646ed4a779cada55b0c1b4342ec140d3678beb67


[ROCm/ROCR-Runtime commit: 4f1a9c8139]
2020-06-20 01:22:52 -04:00
Sean Keely 37ebd9b672 Add copyright blocks to package shell scripts.
Change-Id: I864aa5c514ae96334009a9a729e344f36e27191b


[ROCm/ROCR-Runtime commit: 2da92265ec]
2020-06-19 22:35:58 -04:00
Sean Keely 0efce64e15 Move tools only table interfaces into namespace rocr.
Change-Id: Ic0b8d958c2d27c921c6955a56110c6cdf5ba5e8e


[ROCm/ROCR-Runtime commit: bd51c61af8]
2020-06-19 22:35:15 -04:00
Sean Keely adfc9b060b Add addrlib to static linking namespace.
Wrap addrlib in namespace rocr.  Remove extern "C" declaration.

Change-Id: I9f7fc60df3fc12ca72a71f13561692a8ddf9829c


[ROCm/ROCR-Runtime commit: e840b9d86f]
2020-06-19 22:35:11 -04:00
Sean Keely 5eefacb0c6 Remove legacy build file.
Change-Id: I827664a5bb11bcea3176449cbf766b6cb3b93696


[ROCm/ROCR-Runtime commit: 3646465429]
2020-06-19 22:35:05 -04:00
Sean Keely 16dc9f3f93 Enforce uniform library names.
Static and dynamic builds should both output libhsa-runtime64.??
Current code produces libhsa-runtime64_static.a.

Change-Id: Ibf1983f560cd069b33d98fec432e3174a17d8d6c


[ROCm/ROCR-Runtime commit: 2042ed3bdb]
2020-06-19 22:35:00 -04:00
Sean Keely c456062b21 Clang build errors.
Keep some warnings from being promoted to errors for addrlib
compilation with clang.

Change-Id: I6e5ae002e1d7a60e4d315f6bbadcf65734c2d287


[ROCm/ROCR-Runtime commit: 5c4f71191b]
2020-06-19 22:34:56 -04:00
Sean Keely e82cb9c6ec Update addrlib.
Corrects type errors and adds gfx1030 support.

Change-Id: I7fe7b5ded68b1e26fb899676712ad019089a45f3


[ROCm/ROCR-Runtime commit: 4081c564ee]
2020-06-19 22:34:52 -04:00
Sean Keely f3679ac0bb Allow cmake UI to switch between static and dynamic.
Dependency changes between static and dynamic build caused a cmake
crash when using ccmake or cmake-gui.  This is fixed by cmake in
version 3.12.  Until then deleting the target dependency data at
project startup allows the UI to function correctly.

Also warns about cosmetic issues when using older cmakes.

Change-Id: I8bd2ade9b59e7c27652090d1b6298cb01095a965


[ROCm/ROCR-Runtime commit: 0dae86f686]
2020-06-19 22:34:47 -04:00
Sean Keely 4b93b03250 Restrict the application of --whole-library in the static builds.
Interface target now depends directly on rocr dependencies and
indirectly on the rocr source target.  This duplicates some code
but seems to be necessary to restrict application of whole-library.

Change-Id: I35e836de38aad1eee5387531362871293e30da9d


[ROCm/ROCR-Runtime commit: 8fd41bd513]
2020-06-19 22:34:43 -04:00
Sean Keely dd1ec37dc8 Include linker script in static build usage requirements.
Defines the non-SC version of several functions.

Change-Id: I36b8c7791eb0d606029ff56ec48381abee5d2c1e


[ROCm/ROCR-Runtime commit: cce2345f0c]
2020-06-19 22:34:39 -04:00
Sean Keely f02c7d7abf Use an interface target when building a static library.
Static linking disregards module initializers.  This breaks clocks
and the API table.  The patch adds an interface target during
static build that wraps the archive in --whole-archive to avoid
incomplete initialization.

Change-Id: Id32afbf969c1f3f16a191e5b2b66847669165fb7


[ROCm/ROCR-Runtime commit: 87e54be4e7]
2020-06-19 22:34:35 -04:00
Sean Keely 95b21b9646 Install LibElf config module.
libelf does not natively support cmake packages and is not located
by cmake's default system library modules.

Change-Id: I4e7cda32615febf9f45ccc15f4e2a3f3505804bb


[ROCm/ROCR-Runtime commit: 727cc9ccd3]
2020-06-19 22:34:30 -04:00
Sean Keely af7caa3997 Move loader interface functions into rocr namespace.
For static linking all non-API functions must have internal linkage
or be in project namespace to avoid colliding with application symbols.

Change-Id: I3398e40a387cca36f3ddef2b978306c765161d72


[ROCm/ROCR-Runtime commit: 0be21c54a6]
2020-06-19 22:34:26 -04:00
Ramesh Errabolu b84e4987da Add rocr namespace to core header and impl files
Change-Id: I1e1b33f9bba1078d049bc19797889988c3e43360


[ROCm/ROCR-Runtime commit: fa13208698]
2020-06-19 22:34:21 -04:00
Sean Keely 943e0d9ddc Fix improper Min/Max operands.
Operands were relying on implicit type conversion which may result
in range errors.

Change-Id: I4b35ef92dcaf8b547aed02fea36aed75d392c6af


[ROCm/ROCR-Runtime commit: 99e2942949]
2020-06-19 22:34:16 -04:00
Sean Keely 1c734fcc38 Remove additional legacy build file.
Change-Id: Ib166ad9856114a4a846f37ff99bac4f870c414d9


[ROCm/ROCR-Runtime commit: 8485a48756]
2020-06-19 22:34:12 -04:00
Sean Keely abd712f33f Update copyright date.
Change-Id: If4bf4c20cf051878bfe759080bb7345d884dd53d


[ROCm/ROCR-Runtime commit: ce19721c88]
2020-06-19 22:34:01 -04:00
Sean Keely 566abef9ce Update README.md
Describe the new build process, build dependencies, and usage.

Also remove some old known issues.

Change-Id: Iec85db378442e3e0ca091d551a42a40e6549ddb3


[ROCm/ROCR-Runtime commit: cd26cbbe5f]
2020-06-19 22:33:36 -04:00
Sean Keely 91c27e70e2 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: I00f9ec2185c27d2f6a8d2c7f294512a268a4e3f5


[ROCm/ROCR-Runtime commit: f4bb51476d]
2020-06-19 22:33:36 -04:00
Sean Keely 7dfd2ee754 Further cmake changes.
Add namespacing to elf find module.

Stop using CMAKE_CXX_FLAGS and start using target properties for this.

Ideally we should remove the actual option strings and replace with cmake
compiler properties or compile features.

Change-Id: I57756387b3bd3c565c99a35fed4b37fe1a2d0556


[ROCm/ROCR-Runtime commit: 9ff0268f4c]
2020-06-19 22:33:36 -04:00
Sean Keely 40ac4daa21 Update to modern cmake.
Adds support for find_package(), locates dependencies with
find_package(), swaps the roles of /hsa/include/hsa and /include/hsa
as well as /lib & /hsa/lib.

Kernel code objects no longer build at every make call but only
as needed.  Dependencies are tracked through to clang.

Device lib is still located with directory searches.  build_devicelibs.sh
does not yet install the cmake config files on the build systems.

Corrects DAZ mode mismatch in code object compilation.

Still needs updating to compiler properties rather than direct
manipulation of CMAKE_CXX_FLAGS.

Change-Id: I02d946c8a77d5cf753681f8e3d3153fca4aae86a


[ROCm/ROCR-Runtime commit: 55a4f01b16]
2020-06-19 22:33:36 -04:00
Sean Keely 960fcd7a41 Remove legacy build files.
Change-Id: I540846b46714b6b07039e8b84929588f156652e0


[ROCm/ROCR-Runtime commit: a5e492253e]
2020-06-19 22:33:36 -04:00
Ramesh Errabolu ab6b820dbf Update License header and Cleanup IP references
Change-Id: I0a6636e1d8457045d034d05383cfb5d4e7680fee


[ROCm/ROCR-Runtime commit: 42b38daa22]
2020-06-19 22:33:36 -04:00
Ramesh Errabolu c9f453a8a8 Build ROCr core and image libraries as one shared object
Change-Id: I3a16c1227e7db2e386ab33886965596fa0fb0c87


[ROCm/ROCR-Runtime commit: 0ca0691ca7]
2020-06-19 22:33:36 -04:00
Laurent Morichetti f80ce871b3 Preserve the exec mask for the queue error case
Save and restore exec_lo/exec_hi around the mGetDoorbellId macro in
the signal_error case just like we do in the signal_debugger case.

Also reset the wave_id (ttmp4/ttmp5) to 0 since it isn't preserved.
0 will be detected as a new wave by the debugger api library.

Change-Id: I5123caa9431154ec1584bae85e42648c97c64c37


[ROCm/ROCR-Runtime commit: db6a781f0c]
2020-06-18 02:25:11 -04:00
Sean Keely 25280d88c1 Fix install issue.
Create symlink directory before attmpting to create the symlink.

Change-Id: Ic4d07052e5bfc32280c7d71e58784cbba3536e2a


[ROCm/ROCR-Runtime commit: d163fac13d]
2020-06-17 03:15:25 -05:00
Tony c1fa37c2d2 Do not add offset/size to code object URI if loading from complete file
Change-Id: I7cb1e803e0bcdbc24935273af431fbcc88404bfd


[ROCm/ROCR-Runtime commit: 047b80ab41]
2020-06-12 05:10:35 -04:00
Evgeny 80687c9c03 concurrent sqtt support
Change-Id: I0e1515d4b0aab30b0a9b673120eee28d96f64d9e


[ROCm/ROCR-Runtime commit: b033453537]
2020-06-10 22:45:30 -04:00
Tony 5d96e499be Initialize HSA Queue object before creating KFD queue
Initialize all the fields in the HSA queue object to known values
before calling the thunk to create the KFD queue. This ensures that
when the debugger detects that a KFD queue is created it can access
the values it requires. The values it requires include the apperture
addresses, queue scratch memory base, and the HSA queue kind.

Change-Id: Ic985755b0402c6794d5987e60aff50d223f09eb9


[ROCm/ROCR-Runtime commit: a74660c69a]
2020-06-04 04:56:24 -04:00
Konstantin Zhuravlyov 6a31d12208 Correct loader URI reporting
- Check address is in the range of the mapped file.
  - Correct calculation of offset within the file.

Change-Id: I848a3ead4422698c2ef1c140bc8ae5e000a717f7


[ROCm/ROCR-Runtime commit: 5f614c31f5]
2020-06-03 13:03:07 -04:00
Laurent Morichetti 981acecc79 Handle address watch exceptions
Set ttmp11[8] and send a signal for the debugger when the handler
is entered because of an address watch exception.

Change-Id: Icc83a79027bb7ca1e50e19e2f00464cb9ca862f3


[ROCm/ROCR-Runtime commit: da6d892058]
2020-06-02 15:25:15 -04:00
Konstantin Zhuravlyov b1f050524b Add support for code object URI to ROCr
Adds the following:
	- New factory method to create a code object reader from
          file with offset and size.
	- A pair of queries on a loaded code object to get the URI name/length.
	- A bump to the AMD vendor loader extension API and its associated table.

Change-Id: I17c83e9c2447d29a43c438459395365f786a3611


[ROCm/ROCR-Runtime commit: 9eb735ec24]
2020-06-01 11:07:50 -04:00
Sean Keely 1d022d1d82 Separate memory map info printing from vmfault handler.
Allows the print utility to be called from GDB.

Change-Id: Ia27ff9ba23ad6c0117ba1278693d4c8b0473bdc1


[ROCm/ROCR-Runtime commit: 4e0bf29704]
2020-05-28 23:34:49 -04:00
Sean Keely 890e666011 Select a non-empty pool for image kernarg.
Zero size pools have no numa bindings.  Selecting a pool with numa
bindings should prevent thrashing due to numa balancing daemon.

Change-Id: Ib0082cb9af66e24e07a2adbb83c1045145d51403


[ROCm/ROCR-Runtime commit: 32bb10086d]
2020-05-28 23:34:42 -04:00
Sean Keely 4832f76396 Relocate initial system clock setup.
This has nothing to do with registering agents.
Moved to Runtime::Load.

Change-Id: I0f84c9d8f5a68d458717111113f02af56c92f4f6


[ROCm/ROCR-Runtime commit: 40d1931209]
2020-05-28 23:34:30 -04:00
Sean Keely d554725903 Correct IPC fragment reuse.
Memory from the suballocator may be exported via IPC.  If this
happens then the allocating process should not reuse that memory
since it would still be connected to the remote process.  IPC exported
memory must be released back to the driver.

Change-Id: I2ab0c814f63191f753fc3640cc4140ee144bf07f


[ROCm/ROCR-Runtime commit: 29b660c91e]
2020-05-28 21:46:02 -04:00
Sean Keely 355cf758a9 Remove PointerInfo fragment branch.
All types which could be generated from a fragment need to take this branch.
Taking the branch is correct for all types, it was a performance optimization
only and was missing IPC.  Branch removal simplifies updates for any future
fragment use and will allow CQE to report any performance issues that might
require bringing the branch back.

Change-Id: I8041788c422e880b764e144eb1877f5126ba76f3


[ROCm/ROCR-Runtime commit: 09ebc21d13]
2020-05-28 21:46:02 -04:00
Sean Keely 4b3a5b6151 Fix pointer info block base address fetch.
Thunk may report nullptr for host base if the host does not have
access.  Use agent base in this case.

Change-Id: I44883d35a3fff0941b1e3037d16b059591a6c511


[ROCm/ROCR-Runtime commit: 397608e2c0]
2020-05-28 21:46:02 -04:00
Joseph Greathouse 0e3850b003 Add ability to get ASIC revision from hsa_agent_get_info()
Change-Id: Ie30c64f9e02f9e704c9a4c4145deb9580429fdf6


[ROCm/ROCR-Runtime commit: 3fe95c696a]
2020-05-28 14:25:13 -05:00
Laurent Morichetti d70dc701a0 Clear mode.debug_en if !status.halt
The 1st level trap handler jumps to the 2nd level trap handler on
context save requests or regular traps if (mode.debug_en
&& !status.halt) is true.

If we return from the 2nd level trap handler without status.halt=1, then
we need to make sure mode.debug_en is cleared, or we will re-enter the
2nd level trap handler again and again when trapsts.savectx is set.

Change-Id: I4db6369de8c91a32842f488a4df5c9d94fa65aa9


[ROCm/ROCR-Runtime commit: 584ef1e1ca]
2020-05-19 18:31:29 -07:00
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
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
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
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