提交線圖

2959 次程式碼提交

作者 SHA1 備註 日期
Sean Keely ddfe07871a Add ELF types for gfx1030.
Change-Id: If875534d698da9840e47c380d5630b6dd742ab0c
2020-08-12 16:34:17 -05:00
Chris Freehill e702531b40 Add gfx1030 support
Change-Id: I4bccc731ba802480925f98c6c42593503bf9b98d
2020-08-12 16:34:10 -05:00
Ramesh Errabolu 3444da7df6 IPC child process should exit and not return
Change-Id: I9b01f473eea1b42cf65c042f89fcf24bfd2ffc0d
2020-08-10 11:19:21 -05:00
Philip Yang 9e9771a7d9 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>
2020-08-04 12:54:57 -04:00
Chengming Gui 72294266c2 kfdtest: Add gfx1031 support
Signed-off-by: Chengming Gui <Jack.Gui@amd.com>
Change-Id: I3806ec33eefd84ff1dd690dd142889e076b7ef43
2020-07-28 18:02:51 -04:00
Chengming Gui bf1a7acea3 libhsakmt: Add gfx1031 support
Signed-off-by: Chengming Gui <Jack.Gui@amd.com>
Change-Id: Ic1e78e5c3a453eb01f725612cf9ecc702ce2e132
2020-07-28 15:01:00 -05:00
Ashutosh Mishra d13342d03a Adapting HSA Changes
Using mordern cmake changes for rocrtest in accordance with the
recent changes in HSA. These changes also make sure that tests
can be compiled both for static as well as dynamic libs

Change-Id: I6dfb5259a4cbd994f413f68d1ebadc2ba5fe4f34
2020-07-24 17:15:12 +05:30
Ashutosh Mishra 4827d1d4d4 Adapting HSA Changes
Following Cmake changes are in accordance to the changes in HSA / THUNK , VDI etc
These have made the code compilable now both for satic as well as dynamic libs

Change-Id: I4d8d3e2b84d6e1ea00531594522111ccbce8a87b
2020-07-21 12:06:51 -04:00
Sean Keely f4fe7ddf47 Make explicit reference between init modules.
Make explicit reference to hsa_api_trace.cpp from
initialization of hsa_table_interface.cpp.  Breaks
the ability to use hsa_table_interface.cpp in plugins.

Change-Id: I22a42d3a132512b0d9ec7a1ca629b169e7f8eba7
2020-07-15 16:02:15 -04:00
Aaron Enye Shi d23b26f760 Update to use new bitcode library structure
Rather than manually linking to the device libraries, the compiler
can now handle linking with them. Allow the build to continue using
old layout if the build system still uses it. Therefore maintain
compatibility with ROCm 3.7 and earlier.

Change-Id: Ida81775da3d0f7c2c67386a71cb057ede31a1545
2020-07-14 15:55:08 -04:00
Ramesh Errabolu b0b0a1b479 Fix typo in the field name Mem_EDCSupport of HSA_CAPABILITY entity
Change-Id: Ic1aba0b2c6e7bc8324fe756df84998f32a8c09da
2020-07-09 12:42:30 -04:00
Yong Zhao 76a6781c2d kfdtest: Add gfx1030 support
Change-Id: I5fd0d9af09cbefc0acbe24397a7e2f3aa14a7c97
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
2020-07-07 18:09:56 -04:00
Yong Zhao 58ca2b745c libhsakmt: Support gfx90a
Change-Id: I1ad594eab093f5aa30143ade4e72f2379c9e3616
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
2020-07-07 15:55:28 -05:00
Sean Keely f6e6eae86d Remove unnecessary HSA_API declarations.
The excess declarations mark implemenation functions as default
visibility.  Normally this is not an issue since our linker script
will specify which visible symbols will be permitted into the dynamic
symbol table.  However, for static linking methods which apply linker
directives during incremental linking symbol visibility must be correct
in the (non-dynamic) symbol table.

Change-Id: I13dc8dd1019368e8943920d36335a91f0c555a92
2020-07-07 16:41:34 -04:00
Yong Zhao 7c74069d6a 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>
2020-07-07 11:07:14 -04:00
Tony ac3244d431 Define URI for deprecated hsa_executable_load_code_object
Change-Id: Id9b6f8895bdafa3460a27984e0f773ec153378d7
2020-07-01 23:02:54 -04:00
Laurent Morichetti 23df617150 Set the correct bit in m0 for gfx10
The size of the m0 payload for MSG_INTERRUPT has changed in gfx10. It is
now 23bit wide instead of 24bit wide in gfx9.

Since we are generating different binaries for gfx9 and gfx10, we can
conditionally set DEBUG_INTERRUPT_CONTEXT_ID_BIT to 23 for gfx9 and
22 for gfx10.

Change-Id: Ifc15a9fa4399d35328ab58b742f791f1660bcd9a
2020-06-30 22:02:41 -04:00
Cole Nelson 141246eeeb libhsakmt: set packaging arch, field separators, vendor info
Change-Id: Ia1392285f5ee0beeaae136ad7d68e1723bc590ba
Signed-off-by: Cole Nelson <cole.nelson@amd.com>
2020-06-30 07:38:14 -04:00
Gang Ba fec3780c1a Revert "libhsakmt: add Streaming Performance Monitors APIs"
This reverts commit d675d1cce1.

Reason for revert: Change was submitted by accident

Change-Id: If05c705e22296fd3ca789f269737d379a933361d
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
2020-06-29 10:54:54 -04:00
Ramesh Errabolu 23646846f7 Syntax of script run at uninstall is malformed
Change-Id: Icf056a66411d99a5aa8a2ad61f55751c0ac43b68
2020-06-26 16:56:29 -05:00
Ramesh Errabolu f7350c6020 Update ROCr implementation of Queue ID
Change-Id: Iec48b1978e4d01563e71cfb58aed8f1bbc446443
2020-06-26 13:25:00 -05:00
Sean Keely cc7a197ff8 Use correct queue id for gws assignment.
Change-Id: I9157951abce65b60dfe0e1db5819510a7703547f
2020-06-26 14:24:06 -04:00
Tony 91cb98dab6 Code object reader improvements
- Make code object reader use mmap when loading from a file on Linux.
- Support computing code object URI for memory either fro the loaded
  host executables, or from all mmapped files. Define the environment
  variable HSA_LOADER_ENABLE_MMAP_URI to non 0 to search the mmap
  files, otherwise only the loaded executables will be seatched.
- For mmap search, determine file size and ommit offset and size URI
  fragment when the code object is the whole file even when specifying
  a file size explicitly or specifying memory that has been mmaped.
- Always return a non-empty code object URI.
- When a code object reader is created, complete all fields to ensure
  it can be used in a multi-threaded manner using only const
  operations.
- Add missing exception handlers in the AMD vendor extentions.
- More rigorous checking for errors.

Change-Id: I07797b1dc60c5c64245142d77becf9f7c9643395
2020-06-25 12:18:50 -04:00
Vlad Sytchenko 5fb771a195 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>
2020-06-24 15:47:06 -04:00
Sean Keely 71d85855d7 Re-enable EDC reporting.
Change-Id: Iccd2532e22323ff5ba4c411b169fcda885968059
2020-06-23 18:23:50 -05:00
Vlad Sytchenko ed1c63877c Update README
find_package() should not be passed a namespace.

Change-Id: I36e99da144f3123385cda6cc9c7bbda7b2013b73
2020-06-23 11:49:47 -04:00
Vlad Sytchenko ea80e94756 Blit Object target and file should have different names
This is to avoid circular dependencies when using Ninja as a generator.

Change-Id: I703f225c9f342dfb07c36ad0920927c40c922fb8
2020-06-23 11:49:35 -04:00
Sean Keely 2e1b863195 Disable maybe-uninitialized error reporting in GCC.
New addrlib trips this warning in release builds on UB 18.04 with
gcc.

Change-Id: I4a8aa0e531fa21011ddde99d769a8452d333ff20
2020-06-22 17:02:11 -04:00
Ramesh Errabolu 17bd3b7da5 Refactor IPC test files
Change-Id: I879656b9e99f5cffb6adf16e0fea4e75220cd272
2020-06-22 15:04:12 -04:00
Sean Keely e9a4eff8a1 Update licensing and remove duplicate licenses.
Change-Id: I0aab6f310d96bf6c5a918e7a9c03713a00dc5c4a
2020-06-22 14:19:30 -04:00
Laurent Morichetti 4f1a9c8139 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
2020-06-20 01:22:52 -04:00
Sean Keely 2da92265ec Add copyright blocks to package shell scripts.
Change-Id: I864aa5c514ae96334009a9a729e344f36e27191b
2020-06-19 22:35:58 -04:00
Sean Keely bd51c61af8 Move tools only table interfaces into namespace rocr.
Change-Id: Ic0b8d958c2d27c921c6955a56110c6cdf5ba5e8e
2020-06-19 22:35:15 -04:00
Sean Keely e840b9d86f Add addrlib to static linking namespace.
Wrap addrlib in namespace rocr.  Remove extern "C" declaration.

Change-Id: I9f7fc60df3fc12ca72a71f13561692a8ddf9829c
2020-06-19 22:35:11 -04:00
Sean Keely 3646465429 Remove legacy build file.
Change-Id: I827664a5bb11bcea3176449cbf766b6cb3b93696
2020-06-19 22:35:05 -04:00
Sean Keely 2042ed3bdb Enforce uniform library names.
Static and dynamic builds should both output libhsa-runtime64.??
Current code produces libhsa-runtime64_static.a.

Change-Id: Ibf1983f560cd069b33d98fec432e3174a17d8d6c
2020-06-19 22:35:00 -04:00
Sean Keely 5c4f71191b Clang build errors.
Keep some warnings from being promoted to errors for addrlib
compilation with clang.

Change-Id: I6e5ae002e1d7a60e4d315f6bbadcf65734c2d287
2020-06-19 22:34:56 -04:00
Sean Keely 4081c564ee Update addrlib.
Corrects type errors and adds gfx1030 support.

Change-Id: I7fe7b5ded68b1e26fb899676712ad019089a45f3
2020-06-19 22:34:52 -04:00
Sean Keely 0dae86f686 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
2020-06-19 22:34:47 -04:00
Sean Keely 8fd41bd513 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
2020-06-19 22:34:43 -04:00
Sean Keely cce2345f0c Include linker script in static build usage requirements.
Defines the non-SC version of several functions.

Change-Id: I36b8c7791eb0d606029ff56ec48381abee5d2c1e
2020-06-19 22:34:39 -04:00
Sean Keely 87e54be4e7 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
2020-06-19 22:34:35 -04:00
Sean Keely 727cc9ccd3 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
2020-06-19 22:34:30 -04:00
Sean Keely 0be21c54a6 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
2020-06-19 22:34:26 -04:00
Ramesh Errabolu fa13208698 Add rocr namespace to core header and impl files
Change-Id: I1e1b33f9bba1078d049bc19797889988c3e43360
2020-06-19 22:34:21 -04:00
Sean Keely 99e2942949 Fix improper Min/Max operands.
Operands were relying on implicit type conversion which may result
in range errors.

Change-Id: I4b35ef92dcaf8b547aed02fea36aed75d392c6af
2020-06-19 22:34:16 -04:00
Sean Keely 8485a48756 Remove additional legacy build file.
Change-Id: Ib166ad9856114a4a846f37ff99bac4f870c414d9
2020-06-19 22:34:12 -04:00
Sean Keely ce19721c88 Update copyright date.
Change-Id: If4bf4c20cf051878bfe759080bb7345d884dd53d
2020-06-19 22:34:01 -04:00
Sean Keely cd26cbbe5f Update README.md
Describe the new build process, build dependencies, and usage.

Also remove some old known issues.

Change-Id: Iec85db378442e3e0ca091d551a42a40e6549ddb3
2020-06-19 22:33:36 -04:00
Sean Keely f4bb51476d 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
2020-06-19 22:33:36 -04:00