1371 کامیت‌ها

مولف SHA1 پیام تاریخ
Sean Keely ecbd2eb820 Remove region/pool size limits for 902.
Temporary measure. Must be reverted once CRAT tables have been fixed.

Change-Id: Id2f2673edbf7b6fc5752f8d871042b4bf4de653c


[ROCm/ROCR-Runtime commit: b49e5b4917]
2017-12-14 16:02:05 -05:00
Sean Keely b8934623ee Don't use double mappings on GFX9 APUs.
Change-Id: I1225696211d4eac9ce982243ea0a1a9e8b2a318f


[ROCm/ROCR-Runtime commit: 1addb5e684]
2017-12-08 20:18:02 -05:00
Sean Keely e155bd0cb1 Report library load errors in debug builds.
Change-Id: I24e63b15ad74fb86ecfe839f543800c2140c09d9


[ROCm/ROCR-Runtime commit: ca4c884306]
2017-12-05 18:49:33 -05:00
Sean Keely a427fde26a Cleanup Signal interfaces for doorbells.
Create an interface for doorbell signals to reduce code duplication.
No functional changes.

Change-Id: I101a8997dd582ff99e1537758c804b21fe3bb6af


[ROCm/ROCR-Runtime commit: d2e70bb999]
2017-11-28 22:12:19 -06:00
Sean Keely 495c1da5f3 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


[ROCm/ROCR-Runtime commit: b93ffafdc7]
2017-11-28 20:47:12 -05:00
Sean Keely 37132e4a21 Improve loop variables.
Derived from github pull request by folklore1984.

Change-Id: I70cd3da131691543fed8bf913d6245d41c49280d


[ROCm/ROCR-Runtime commit: 4b603e803d]
2017-11-28 20:36:22 -05:00
Sean Keely 7ed62f815f 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


[ROCm/ROCR-Runtime commit: 5872b618de]
2017-11-28 20:35:50 -05:00
Evgeny acce35d21f _aqlprofile_start() API migration
Change-Id: I7c8c7a6fc6f9b20cc2e4074dde38fb19440927f1


[ROCm/ROCR-Runtime commit: 86939368d1]
2017-11-20 17:32:19 -05:00
Chris Freehill ed0537ed67 Device ID/family corrections for gfx9xx
Change-Id: Icb25fbbaeb99ce886a2852b48d02875ee0f197a2


[ROCm/ROCR-Runtime commit: 651ae1bf70]
2017-11-16 07:27:54 -05:00
Evgeny acaf0d0aac aqlprofil API: removing from HSA hsa_api_trace/hsa_ext_interface
Change-Id: I12fac55ea9ccfdb119899bf9d000e3c8b0bf4bbb


[ROCm/ROCR-Runtime commit: 6e1b9288f6]
2017-11-11 10:01:12 -06:00
Evgeny fd81986bb2 aqlprofile API: _aqlprofile_start() returns required profile buffer sizes if undersized
Change-Id: Ib14b2cb2e7e2026c3af0b7bd2f08f51e48e598b2


[ROCm/ROCR-Runtime commit: bb8eaf3ac8]
2017-11-09 20:03:55 -06:00
Sean Keely 76c28f38c4 Fix bad casts in tools.
Also virtualize queue profiling enable.

Change-Id: I761b41269be3df7eb64a5914ee9951ed6b51bb04


[ROCm/ROCR-Runtime commit: 6455a69b03]
2017-11-08 15:50:02 -05:00
Sean Keely 0fcdd63d88 Add callback exception forwarding.
Modified callbacks for intercept queue, queue error, iterate agent and
iterate region.

Change-Id: I8bdd67f2312510ea7eb9caec93babca244938b40


[ROCm/ROCR-Runtime commit: a6d8a48cbc]
2017-11-08 15:50:02 -05:00
Sean Keely e2efba0676 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


[ROCm/ROCR-Runtime commit: f312a7386e]
2017-11-08 15:50:02 -05:00
Sean Keely 2406218416 Add queue intercept support to the runtime.
Queue intercept is exposed as two tools-only APIs via the API
intercept table.

Change-Id: Iac9602ed3143974d85c3569e9092295ad18037f8


[ROCm/ROCR-Runtime commit: 0c7dde2d1f]
2017-11-08 15:50:01 -05:00
Kent Russell c52d3b6997 Revert "aqlprofile API: _start() sets buffers sizes with NULL ptr; block counters reg number / block name info"
This reverts commit 8518a48d4f.

Change-Id: Ie90b091df772bf9391494c773d63858aafbc1176


[ROCm/ROCR-Runtime commit: b29d3f63e2]
2017-11-08 06:59:33 -04:00
Evgeny 8518a48d4f aqlprofile API: _start() sets buffers sizes with NULL ptr; block counters reg number / block name info
Change-Id: I3cb93453b683c55bf5ec26271648232306a5d140


[ROCm/ROCR-Runtime commit: 3daa85fad8]
2017-11-07 15:05:47 -05:00
Sean Keely cb47089c17 Make HostQueue::queue_count_ a portable atomic type.
Also make lint happy.

Change-Id: I0f965df6a76fd959df9eb411d1f1b11847159790


[ROCm/ROCR-Runtime commit: d93f92f42d]
2017-10-31 02:38:25 -05:00
Qingchuan Shi 3e9a0561c0 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


[ROCm/ROCR-Runtime commit: ce6aee01ed]
2017-10-28 21:48:26 -04:00
Sean Keely 0a4a1a2433 Fix error message description.
Change-Id: I32efed68e970a4882aca9decbbcda3fcd5c5cb43


[ROCm/ROCR-Runtime commit: 6ee2ccb08b]
2017-10-24 21:52:21 -05:00
Sean Keely 8122fbebad Set doorbell kind code for gfx9+ device enqueue.
Change-Id: I93c4cea677ae51f97ac768614333743fb26b2f54


[ROCm/ROCR-Runtime commit: 5a4ab91be1]
2017-10-21 11:08:44 -04:00
Sean Keely 5dfef3ef77 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


[ROCm/ROCR-Runtime commit: a8d818a6bc]
2017-10-21 11:08:15 -04:00
Sean Keely 41615ea7d5 Improve unhandled exception error reporting in debug builds.
Change-Id: Ia92d1a93163105d817a2147d96f2edd399e2b70d


[ROCm/ROCR-Runtime commit: 3cef9b1a04]
2017-10-21 11:08:01 -04:00
Sean Keely bdb5edad34 Fix memory leak in exception path.
Change-Id: Iad5f035cd1909be4a8f1a1f5dd7ca5abec0694b4


[ROCm/ROCR-Runtime commit: 737966eb25]
2017-10-21 11:08:00 -04:00
Ramesh Errabolu a4d753615b Changes to support surfacing of link weight as part of link info
Change-Id: I1c0705a9374af1245f0419c51beded0d7ee10639


[ROCm/ROCR-Runtime commit: dccbc9f2af]
2017-10-20 12:09:31 -04:00
Chris Freehill 26ebd1727c Use Major/Minor/Step device numbers to differentiate gfx devices
Change-Id: I0901871971a5b33018917ada6c0e69ac7aa91944


[ROCm/ROCR-Runtime commit: a7cbe78366]
2017-10-13 16:18:24 -04:00
Sean Keely 93e58b9100 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


[ROCm/ROCR-Runtime commit: 4f299a9909]
2017-10-12 23:22:10 -04:00
Evgeny b07cbdc10e aqlprofile API: enabling privilege memory related counters
Change-Id: I28a24ad1a3ce78c5d8a6319635ae1ffd392ab690


[ROCm/ROCR-Runtime commit: fd99e909ff]
2017-10-09 17:34:54 -05:00
Sean Keely 06c7997137 Release cached memory blocks when memory allocation fails and retry.
Change-Id: I6d96e136e147d8ffe9ff7baec26b4b5a678b739f


[ROCm/ROCR-Runtime commit: 9ba83d83f7]
2017-10-03 20:12:05 -04:00
Sean Keely 21a65a1233 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


[ROCm/ROCR-Runtime commit: e9a6f2c3e6]
2017-09-27 19:04:04 -05:00
Evgeny 64b516415c removing graphics specific block RMI, ennabling memory related blocks
Change-Id: I477adc49b9ee3c8593c193bdc69c0deb4a9726e1


[ROCm/ROCR-Runtime commit: 0e88414f5c]
2017-09-25 10:49:22 -05:00
Sean Keely 36d1168183 Fix assert in simple_heap.
Also add comments to clarify pointer info constraints.

Change-Id: I8d07831a0e953d667c84c96fe53ed07c18ba115c


[ROCm/ROCR-Runtime commit: 476c8e36bf]
2017-09-21 00:47:18 -04:00
Evgeny 4c5404b89d adding hsa_ven_amd_aqlprofile.h to the packaging
Change-Id: I3b69396e3cea129106d47be53218213e29de9843


[ROCm/ROCR-Runtime commit: fcaecfee80]
2017-09-20 14:40:49 -04:00
Sean Keely 595c7130d2 Enable use of CLOCK_MONOTONIC_RAW for post 4.4 kernels.
Change-Id: I3c1f27c7e639df5128c36d81f715fa16e6c1cf13


[ROCm/ROCR-Runtime commit: 30fce248c6]
2017-09-20 14:28:23 -04:00
Sean Keely c5f1027982 Improve branch elimination in ScopedAcquire.
GCC can't reasonably be told that the lock ptr isn't null.  Adding a private bool
allows the branch to be eliminated, along with the bool.

Change-Id: I0605d69474d6a6e6951be93c0af1d8caf3f77124


[ROCm/ROCR-Runtime commit: 9dfdce5b3c]
2017-09-19 06:08:36 -04:00
Sean Keely 3aeea948cb Add env key to disable 2MB suballocation.
Change-Id: Icca3041c3578aa180a656c01aae62f2ad6e8b583


[ROCm/ROCR-Runtime commit: 4275661682]
2017-09-19 06:08:36 -04:00
Sean Keely 9fd778eec1 Add suballocator for ordinary VRAM allocations smaller than 2MB.
Track pointer info for sub 2MB fragment allocations in allocation_map_.

Add fragment support to IPC.

Change-Id: I00cfc2e2fa289aac90a4718c392f9bb056a61a87


[ROCm/ROCR-Runtime commit: 117be0b55a]
2017-09-19 06:08:36 -04:00
hthangir 3dc1b18d54 Use non-RAW version in clock_getres to workaround bug in older kernels
Change-Id: Ice0606a42cd7054f0804baf4af3521ffae3b7d50


[ROCm/ROCR-Runtime commit: 87d2df3da3]
2017-09-14 13:56:15 -05:00
Sean Keely e150edc48c Report tools library load failures in debug builds.
Change-Id: Ie1ff313e929fc46134e58730a1d370c5d7ace8db


[ROCm/ROCR-Runtime commit: f1a661dedb]
2017-08-31 21:32:48 -04:00
Laurent Morichetti b2cb6bca96 Include <errno.h> for EBUSY
Change-Id: I9fa3417445866f3ce37af2169f623afa8e92e873


[ROCm/ROCR-Runtime commit: 0f05ef73ac]
2017-08-31 07:32:51 -07:00
Evgeny e18c7098a3 aqlprofile api: adding gfx8 mc counters
Change-Id: I84dc06c24b7961dfe665cf7e2ae6cc9ae3b7326b


[ROCm/ROCR-Runtime commit: 09c732c2f9]
2017-08-23 15:23:05 -05:00
Sean Keely 4ff7a53721 Correct vm_fault signal cleanup.
Change-Id: Id2f14b911e3991a76771425bc09f38a613280e6b


[ROCm/ROCR-Runtime commit: 0cb1e8cb35]
2017-08-18 22:12:38 -04:00
Evgeny 1fcbd14d89 AqlProfile API, commenting out hanging GFX9 blocks, ATC, GCEA, RPB
Change-Id: I411fb33f77c9538ca236b9b6b09c7dfe75220c02


[ROCm/ROCR-Runtime commit: fb4afca8c3]
2017-08-15 12:44:00 -05:00
Sean Keely 468313f9b5 Simplify pointer info version check.
Change-Id: I0ed363f1261ffc041547f313970ca67298ace56c


[ROCm/ROCR-Runtime commit: dec5c52e07]
2017-08-12 03:14:39 -04:00
Sean Keely 546c179cfc Initial IPC signal support.
Added an API for creating signals with attributes.
Added two APIs for IPC operations on signals.
Initial use of exceptions for error handling.

Add ref counting to signals.
Removed spin loops from signal destructors.
Signals are no longer to be destroyed with delete, use DeleteSignal instead.
Added delete safety to doorbells.
Added secondary hsa_signal_t -> Signal* translation path for IPC enabled signals.

Change-Id: Id59065d002f0c2566b0a9425694da2ed27cb7d7f


[ROCm/ROCR-Runtime commit: c9642cf7af]
2017-08-11 18:41:34 -05:00
Sean Keely 550547f404 Initial exception support for signals.
Also separate signal ABI block allocations from the runtime interface object.

Change-Id: If16763338db664f29163a1348f8f4c38cf0597b2


[ROCm/ROCR-Runtime commit: 2732b18092]
2017-08-11 18:41:34 -05:00
Evgeny ce72ce0c92 adding aqlprofile member to HsaApiTable
Change-Id: Id674186dfa2e83295a51f770ccc0400f1cb51a98


[ROCm/ROCR-Runtime commit: 287afd3a52]
2017-08-09 16:09:39 -05:00
Evgeny 200067f1be Adding HSA_API macro to the API method declarations to be consistent with other HSA header files, TCS removing
Change-Id: Ic217d3b2bdbb22d3600c5ecaacb7ab53bf26096a


[ROCm/ROCR-Runtime commit: 4824a2db0b]
2017-08-08 10:46:12 -04:00
Evgeny c0c32288ac aqlprofile block list, explicit numbers assigned, IA removed
Change-Id: I9f9358f8e03e13eb81845de2e33dd5f3da27811a


[ROCm/ROCR-Runtime commit: 47322942b3]
2017-08-03 11:39:21 -04:00
Evgeny d224dc274f aql-profile api: reducing blocks list to compute only and new gfx9 blocks
Change-Id: Ib506b82ea407afec4f5d4bcad755d4d57b92e34b


[ROCm/ROCR-Runtime commit: c66f68041c]
2017-08-02 12:21:24 -04:00