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
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
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
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
- 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
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
Static and dynamic builds should both output libhsa-runtime64.??
Current code produces libhsa-runtime64_static.a.
Change-Id: Ibf1983f560cd069b33d98fec432e3174a17d8d6c
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
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
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
libelf does not natively support cmake packages and is not located
by cmake's default system library modules.
Change-Id: I4e7cda32615febf9f45ccc15f4e2a3f3505804bb
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
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
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
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
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
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
- Check address is in the range of the mapped file.
- Correct calculation of offset within the file.
Change-Id: I848a3ead4422698c2ef1c140bc8ae5e000a717f7
Set ttmp11[8] and send a signal for the debugger when the handler
is entered because of an address watch exception.
Change-Id: Icc83a79027bb7ca1e50e19e2f00464cb9ca862f3
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
Zero size pools have no numa bindings. Selecting a pool with numa
bindings should prevent thrashing due to numa balancing daemon.
Change-Id: Ib0082cb9af66e24e07a2adbb83c1045145d51403