3115 Commity

Autor SHA1 Wiadomość Data
Sean Keely 42bb22d0cc Add preferred agent info to pointer info struct.
Lookup blit agent via pointer info in memory_fill.

Change-Id: I02feaf68bb9726858e8cb0ede6bc5f2b3707f5af


[ROCm/ROCR-Runtime commit: c3e2a88ade]
2017-05-31 05:16:05 -04:00
Sean Keely c0e1079b78 Check mmap return address for allocation, not requested address.
Change-Id: Ifeb7b17976fc791e3256c70d57cb4d1324a8b960


[ROCm/ROCR-Runtime commit: 59cc20d3cb]
2017-05-30 21:26:55 -05:00
Qingchuan Shi 1dfe4959e5 remove finalizer usage from image ext
Change-Id: I282f02cedce790bf42f07c588fd50e346b9ba665


[ROCm/ROCR-Runtime commit: 77e5b30c41]
2017-05-29 20:44:52 -04:00
Sean Keely 754935ee65 Unmap GPUs when allow_access removes them from system pools.
Change-Id: Ib9eb88622fded43ebd9eddbf78ad6771a5b91e77


[ROCm/ROCR-Runtime commit: e38ff18990]
2017-05-17 20:58:05 -04:00
Felix Kuehling 8b490f27f4 Add some additional gfx900 PCI IDs
Change-Id: I5f00f3b30a27285d75c606c1308abfe032ce1d02
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>


[ROCm/ROCR-Runtime commit: 8aeb933426]
2017-05-11 16:39:19 -04:00
Chris Freehill 9f1065771a Refactored performance test code
Commented and flattened binary search sample.

Change-Id: Ib783292207c956d16003195924a3bcfbbde5039f


[ROCm/ROCR-Runtime commit: 8161ebb915]
2017-05-11 14:45:45 -04:00
Felix Kuehling 2fe4ad9d9b Fix uninitialized memory bug in hsaKmtWaitOnMultipleEvents
Use calloc to allocate event data. Otherwise random data may be filled
in for events that haven't actually signalled. This could trigger the
VM fault handler in the Runtime when no VM fault actually happened and
lead to intermittent HSA conformance test failures.

Change-Id: Icf702970e73a485b50633703c1b164f87fbb8606
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>


[ROCm/ROCR-Runtime commit: ea58703ece]
2017-05-10 18:16:31 -04:00
Felix Kuehling e5b910be20 Fix KFD ioctl ABI
This change breaks the ABI, and aligns it with the upstream ABI.
It also fixes some ioctl structures that are not 64-bit safe and
consolidates ioctl numbers.

Change-Id: Ib79944721534bd55a5299c5baf7bb5b3246cccd2
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>


[ROCm/ROCR-Runtime commit: 15764e2897]
2017-05-09 14:59:13 -04:00
Konstantin Zhuravlyov 768644ba7a Purge warning in amd_hsa_code.cpp
Change-Id: Iaa5d7af183af5e8c069365a1f0410365b46d53d5


[ROCm/ROCR-Runtime commit: a777413400]
2017-05-08 19:39:49 -04:00
James Edwards b39fea499a Change rpm preinstall script to post install
Change-Id: Iccc04902699bf0ba8b5269e1129b72cf69ef7f00


[ROCm/ROCR-Runtime commit: 001d43ce56]
2017-05-07 14:02:54 -05:00
Felix Kuehling 2cc06c88ff Switch to cleaned up memory management ioctls
Change-Id: Ib8971ef91138f2a051272b9b57f0ebd480e8e738
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>


[ROCm/ROCR-Runtime commit: 5eb31b2ebe]
2017-05-04 16:29:37 -04:00
Harish Kasiviswanathan 49805f82b1 Get PAGE_SIZE from system configuration
Change-Id: I87f383c443b873e13d36e80bfa034665bf493520
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>


[ROCm/ROCR-Runtime commit: 3b2f064cbc]
2017-05-02 16:54:32 -04:00
Amber Lin 0d55f4a1f7 Add more non-priv PMC blocks to GFX9
This patch adds more non-privileged PMC blocks to GFX9/gfx900 to cover
blocks added in HSA Thunk Spec.

Change-Id: Ia3d953213a32536b2275231149f11ba060791442
Signed-off-by: Amber Lin <Amber.Lin@amd.com>


[ROCm/ROCR-Runtime commit: ca06b0966b]
2017-05-01 09:14:03 -04:00
Amber Lin d4a47bae3e Add more non-priv PMC blocks to GFX8
This patch adds more non-privileged PMC blocks to GFX8 products: gfx801,
gfx803, and gfx803. Most of them have the same counter IDs on the same
block. For certain blocks when the product doesn't have the same counter
IDs, gfx8_xx_ is used to represent the product.

Change-Id: I059913c974bf2eb875fd1cf6f8b0d8c9c9bd7c14
Signed-off-by: Amber Lin <Amber.Lin@amd.com>


[ROCm/ROCR-Runtime commit: ed4a22e0d3]
2017-04-27 11:22:12 -04:00
Amber Lin edd6771ef1 Add more non-priv PMC blocks to gfx70x/GFX7
HSA Thunk Spec was updated to include more non-privileged blocks for
profiling. This patch adds those newly added non-privileged blocks for
gfx70x.

Signed-off-by: Amber Lin <Amber.Lin@amd.com>

Change-Id: Id745ac236c871e8e61a128a2460784f9c9c354b6


[ROCm/ROCR-Runtime commit: 9f19acbdb7]
2017-04-25 13:08:10 -04:00
hthangir ef38e563ba On GFX9+ amd_queue_t.scratch_backing_memory_location must store the queue's scratch backing store VA, not the offset.
Also fix permission in couple files.

Change-Id: I4203f8e5a36406b20562d8943ea5c341847f039a


[ROCm/ROCR-Runtime commit: 8aa19388a9]
2017-04-18 22:37:56 -05:00
Felix Kuehling 188902e6c0 Add debug option to control the number of guard pages
Change-Id: I18b10bcbb4d74a92f17330e44b2dbb4cea61da00
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>


[ROCm/ROCR-Runtime commit: 3f7e7933e3]
2017-04-10 11:40:39 -04:00
Felix Kuehling 0f42207171 Add debug option to check userptrs on registration
export HSA_CHECK_USERPTR=1 to check user pointers on registration. If
the pointer doesn't point to a valid mapping, there will be a segfault.

Change-Id: I459c0902cbc90338517fbf79678871ebfbe5183b
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>


[ROCm/ROCR-Runtime commit: 34ddde0c50]
2017-04-10 11:40:39 -04:00
Amber Lin 426aad482c Create indirect IO links
KFD added all direct IO links to sysfs, so this patch removes all direct
links related code and modify the indirect links function to reflect the
change.

Change-Id: Iaec7b5f6c59f9034f8f960ca1fe1145d51dab367
Signed-off-by: Amber Lin <Amber.Lin@amd.com>


[ROCm/ROCR-Runtime commit: c119653add]
2017-04-07 07:18:13 -04:00
Christophe Paquot 65f6986835 Separate gfx700 and AI architectures
Registers are different and it's cleaner to do as such

Change-Id: I36eee4c9c74deb43ca4666baa87894765a5f27b8


[ROCm/ROCR-Runtime commit: 617b6fa987]
2017-04-07 00:14:22 -04:00
Jay Cornwall 2c71b68fdb Fix gfx9 trap handler to retrieve correct return address
The trap protocol changed between gfx8 and gfx9. The return address
is in trap temporaries [0,1] on gfx9 rather than [4,5] on gfx8.
Unfortunately SP3 changes the meaning of the ttmp register aliases
in gfx9, further confusing the issue.

Clean up later when LLVM assembly build is introduced to the runtime.

Change-Id: I84ea9bf3736f060dd95d0361f9d5a0f9a3576178


[ROCm/ROCR-Runtime commit: f0a1c7c4c6]
2017-04-05 17:33:49 -05:00
Felix Kuehling d2064da64b Add guard page after each address space reservation
Guard pages help catch out-of-bounds memory accesses by applications
by generating VM faults (GPU) and segfaults (CPU).

Remove address space reservation from scratch aperture. That address
space is managed by the Thunk client. Guard pages would cause Thunk's
address space management to get out of sync with the client's.

Change-Id: I2e5aee2923a90186358cc7b0e131baf547996df6
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>


[ROCm/ROCR-Runtime commit: 11862b9f61]
2017-03-30 11:31:48 -04:00
Sean Keely 9734bc078a Remove comments, no functional change.
Change-Id: I923c037803a847352c2c50d9d47460cb0f01f22c


[ROCm/ROCR-Runtime commit: 8a5ff78be6]
2017-03-28 18:22:49 -05:00
Sean Keely 941c065513 Support async. queue errors and dynamic scratch without KFD events.
Change-Id: I4e9e7a37aa7b9c96b28ce79f562760283e02b1e0


[ROCm/ROCR-Runtime commit: 7dfeee5074]
2017-03-28 19:18:18 -04:00
Felix Kuehling 071c31f516 Add missing gfx900 device IDs
Change-Id: Ica5deb000279a508106125461af64a3851294b0a
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>


[ROCm/ROCR-Runtime commit: 53838c9818]
2017-03-24 16:03:46 -04:00
Sean Keely 5288e46340 Refactor signal_wait timing code and respect small timeouts.
Optimized for Gromacs and SHOC.

Change-Id: Ib674710268b41003259711a0e42d3e770a82018d


[ROCm/ROCR-Runtime commit: c4544906b9]
2017-03-23 23:55:48 -05:00
hthangir 4d121c2b97 We should be using the "used" gcc attribute.
Change-Id: I1589273740ae66e8d7d8186a88e2c411a2e0425c
See: https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attributes.html#Common-Variable-Attributes


[ROCm/ROCR-Runtime commit: ba3f1cb476]
2017-03-20 11:57:39 -04:00
hthangir d4a8e87a35 Fix the comment to specify the right type of allocation required.
Change-Id: I8bda8d64010d466d6ca5e779d2042cca3f494ecf


[ROCm/ROCR-Runtime commit: 6c750f479d]
2017-03-20 11:56:54 -04:00
hthangir d775242246 Disable SDMA only on gfx900 until it is validated.
Change-Id: Ib960be3ca6d3fc4b664ba047243964b8c7a33f24


[ROCm/ROCR-Runtime commit: 7c6cde1871]
2017-03-20 11:55:22 -04:00
Amber Lin 65f40a36cf Add TCA block to PMC support
Add TCA to PMC tables.

Change-Id: Ia4164ab4581ea3f539706f534f672e5c24f5362f


[ROCm/ROCR-Runtime commit: 73eff30d7d]
2017-03-20 10:22:21 -04:00
Konstantin Zhuravlyov d0a8e27a35 [Loader] Fix memory allocations for code objects that
are larger than swap space available

Change-Id: I321487f96fe0a18998301a9058430c19427e5a94


[ROCm/ROCR-Runtime commit: a08d760c70]
2017-03-11 00:57:25 -05:00
Sean Keely b7256bae4e Support async error code 256, invalid vendor specific packet.
Change-Id: I491f34def4c3d54403864fa42670f7847a6141cc


[ROCm/ROCR-Runtime commit: 5f50e97d18]
2017-03-10 16:20:27 -05:00
Sean Keely 3ca460d72f Relax signal assertion.
Informs, in debug mode only, that a signal wait violated the HSA
spec with regard to the consuming agents list.  This list is used
for optimized signal type selection.

Change-Id: I5879f8f822d01af504ab913482b2532feb00be98


[ROCm/ROCR-Runtime commit: 2824786b3b]
2017-03-10 16:05:34 -05:00
Christophe Paquot d759209584 Add inc/ to some include
Change-Id: Id027b015c8785a132835a422d97a23b0bbce208a


[ROCm/ROCR-Runtime commit: 05d587ef79]
2017-03-09 19:45:01 -08:00
Sean Keely c02e8c67df Adjust signal sleep to reflect null kernel latency. Performance tested on Gromacs.
Change-Id: I3851148ee8544b15d840f2c26ca73a83f8d0df2e


[ROCm/ROCR-Runtime commit: 426d41e27c]
2017-03-09 15:20:53 -05:00
Amber Lin cddc3c032f Re-formatting IO link code
- Typo fix: *_link_tye to *_link_type and a missing word in comments
- Replace printf with fprintf(stderr
- Shorten lines to fit in 80 characters

Change-Id: Ibeb0b98d5c59d617ae06d9854a9dde16251ded52
Signed-off-by: Amber Lin <Amber.Lin@amd.com>


[ROCm/ROCR-Runtime commit: 3738a1b5f2]
2017-03-09 11:08:22 -05:00
Christophe Paquot a96dc6e41b Update addrlib for gfx900.
Change-Id: I2b7b6093406c5498e9a551327701ad8973f1cf3a


[ROCm/ROCR-Runtime commit: 29894df0b5]
2017-03-07 14:41:16 -08:00
Amber Lin 68315e3157 Support profiling on gfx900
Add gfx900 to PMC support. This patch lists SQ counters.

Change-Id: Ia1e60e76ff71ab2e38d9d5de12ac9d527b3e8c6a


[ROCm/ROCR-Runtime commit: 2c2b1e0db2]
2017-03-07 14:30:40 -05:00
Amber Lin ad5c8c4844 Don't duplicate PMC tables
Many devices have the same counter IDs for the hardware block. Devices
in the same GFX generation usually have the same block counters. No need
to list each device individually. Instead, have a table to share with all
devices that have the same counter IDs, and have separated tables for
devices that don't have the same counter IDs.

Change-Id: I857056edc6f491f61af6e9598580e5dc7d372f94


[ROCm/ROCR-Runtime commit: 9e32cdb113]
2017-03-07 11:31:23 -05:00
Amber Lin 0b074112f2 Add gfx803 DID
Add 0x67D0 to gfx803 support list.

Change-Id: Ifdb1fad4a3c42bea54856f6d5248c00ed546ad85


[ROCm/ROCR-Runtime commit: b3b6367cb8]
2017-03-07 07:25:49 -05:00
Amber Lin 4ddf99f4a9 Unify the device ID list
Integrate the supported device ID list distributed in topology, queue, and
pmc into one place: topology.

Change-Id: If035cf8e4a6fc6caff6c94ec627647cfb11c3d79


[ROCm/ROCR-Runtime commit: 4827b09119]
2017-03-06 16:26:51 -05:00
Amber Lin 9b6439a5bb Make the lock file writable by others
Though S_IWOTH flag is set in the open() call, the lock file is not
created as accessable by others if others try to open the file with O_RDWR
permission. It's because the default umask masks off S_IWOTH. This patch
changes the umask to S_IXOTH since others don't need that permission but
it'll open up S_IWOTH. Restore the umask to original after the file is
opened.

Change-Id: I8a239e1566ce0b0b18821913385f239db7c3588e


[ROCm/ROCR-Runtime commit: 1a8a9cb57b]
2017-03-03 11:05:13 -05:00
Amber Lin 492c9623eb Implement Start/Stop/Query Trace
StartTrace and StopTrace send ioctl requests to enable/disable performance
counters. QueryTrace reads the counter from the perf_event fd.

Change-Id: Ibf79675bc23fcf129371bfd100f8e262121bc684


[ROCm/ROCR-Runtime commit: e17c67f049]
2017-03-02 14:00:25 -05:00
James Edwards e7d887e83b Fix permissions on hsakmt include files.
Change-Id: I1d428e60268e6d2de6776ff5f16d03503d00ddcc


[ROCm/ROCR-Runtime commit: ec84fbe264]
2017-03-02 12:00:09 -06:00
Ramesh Errabolu a9a54e2cc3 Extend Rocr Samples to allow collection of Perf Cntrs
Change-Id: I9c7e75128fca28b23ec54efab00bf5d32c95a877


[ROCm/ROCR-Runtime commit: 315ae6439b]
2017-02-28 20:29:24 -06:00
Kent Russell 30e1e20ede fmm.c: Disable userptr for paged mem by default
Unless HSA_USERPTR_FOR_PAGED_MEM is explicitly set, don't use userptr
for all paged memory. This will also allow us to work around some 4.9
issues, and then we can explicitly set HSA_USERPTR_FOR_PAGED_MEM for
all usage once those issues are resolved.

Change-Id: I25ce22b73ae6e93f1567f2318d9d2b47d4a44e69


[ROCm/ROCR-Runtime commit: c991951288]
2017-02-28 16:09:27 -05:00
shaoyun.liu d394e88cbf Thunk: Don't allocate extra control stack memory for gfx900
The control stack memory for CWSR is allocate in kernel together with MQD
allocation.

Change-Id: Ib1c0ab9402df3431e9555649394320380d6c6dd8
Signed-off-by: shaoyun.liu <shaoyun.liu@amd.com>


[ROCm/ROCR-Runtime commit: 116e5c5e8b]
2017-02-27 10:39:05 -05:00
Felix Kuehling a6c90a894a gfx900: Allow doorbell allocation independent of queue ID
On SOC15 chips, the ABI for the create_queue ioctl is changed to
allow doorbell allocation independent of the queue ID. This is
necessary to accommodate doorbell routing to specific engines in
the BIF.

Change-Id: Ie98d0a758758149dd5fc09ae088afccc29904124
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>


[ROCm/ROCR-Runtime commit: 7de66d149b]
2017-02-27 10:39:05 -05:00
Felix Kuehling ff41927a88 Allocate 64-bit for doorbells and write pointers
On gfx900 we need 64-bit for all doorbells and SDMA WPTRs.

Change-Id: I9b922e16442e967599ae3c928308451d5cc470b3
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>


[ROCm/ROCR-Runtime commit: d7063dd102]
2017-02-27 10:39:05 -05:00
Felix Kuehling adb4539c99 Use KFD_IOC_ALLOC_MEM_FLAGS_COHERENT for fine-grained memory
Use KFD_IOC_ALLOC_MEM_FLAGS_COHERENT when allocating fine-grained
memory and doorbell BOs so that they will be mapped with MTYPE_UC
on GFX9 hardware.

Change-Id: I51adf45b13105f479e6bcdaf54955b467920ee9a
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Shaoyun Liu <Shaoyun.Liu@amd.com>


[ROCm/ROCR-Runtime commit: 8cb89b6926]
2017-02-27 10:39:05 -05:00