Sean Keely
f4521ce782
Revert "Reduce to only one internal compute queue."
...
This reverts commit 0eb534e3cf .
Change-Id: Ifcc5e148457243a6cf9ef277da7ab7c4e10f6fc9
2018-03-20 22:19:44 -04:00
Wilkin
8e3d26c617
ROCm Runtime Support for respecting target xnack setting
...
This includes the changes provided by Konstantin, "Add xnack from elf header" (Change 136389).
Change-Id: I95e51141caa0d7c21903b09212c02e4906ec54a3
2018-03-20 16:57:15 -04:00
Konstantin Zhuravlyov
b7915e9248
Bring loader in sync with stg sc.
...
Change-Id: Ib4d9231ca61048557acdad8eb8f632688c4aadd8
2018-03-12 15:00:50 -04:00
Sean Keely
ac5ccb45b7
Use atomic variable for Runtime ref_count_.
...
Change-Id: Ic4d0ad9ff93d0cc52cfe2df006ee3436d5960b07
2018-03-06 03:45:14 -06:00
Sean Keely
31c05d2fc7
Add exception safety to Runtime::Acquire.
...
Change-Id: Ia2a9baf08bb56971412f1ac3914592612de5f134
2018-02-28 05:21:07 -06:00
Sean Keely
95c926059d
Improve fragment map reporting format.
...
Change-Id: I85d09d085b08de46271ec902c766a8609a4b921a
2018-02-09 14:03:03 -05:00
Sean Keely
9212e7a09f
Emit fragment map and thunk ptr info with VM faults.
...
Change-Id: If1302f674df7a636529c64bf66dfdda755a70c32
2018-02-09 14:02:26 -05:00
Sean Keely
0eb534e3cf
Reduce to only one internal compute queue.
...
Change-Id: Ie42ecb3b242077624d74caeabfcd418dbbd9ff3e
2018-02-09 14:02:15 -05:00
Sean Keely
bd5dd47ca1
Defer creation of internal queues and blits until first needed.
...
Change-Id: I2e61d7e102f38389d806d9eb24beda910573157b
2018-02-09 14:02:07 -05:00
James Edwards
b913795c31
: Fix compilation errors with gcc 7.2.1 for hsa runtime.
...
Change-Id: I3356388753ca78cc0f1e0c3188220d7f3f60283d
2018-02-07 09:22:39 -06:00
Evgeny
8a8d7ad814
ExecutePM4 queue full check fix
...
Change-Id: Id56ece6d3f5eab1ef3a2758922022f0996c1efe4
2018-02-05 19:35:39 -06:00
Chris Freehill
3449f7dea6
Don't support platform atomics for gfx9XX
...
Change-Id: I302c862494e221ae2b6b3e1a843f06586b0b28ba
2018-02-02 18:21:16 -05:00
Sean Keely
f59b001c75
Guard against IPC signal use of when profiling copy APIs.
...
Also update IPC signal API text to allow single process profiling with IPC signals.
Change-Id: I90b246623129d57183acb4ba1789beec360547c3
2018-01-31 19:05:32 -05:00
Sean Keely
91f559802d
Revert CRAT table workaround.
...
Change-Id: Ic2bf9e1fb1d00c5a31d52560e0eb37e0ae1ab08a
2018-01-30 18:26:53 -06:00
Tony Tye
d472b24d05
Add support for R_AMDGPU_RELATIVE64
...
- Add support for R_AMDGPU_RELATIVE64 relocation record.
- Return status error if any unsupported relocation record encountered.
Change-Id: Icbb5dcb81109a70c1f2195412a0df58a11be9da1
2018-01-30 18:20:26 -05:00
Chris Freehill
563581223c
Report physical memory instead of virtual memory
...
Change-Id: I18105e3982a96aea40e05cd78521c0c3acf75de4
2017-12-20 22:11:50 -04:00
Sean Keely
fe1763848a
Merge system heap info.
...
Workaround pending thunk spec clarification.
Change-Id: I9d96227efde3a551157733cf4050d474d1e658f2
2017-12-19 18:57:29 -06:00
Sean Keely
b49e5b4917
Remove region/pool size limits for 902.
...
Temporary measure. Must be reverted once CRAT tables have been fixed.
Change-Id: Id2f2673edbf7b6fc5752f8d871042b4bf4de653c
2017-12-14 16:02:05 -05:00
Sean Keely
1addb5e684
Don't use double mappings on GFX9 APUs.
...
Change-Id: I1225696211d4eac9ce982243ea0a1a9e8b2a318f
2017-12-08 20:18:02 -05:00
Sean Keely
ca4c884306
Report library load errors in debug builds.
...
Change-Id: I24e63b15ad74fb86ecfe839f543800c2140c09d9
2017-12-05 18:49:33 -05:00
Sean Keely
d2e70bb999
Cleanup Signal interfaces for doorbells.
...
Create an interface for doorbell signals to reduce code duplication.
No functional changes.
Change-Id: I101a8997dd582ff99e1537758c804b21fe3bb6af
2017-11-28 22:12:19 -06:00
Sean Keely
b93ffafdc7
Pull from github (tstellar):
...
Prefer using memfd_create() for the ring buffer.
We were using /dev/shm, but this won't work on systems that
either don't have /dev/shm or have mounted it with noexec, because
for everything other than gfx700 we map the ring buffer with PROT_EXEC.
memfd_create() is Linux specific and was added in Linux 3.17, so we
will fallback to using /dev/shm on systems where memfd_create() is
not available.
Change-Id: I58fb533eebc362f6d29dc3e316a80801014d50e8
2017-11-28 20:47:12 -05:00
Sean Keely
4b603e803d
Improve loop variables.
...
Derived from github pull request by folklore1984.
Change-Id: I70cd3da131691543fed8bf913d6245d41c49280d
2017-11-28 20:36:22 -05:00
Sean Keely
5872b618de
Pull from github (pmargheritta):
...
Corrected semantics used in hsa_queue_load_write_index_relaxed.
The semantics that was used in hsa_queue_load_write_index_relaxed
didn't seem to match the name of the function.
I also removed a useless return keyword.
Change-Id: If3819d38fb367f122fc382edf8ee3771a23279ae
2017-11-28 20:35:50 -05:00
Evgeny
86939368d1
_aqlprofile_start() API migration
...
Change-Id: I7c8c7a6fc6f9b20cc2e4074dde38fb19440927f1
2017-11-20 17:32:19 -05:00
Chris Freehill
651ae1bf70
Device ID/family corrections for gfx9xx
...
Change-Id: Icb25fbbaeb99ce886a2852b48d02875ee0f197a2
2017-11-16 07:27:54 -05:00
Evgeny
6e1b9288f6
aqlprofil API: removing from HSA hsa_api_trace/hsa_ext_interface
...
Change-Id: I12fac55ea9ccfdb119899bf9d000e3c8b0bf4bbb
2017-11-11 10:01:12 -06:00
Evgeny
bb8eaf3ac8
aqlprofile API: _aqlprofile_start() returns required profile buffer sizes if undersized
...
Change-Id: Ib14b2cb2e7e2026c3af0b7bd2f08f51e48e598b2
2017-11-09 20:03:55 -06:00
Sean Keely
6455a69b03
Fix bad casts in tools.
...
Also virtualize queue profiling enable.
Change-Id: I761b41269be3df7eb64a5914ee9951ed6b51bb04
2017-11-08 15:50:02 -05:00
Sean Keely
a6d8a48cbc
Add callback exception forwarding.
...
Modified callbacks for intercept queue, queue error, iterate agent and
iterate region.
Change-Id: I8bdd67f2312510ea7eb9caec93babca244938b40
2017-11-08 15:50:02 -05:00
Sean Keely
f312a7386e
Exception support for Queue.
...
Remove "zombie" queue state and report queue creation failure via
exceptions. Make Shared object a final container and support array
objects with Shared. Add message printing to hsa_exception in
debug builds.
Change-Id: I459f38c80846018acbf45538874e95f91dd6b195
2017-11-08 15:50:02 -05:00
Sean Keely
0c7dde2d1f
Add queue intercept support to the runtime.
...
Queue intercept is exposed as two tools-only APIs via the API
intercept table.
Change-Id: Iac9602ed3143974d85c3569e9092295ad18037f8
2017-11-08 15:50:01 -05:00
Kent Russell
b29d3f63e2
Revert "aqlprofile API: _start() sets buffers sizes with NULL ptr; block counters reg number / block name info"
...
This reverts commit 3daa85fad8 .
Change-Id: Ie90b091df772bf9391494c773d63858aafbc1176
2017-11-08 06:59:33 -04:00
Evgeny
3daa85fad8
aqlprofile API: _start() sets buffers sizes with NULL ptr; block counters reg number / block name info
...
Change-Id: I3cb93453b683c55bf5ec26271648232306a5d140
2017-11-07 15:05:47 -05:00
Sean Keely
d93f92f42d
Make HostQueue::queue_count_ a portable atomic type.
...
Also make lint happy.
Change-Id: I0f965df6a76fd959df9eb411d1f1b11847159790
2017-10-31 02:38:25 -05:00
Qingchuan Shi
ce6aee01ed
Add APIs to support debugging vm fault
...
1. Add hsa ext api hsa_amd_register_vmfault_handler for debugger to register callback in case of VM fault.
2. Extend hsa_ven_amd_loader API to:
(1) iterate loaded code objects in executable:
hsa_ven_amd_loader_executable_iterate_loaded_code_objects
(2) get loaded code object info:
hsa_ven_amd_loader_loaded_code_object_get_info
3. Make the id of hsa_queue the same as the one used in communication with thunk (for amd_aql_queue)
Change-Id: I68910809e59e24297350d262606f00e96c14bcbd
2017-10-28 21:48:26 -04:00
Sean Keely
6ee2ccb08b
Fix error message description.
...
Change-Id: I32efed68e970a4882aca9decbbcda3fcd5c5cb43
2017-10-24 21:52:21 -05:00
Sean Keely
5a4ab91be1
Set doorbell kind code for gfx9+ device enqueue.
...
Change-Id: I93c4cea677ae51f97ac768614333743fb26b2f54
2017-10-21 11:08:44 -04:00
Sean Keely
a8d818a6bc
Improve build system handling of non-default directory layouts.
...
Adds the thunk include and lib paths to the cache, removes paths
to indicator files from the cache, uses the cached path directory
(if any) as a search hint for indicator files.
Change-Id: I0859faa8d229a97abfaacb408d2c831e317aed5f
2017-10-21 11:08:15 -04:00
Sean Keely
3cef9b1a04
Improve unhandled exception error reporting in debug builds.
...
Change-Id: Ia92d1a93163105d817a2147d96f2edd399e2b70d
2017-10-21 11:08:01 -04:00
Sean Keely
737966eb25
Fix memory leak in exception path.
...
Change-Id: Iad5f035cd1909be4a8f1a1f5dd7ca5abec0694b4
2017-10-21 11:08:00 -04:00
Ramesh Errabolu
dccbc9f2af
Changes to support surfacing of link weight as part of link info
...
Change-Id: I1c0705a9374af1245f0419c51beded0d7ee10639
2017-10-20 12:09:31 -04:00
Chris Freehill
a7cbe78366
Use Major/Minor/Step device numbers to differentiate gfx devices
...
Change-Id: I0901871971a5b33018917ada6c0e69ac7aa91944
2017-10-13 16:18:24 -04:00
Sean Keely
4f299a9909
Capture more memory allocation types with the 2MB allocator.
...
TensorFlow was running out of VRAM due to padding up allocations
from legacy memory APIs. These allocations have been added to
the fragment allocator to improve VRAM utilization.
Change-Id: Ic680fff576a0434b3b17a4c91746da44e09957fa
2017-10-12 23:22:10 -04:00
Evgeny
fd99e909ff
aqlprofile API: enabling privilege memory related counters
...
Change-Id: I28a24ad1a3ce78c5d8a6319635ae1ffd392ab690
2017-10-09 17:34:54 -05:00
Sean Keely
9ba83d83f7
Release cached memory blocks when memory allocation fails and retry.
...
Change-Id: I6d96e136e147d8ffe9ff7baec26b4b5a678b739f
2017-10-03 20:12:05 -04:00
Sean Keely
e9a6f2c3e6
Support hsa_amd_agents_allow_access on page fragments.
...
Since access may only be manipulated on whole pages, suballocator fragments must cooperate to set the page's access.
Since the KFD does not migrate memory on access changes this implementation makes agent access sticky across the requests in a fragmented page.
Change-Id: I88479ed45fb40e9782b704526a7b8ffb22e7bd76
2017-09-27 19:04:04 -05:00
Evgeny
0e88414f5c
removing graphics specific block RMI, ennabling memory related blocks
...
Change-Id: I477adc49b9ee3c8593c193bdc69c0deb4a9726e1
2017-09-25 10:49:22 -05:00
Sean Keely
476c8e36bf
Fix assert in simple_heap.
...
Also add comments to clarify pointer info constraints.
Change-Id: I8d07831a0e953d667c84c96fe53ed07c18ba115c
2017-09-21 00:47:18 -04:00
Sean Keely
30fce248c6
Enable use of CLOCK_MONOTONIC_RAW for post 4.4 kernels.
...
Change-Id: I3c1f27c7e639df5128c36d81f715fa16e6c1cf13
2017-09-20 14:28:23 -04:00