Граф коммитов

2959 Коммитов

Автор SHA1 Сообщение Дата
Harish Kasiviswanathan e79521b556 Add API entrypoints for Cross Memory Attach
Implement two new API for cross memory read and write operation.
 - hsaKmtProcessVMRead
 - hsaKmtProcessVMWrite

Add new ioclts necessary for the above APIs.

Change-Id: I0c153e3b4e1f32b7a8b102ad5c774d9ae9bfc2fa
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
2017-02-17 16:59:51 -05:00
James Edwards 57ac399652 Modify packaging cmake files to use BUILD_VERSION* instead of RELEASE_VERSION*.
Change-Id: I6f1b83c9faf0d40c1ac27d8998f4651341971b1b
2017-02-16 16:40:20 -06:00
ozeng b3c3f7bae1 libkmt: Change files mode back to 644
events.c and queues.c were accidently changed to 755 by change
fc70f0c30976f4021f7d763bfc10d76a76029553. Change them back.

Change-Id: If51c0b91139afc23e9051cf94c83d61fc20297e6
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
2017-02-16 15:09:26 -05:00
Ramesh Errabolu 42e751519b Enable code for Perf Cntrs for gfx900 - AI family device
Change-Id: I4659da1a8db17392016fc90c8ea19b5805b5d3aa
2017-02-15 21:50:23 -06:00
James Edwards 900f272622 Fixes to HSA CMakeList.txt files
Change-Id: Idd176d24dfd22bd9a6a8860ab035fd5d1aca756d
2017-02-15 08:26:30 -06:00
James Edwards b7e06b471c Fix TeamCity builds using utils.cmake.
Change-Id: Id15a911dad06643d9457cc4d8c907fc5796772ee
2017-02-14 15:36:21 -06:00
James Edwards acb1f0b689 Add --dirty tag to utils.cmake
Change-Id: Ib2487eade8d88530df34dfb8e9b442e547e9f52d
2017-02-14 11:19:33 -06:00
James Edwards 73e942cd8a Modify hsa CMakeList.txt file to use PREFIX_PATH and git describe versioning.
Change-Id: I08668df07725369ecf8a2f35e74dd7d64c8ca94b
2017-02-14 08:39:16 -05:00
James Edwards 9e81f0f5e2 Add libpci to CMakeLists.txt for thunk.
Change-Id: I0228035ce769feaf54cbca75f076f73614cbb9cc
2017-02-11 16:24:54 -06:00
Konstantin Zhuravlyov 9887c26113 Bring loader in sync with stg/sc
Change-Id: Iccce07b8fa03d37c4267a2a9bd343e6614dc43e7
2017-02-10 11:21:15 -05:00
James Edwards a5a30e8199 Fix file stripping for release builds.
Change-Id: I538c366f0992980ffff1ef337807035b9378845c
2017-02-09 14:42:14 -06:00
Jay Cornwall 4d62b9482a Implement code cache invalidation for Gfx9
When a new enough microcode build is running use a vendor AQL packet
to submit the PM4 IB.

Change-Id: Icd3e2b322c418477420ba4a29f4455ce340ef0d2
2017-02-09 14:15:21 -05:00
James Edwards bc44715be2 Update libhsakmt CMakeList.txt file for tag based versioning and proper packaging
Change-Id: I63e82deefa8377ced810d99b5b2f0457299048a6
2017-02-08 14:42:29 -06:00
Ramesh Errabolu e91970a39b Support Gfx9 and Pre-Gfx9 Thread Trace Drivers
Change-Id: Ic3fea4006d76d1e3f58dde6f64c343a1261abe39
2017-02-07 15:39:59 -06:00
Sean Keely 505d722b7d Fix Api table copy operation and tools version checking.
Change-Id: Ia76d16f3ea6d0abb931813f90bc3bc2119da5999
2017-02-07 14:26:20 -05:00
Felix Kuehling 74ebfca9f0 Free BOs before munmapping
This avoids unnecessary evictions and failed restores due to the
munmap of userptr BOs that are just about to be freed.

Change-Id: Icf2f0b73991455556a201c54c05ea7e20af80f47
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
2017-02-07 10:45:37 -05:00
Sean Keely bc43f97964 Use fixed size type for queue type arguments.
Change-Id: I81b605c9cc9b18bcef043a4f0292212241ce5987
2017-02-07 01:22:30 -05:00
ozeng cb0f851560 libkmt: Misc fixes in thunk
1. Translate thunk queue priority to kfd priority
2. Initialize event SyncVar
3. Added HSAint32 data type


Change-Id: I7decc1be7cbe9c84cb670d9a7c99050b62ba98f3
2017-02-06 17:19:40 -05:00
Ramesh Errabolu 74e3a49b20 Refactor Thread Trace Service as an independent library
Change-Id: Ia7579bc16626f3e21c8df50f8a35cb4b82f6bda9
2017-02-06 17:04:07 -05:00
Jay Cornwall 28f51d5808 Fix Gfx9 write pointer setup
Should point directly to amd_queue_t.write_dispatch_id. Only noticeable
with HWS enabled which is not yet stable.

Change-Id: I169906d45225379a3ca2729ff04d298fdbb9a9fb
2017-02-06 14:06:12 -05:00
Amber Lin 9dadac6dc9 Add IOMMU to performance counter table
Add IOMMUv2 to blocks returned by hsaKmtPmcGetCounterProperties(). IOMMU
information is read from sysfs.

Change-Id: I3a1c6f902f947913570a78700fc0ffc444e1dd72
Signed-off-by: Amber Lin <Amber.Lin@amd.com>
2017-02-03 14:35:27 -05:00
Ramesh Errabolu 7755bd5487 Refactor Device Id to Asic Type Mapping Service
Change-Id: I8969b41f7c4de9fdeee5131e2049053a486f64fb
2017-02-03 14:22:32 -05:00
Amber Lin d4dbf562a9 Replace spaces with tabs
Thunk follows Linux kernel coding convention to use tabs instead of
spaces.

Change-Id: I4eddcfa9a0513f16c869d9cc63f9f1dae0c39f83
Signed-off-by: Amber Lin <Amber.Lin@amd.com>
2017-02-03 10:13:24 -05:00
Felix Kuehling a90abcb317 Allocate paged system memory as userptr
Change-Id: I0864e678681788df37eccd9d7ebc70086e1f93bf
2017-02-02 10:32:53 -05:00
Amber Lin 72b842a6dc Sync up gfx803 DIDs with KFD
Add gfx803 10/11 device IDs that were recently added to KFD.

Change-Id: Id40b117ae47bacedefa6e333fdfdf58dea92cd2d
Signed-off-by: Amber Lin <Amber.Lin@amd.com>
2017-02-01 12:05:24 -05:00
Jay Cornwall 9e575ea96a Add support for ARM
- Build system fixes
- No user-mode high-precision timer by default, use clock_gettime
- Use C11 aligned_alloc pending C++17 std::aligned_alloc

Change-Id: I268365bdfd11d1e817a89584b9e086ee5b86e1dc
2017-01-31 16:43:49 -08:00
Jay Cornwall 7e0a5f9c00 Add support for gfx900
- Route AQL doorbell directly to HW doorbell
- Reuse precompiled Gfx8 shaders on Gfx9 (ISA is compatible)
- Add a warning for unimplemented code cache invalidation

Change-Id: I92096584a1404e35779c96ae6bdc3e0e7fd04721
2017-01-30 16:36:28 -06:00
Sean Keely 796d31d94d Remove old names from API table interfaces.
Change-Id: I41ca38b596e1dac85e871f583e3ffe7078b790e7
2017-01-27 17:45:26 -06:00
Christophe Paquot 9ae1e15750 Adding the new APIs to the .def files and fixed a couple of things
Change-Id: I247a60b8cdbd4acfed72fb6d78ac7faf69d8a556
2017-01-27 16:51:50 -05:00
Jay Cornwall 1cd46afe6d Implement SDMA path for Gfx9
Gfx9 requires monotonic write pointer and doorbell.
Cound fields are 1-based compared with 0-based pre-Gfx9.

- Restructure implementation to use monotonic ring indices
- Remove redundant submission size checks (handled by AcquireWriteAddress)
- Unify copy/fill per-command limit (documentation is unclear)

Change-Id: I57c1675221d2e63aa319fee700d9951671e1bd65
2017-01-26 13:11:21 -05:00
Christophe Paquot a324f21a46 Add new 1.1 image APIs
Note: Implementation same as 1.0 APIs for now.
      The followup change will have the complete implementation.

Change-Id: Ife633f74ff27eee0bb9b0c46952cf5233b0114e8
2017-01-20 19:37:03 -05:00
Ramesh Errabolu ff1d739660 Add Gfx9 asic header files
Change-Id: I04fe402ab44170dba582099670a8222c5c366e50
2017-01-19 19:23:14 -06:00
Ramesh Errabolu 8ab28d1a51 Add agent properties for Tools
Change-Id: I7bc49d35dc559f9c9058aae591b88c5ecc4b3ce5
2017-01-16 13:50:18 -06:00
Ramesh Errabolu f0263d8198 Removing Old Commandwriter used by Profiler and Debugger
Change-Id: I77d2172eef1724d1d4aed6d8e7a9df6cdbeb0648
2017-01-13 11:51:21 -05:00
Christophe Paquot 31d379c821 Add image 1.1 API changes to current code base
Initial work to import the latest (1.1) hsa_ext_image extension.

Change-Id: I51d70ef26f97250c884b3def2088be0d7eb04eb3
2017-01-12 14:49:54 -08:00
Harish Kasiviswanathan f1f62d863c Add fork support
If fork() is called, clear all duplicated data that is invalid in the
child process.

Change-Id: I4e27198060db593c630c6337b7071dfbd0d80b83
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
2017-01-12 14:38:30 -05:00
Kent Russell 5162a76616 Revert " Add image 1.1 API changes to current code base"
Currently HSA HW Profiler is failing to build due to this patch

This reverts commit e0ce8855dd.

Change-Id: Iabb2b958f33ba614a24b61bb370905b3b7362708
2017-01-12 06:43:54 -05:00
Christophe Paquot e0ce8855dd Add image 1.1 API changes to current code base
Initial work to import the latest (1.1) hsa_ext_image extension.

Change-Id: I4d55adb09ba4d4dbd43d47a4bc54077d4bc531d2
2017-01-11 17:31:37 -05:00
Felix Kuehling 4181b408fc Allocate CWSR buffer in system memory
CWSR buffers can be large on dGPUs (~21MB on gfx803). Allocating them
in VRAM limits the number of queues that can be created unnecessarily.

Also make freeing of per-queue buffers symmetric with allocation. All
buffers are now allocated with allocate_exec_aligned_memory on dGPUs
and APUs, so use free_exec_aligned_memory to free them.

Change-Id: I45e8cb1801857d0268750202cdd422426611e457
2017-01-04 16:07:56 -05:00
Sean Keely 0e17cc2887 Allow reducing max occupancy (max scratch waves) when applications request large amounts of scratch.
Also emit error messages to stderr if no async queue error callback was registered and queue fault messages are enabled (on by default).
Queue fault messages are controlled with env key HSA_ENABLE_QUEUE_FAULT_MESSAGE.

Change-Id: I496487b8d048b83aa95b9784e92928211f167b17
2016-12-20 16:52:59 -06:00
James Edwards 433a3bcde8 Readme and comment updates to ROCm 1.4
Change-Id: I2864a9c475b9ceb2fa08bfc35999c7e0e043b26d
2016-12-16 11:43:36 -06:00
Chris Freehill 160f8c5880 HSA Enabled IPC support
Uncommented HSA IPC code.
Changed hsa_amd_ipc_memory_t to be 8 uint32_t's instead of 9 to
match spec

Change-Id: Id1523125e9b876a23c3743df1be29c98b47f6725
2016-12-15 19:16:29 -05:00
Konstantin Zhuravlyov 08aded148a Revert "Bring loader in sync with stg/sc"
This reverts commit c798c60343.

Change-Id: If99e8cc9e2afb525f690e49eb6538d8e950a5615
2016-12-14 15:14:36 -05:00
Konstantin Zhuravlyov c798c60343 Bring loader in sync with stg/sc
Change-Id: I684522c442de0872007a7e4da8919067fc7b42b3
2016-12-13 16:30:25 -05:00
James Edwards 25ed746314 Make copyright and README changes for ROCm
Change-Id: Ic9717fcbc57d4552dddf8374b34fc7c34e44268a
2016-12-06 16:11:00 -06:00
Harish Kasiviswanathan 559e31d6ff Add API entrypoints for IPC functionality
Implement three new APIs for IPC buffer sharing:
	-hsaKmtShareMemory()
	-hsaKmtRegisterSharedHandle()
	-hsaKmtRegisterSharedHandleToNodes()

Add new ioclts necessary for the above APIs.

Change-Id: Ia2b4d0dc91ec64bff959395d11c0536467404792
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
2016-11-28 16:19:22 -05:00
Ramesh Errabolu 935c1b0ba9 Per review comments
Change-Id: I44585a6dcf3c4f0ce10f0e895270c113790e0652
2016-11-28 12:41:32 -06:00
Harish Kasiviswanathan 4838f6e740 kfd ioctl. Remove unused definitions
Sync the file with Kernel header file

Change-Id: I52d52a38fb38bd4b37d8210ce79775b88c8a985d
2016-11-22 09:44:22 -05:00
Ramesh Errabolu eb2efb83d1 Initial set of changes for ThreadTrace
Change-Id: I07ce31f9b4f508cef0fc9ca6dadcf26b6c90361e
2016-11-21 23:40:56 -06:00
Konstantin Zhuravlyov 4b86843409 Remove load_legacy parameter + change prefix for some loaded code object queries back to AMD
Change-Id: I74e905abd77dab3a7a00b5ced94cd9b5130365c5
2016-11-20 13:46:17 -05:00