Commit Graph

288 Commits

Author SHA1 Message Date
Sean Keely 5975c465ad Fully initialize GPU agents before loading tools.
Required for debug agent requires copy API and trap handler to be initalized
prior to loading.  Existing tools do not make use of internal queue or scratch
memory intercept which is what PostToolsInit allows.

PostToolsInit() will be removed in a following cleanup change.

Change-Id: If43377843808e3eff0defd9204910a67a852902f
2018-10-20 23:12:14 -04:00
Sean Keely 6852282a07 Refactor of Runtime::CopyMemory()
Change-Id: I32a7cb24d00660ff4471d121ef7b3c2eec8fced2
2018-10-20 14:38:50 -04:00
Konstantin Zhuravlyov 509bb777e0 Loader: Update license for AMDHSAKernelDescriptor.h
Change-Id: I3a48b595ba089ca8a25f878c056b04a417a2364f
2018-10-12 14:51:05 -04:00
Sean Keely 1e0d690948 Use ptrinfo rather than apertures in hsa_memory_copy
Apertures now overlap with the change to 48bit addressing which
precludes using aperture checks to discover buffer ownership.
Switches to ptrinfo to decide which device a buffer owned by.

This corrects faults in the legacy hsa_memory_copy api.

Change-Id: I5c7ce0216e1cdc96f836fc6fec9c3defdf4b9d90
2018-10-11 13:34:53 -04:00
Konstantin Zhuravlyov 386874da55 Loader: Add support for v3 object code.
Change-Id: I7215bd0c1277c2036bf0fadf5b23cb57fdf7f665
2018-10-06 14:01:59 -04:00
Jay Cornwall f1ffbc3286 Revert "Extend SDMA disable list until firmware stability resolved"
This reverts commit 5e1ccdc4a9.

Change-Id: I17b379e4d0e49a79dc8d4a60f01ea424fda24f02
2018-10-05 15:17:27 -04:00
Kent Russell ed9baefd75 Only remove ldconf on uninstall
On update, the removal will occur AFTER the new package is installed,
due to some stupidity with how yum/rpm does things. Only remove it if
we're doing a pure uninstall

Change-Id: I4982610828d8bc1f2d8691b1e4ee1718c89413cc
2018-10-03 08:10:06 -04:00
Evgeny fdbe277f2a hsa_ven_amd_aqlprofile_pfn_t alias
Change-Id: Ia4a67ef0d2f8975f0e541e85c215afec76e9de5f
2018-09-26 14:10:21 -04:00
Scott Linder 47f0e6f7d3 Apply dynamic relocations for STT_FUNC symbols
Required to support function calls through GOT table.

Change-Id: I174a0269fdd67369d38fe41855b7bd01f350b839
2018-09-23 21:42:32 -04:00
Ramesh Errabolu 01eea21d6c Capture number of Numa Nodes present on system
Change-Id: Ic789a6b9da8e316cb483e50b0fe9faa03798f97c
2018-09-18 16:27:30 -05:00
Ramesh Errabolu f007870792 ROCr changes to enable small BAR P2P over xGMI
Change-Id: I6aaa3fe2565cdf7e15d58a7484d6bd5916ffff64
2018-09-17 22:54:40 -04:00
Evgeny 81532bb6f5 VERSION_MINOR macro typo fix
aqlprofile info ENABLE_CMD enum adding;

Change-Id: I7b19082144d2bd0bf7af7ddc282358168b225759
2018-09-17 20:49:47 -04:00
Sean Keely 3357cadeec Check fill addresses for alignment.
Check was documented but missing.

Change-Id: I97951635d794fd22e20c25d20e9d0e35035254af
2018-09-05 16:34:19 -04:00
Sean Keely 2843988dd7 Remove redundant initialization.
LinkInfo is already initialized to zero in its default constructor.

Change-Id: Ifa4fb886cce9b474c6879c9c82744044ab394082
2018-08-29 19:36:07 -04:00
Sean Keely 56ed5c8904 Refactor blocking sdma commands.
Remove fence pool and use two signals.  Two signals allows overlapped
submission and copy while reducing thread busy polling.

Change-Id: Idb5f8e4c7f482a596ffce9e7799191fdd785a216
2018-08-29 19:13:23 -04:00
Sean Keely e0839ab27e Implement SDMA copy rect for gfx9.
Fix pitch overflow due to small element detection.
Add wide pitch 2D copy handling.
Cleanup code duplication.

Change-Id: I93b1584aba8e5964957eb7ab3544df806ca3e2f9
2018-08-29 19:13:07 -04:00
Sean Keely aca00b7238 Add debug checking of time stamps validity.
Can only check that the signal has some time stamp, can't check if
the translating agent matches the last used agent or not.

Change-Id: I62943a864318808059c617280bb65a269dfadd1b
2018-08-26 12:36:35 -04:00
Sean Keely cd8e5c1da8 Expose ROCr build ID.
Adds HSA_AMD_SYSTEM_INFO_BUILD_VERSION=0x200 to hsa_system_info_t.
This returns a const char* pointing at the build string (git describe).

Change-Id: I73e6612482bf6ffc4037fd365808eb9211a650ad
2018-08-20 20:44:32 -05:00
Sean Keely 6c47780620 Experimental flag to swap copy agent for async copy APIs.
Adds env flag HSA_REV_COPY_DIR.  If set to 1 async copy will
copy from dst device to src device rather than from src to dst.

Change-Id: I3095642066fa026dc112c2eac06db9393341cd7e
2018-08-09 10:58:14 -04:00
Jay Cornwall 5e1ccdc4a9 Extend SDMA disable list until firmware stability resolved
Change-Id: I5e21cb761ae970ba2b68edd97b1564b36ca1f0f4
2018-08-08 11:20:14 -05:00
James Edwards 4d7d50feba Add tools headers and library back to packaging.
Change-Id: If6c9befe50fc111eb154bd5b4eb5c7858f5d510b
2018-07-16 16:51:12 -04:00
Sean Keely 35a270ef7e Do not initialize runtime internal queues based on mapping memory to a GPU.
Conserves VMIDs when multiple processes are in use and memory operations
are not GPU specific.  For instance HIP API hipHostMalloc does not accept
a target GPU so when used with one process per GPU (ie GPU == MPI rank) we can
quickly exceed the available VMID slots if every process consumes a VMID on
every GPU.

Change-Id: Ib6fa051290089f71581029c09f9a44b9992237d1
2018-07-13 19:58:45 -04:00
Sean Keely c6cf161125 Fix git describe command to retrieve version tags correctly.
Change-Id: I904f5ccdb88c1e28d5eeffd104174fcd57626ee7
2018-07-10 20:19:04 -05:00
Wilkin 170e2a142f OpenCL BLIT for Image library
- include support for gfx702

Change-Id: If681a4eef9bd076e25300e1c1bca55b4f7c92b46
2018-07-06 10:35:44 -04:00
James Edwards 58a411dd36 Change packaging for rocr-dev and rocr-ext.
Change-Id: Ia096a2d31ddd7bef2e05bb3d6c58e94d8c339598
2018-07-02 13:40:45 -05:00
Jay Cornwall e388a23344 Add hsa_amd_queue_set_priority extension function
Controls dispatch and wavefront scheduling arbitration across quees.

Change-Id: I498f4898b544f79b8fb8514bf7e789ca9da29462
2018-06-19 19:41:28 -05:00
Sean Keely 3e3aa37750 Enable SDMA use without platform atomic support.
SDMA will use atomic completion fences if KFD reports 64bit atomic support.
Otherwise it will fall back to store completion fences.

Change-Id: I12b76f8a74ec3ee96372c250f9824d846051536e
2018-06-12 15:38:44 -04:00
Felix Kuehling 5f25d024a8 Prepare for hsakmt build system cleanup
These fixes are needed to find the hsakmt headers and libraries with
an upcoming hsakmt build system cleanup. It should continue to work
with the original hsakmt build system.

Change-Id: I6b3fcea8f2588698c130c9ec50952c66712afa6c
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
2018-06-05 16:01:03 -04:00
Sean Keely f09eb2e8c7 Move SDMA dependencies back to hardware.
SDMA poll packet preemption has been fixed.

Change-Id: I3da878c433d4594a169e3bc8f173d3651448fd2d
2018-05-29 23:32:47 -04:00
Sean Keely c593dfc6bf Enable SDMA conditionally based on link atomic suport.
Avoids using non-atomic SDMA fences by default since that path can duplicate fences.
If HSA_ENABLE_SDMA is set this will override copy path selection and may use
non-atomic fences.

Change-Id: I4747e9a766f7f649d21ddf6bfded047ac26fd60e
2018-05-29 23:32:34 -04:00
Jay Cornwall 536823482b Handle llvm.trap only in gfx9 trap handler
llvm.debugtrap and other trap IDs are reserved and should not place
the queue into an error state.

Change-Id: I98193a35ac7da94c4a42ee75d87754ee552ebea0
2018-05-04 13:15:23 -05:00
Evgeny 0e0be791ec Tool load failure report changing to unconditional print bcos it's already is controlled with the env var
Change-Id: I91b400ba94575a32005e825e6b41bda05c55b357
2018-05-03 22:31:17 -05:00
Sean Keely a20cceb425 Relax large scratch cutoff.
Optimize for few queues rather than max.

Change-Id: I6531427319d3b2109b70d98fdb51daee7ffe4403
2018-04-30 07:25:22 -04:00
Sean Keely 5f25619bb7 Enable large scratch on GFX8.
Ensure system release fence is set on GFX8 large scratch using packets.

Change-Id: I13cfdcd35969482ea6e95e0b352f5cb3a0454b86
2018-04-30 07:24:53 -04:00
Evgeny 0fcd2fa56e aqlprofile: get version API
Change-Id: I3a85c088bfff3f54d8829e17cdafd7dfcdfb0c1d
2018-04-27 23:11:16 -04:00
Evgeny b37027e347 aqlprofile: read API
Change-Id: I896b1fbf1c19608197ac0a99b9d467d8c1bee775
2018-04-27 11:00:08 -05:00
Sean Keely 7cd6e366ed Workaround SDMA poll packet preemption.
Use async. signal handler to satisfy dependencies for SDMA blits.

Change-Id: Ifa8d3ee6810509f400a568ca2387ac6ab3ab7c36
2018-04-26 02:00:33 -05:00
Qingchuan Shi 49d2175c74 debug suport for queue error.
1/ Revised debug event handler to handle different events.
2/ Added queue error handler using the callback in queue create, which will print out wave info when queue in error state.
3/ Preempt queue instead of destory queue when queue error state.

Change-Id: Ib727d208de9caf1c72c76d42268483b24aaebde8
2018-04-20 14:25:16 -04:00
Sean Keely b66764e4c6 Disable large scratch on GFX8.
Temporary pending firmware fix.

Change-Id: Id1b1ecef421bc97327fd0d2e6225549a6e81dba0
2018-04-19 20:26:12 -05:00
Evgeny 5a6f47c475 aqlprofile API: adding SQTT SE_MASK parameter
Change-Id: I0149692c2249c6d84ca710ce64e7346784ae593f
2018-04-16 16:39:42 -05:00
Hari Thangirala 3e0cd85d69 Allow HSA_ENABLE_SDMA to override runtime defaults.
Change-Id: I2305304228010157bfb589c365f4a998577231cd
2018-04-10 12:56:48 -04:00
Konstantin Zhuravlyov 7ef70f7eaa Bring naming on par with the spec (hsa-runtime)
Change-Id: Ie1903c90a195cf95b186eb5552131a20af408adf
2018-04-10 09:15:02 -04:00
Ramesh Errabolu f25d59cab2 Compute size of command buffer based on support for HDP Flush
Change-Id: I4987a262c191a91cd845fe18002c314a95a9ed8c
2018-04-07 13:36:09 -04:00
Sean Keely 7caf9633f6 Support large scratch allocations and reclaim.
Also improve small_heap used for scratch region allocation.

Change-Id: Ib7311b663b38968d88ebc355b81e12c0863dc541
2018-04-05 21:51:56 -04:00
Jay Cornwall df964343a3 Support new first-level trap handler ABI
- Ignore exceptions passed to the second-level handler
- Restore SQ_WAVE_IB_STS and SQ_WAVE_STATUS before exiting trap

Change-Id: I872c111c030d94eae644ae073df3c2e508f42f45
2018-04-04 11:01:14 -05:00
Sean Keely b6f0248f53 Respect new memory model requirements at queue destroy.
Spec requires GPU release fences and CPU acquire fences at queue destroy.
Also update the recognized status codes.

Change-Id: If9166f5149f65417c7057ff7c0f69f6ac094d6ab
2018-04-04 08:13:00 -04:00
Sean Keely 6df9ba97ce Sequence queue error callbacks with queue destroy.
HSA v1.2 update.

Change-Id: I13975e71b2c1ea5b7738236f5d02df84312ad00c
2018-04-04 08:12:58 -04:00
Ramesh Errabolu 987f3f97aa Enable sDMA packet HDP Flush on Gfx9 and later devices
Change-Id: I85922e5266883ef7e9eed3565e2c3b209009d294
2018-04-02 11:47:59 -04:00
Konstantin Zhuravlyov e4c6a3ae28 Convert old target names to old new target names.
Change-Id: I701651d74f353e234556e4bf5d50d63c598e5f15
2018-03-26 11:59:13 -04:00
Sean Keely cd46954cc4 Cleanup in blit kernel management code.
Remove unused function (FenceRelease), add comments to barrier packet settings,
correct profiling controls to work with queue wrappers.

Change-Id: I45bb26227bcc2b78edb8ad5dc497603c33234e18
2018-03-20 22:19:54 -04:00