Commit Graph

318 Commits

Author SHA1 Message Date
Ben Sander 149ec02e84 Enable HCC_OPT_FLUSH=1 (if HCC compiler new enough)
[ROCm/hip commit: 67f5d2de3d]
2017-07-24 18:57:19 -05:00
Wen-Heng (Jack) Chung a80bc4c3b6 Temporarily disables HCC_OPT_FLUSH
Change-Id: I290791e58dd52ab3823f6c3315e42b0d386e9d64


[ROCm/hip commit: 17555eabc0]
2017-07-12 16:08:36 +00:00
Ben Sander ba0215ad9f Set default HIP_SYNC_NULL_STREAM=1.
[ROCm/hip commit: 626b5191e8]
2017-06-30 19:01:14 -05:00
Aditya Atluri f7bfec2252 automate gcnarch detection
Change-Id: Ibbad22db136f7f5e2be84c82e9169298a144cc77


[ROCm/hip commit: 3e610ab0fe]
2017-06-29 12:01:40 -05:00
Rahul Garg ff48608355 Fixed hipDeviceGetPCIBusId for HIP/HCC
Change-Id: I3688fa2476e1baada2d3c5fc3735cec3f15a1e21


[ROCm/hip commit: f4ea3b76c8]
2017-06-28 23:48:27 +05:30
Ben Sander 3ba979d2b7 Set default HIP_HIDDEN_FREE_MEM
[ROCm/hip commit: 148dbc1027]
2017-06-27 12:17:12 -05:00
Sun, Peng 84fbc3dfaa Add support of HIP_HIDDEN_FREE_MEM, to deduct the returned available
memory from hipMemGetInfo API, measured in MB.

Change-Id: I7a8260c12e032e04e26611db4c38c893a29f2653


[ROCm/hip commit: 1df08626c8]
2017-06-26 15:29:38 -05:00
Ben Sander ed1f242c60 Clean up old USE_* and RELEASE.md notes.
[ROCm/hip commit: 7912e61502]
2017-06-23 18:05:30 -05:00
Ben Sander 1d1e50fa77 Enable HCC_OPT_FLUSH=1.
Requires appropriate HCC with this support   :
commit 38e392b517a46a09a3b1c8f388e6a0db3741c510


[ROCm/hip commit: ac634bf334]
2017-06-07 00:15:05 -05:00
Ben Sander 65f91dbb0d Enable HIP_SYNC_NULL_STREAM=0 optimization.
[ROCm/hip commit: decf3eee18]
2017-06-05 08:50:41 -05:00
Ben Sander 445042f916 Fix HIP_SYNC_NULL_STREAM=0 mode.
- Fix null-stream sync
- hipStreamDestroy of null stream returns hipErrorInvalidResourceHandle
- Update documentation.
- Add tests for null stream sync, hipEventElapsedTime.
- Rename internal enum hipEventStatusRecorded to hipEventStatusComplete
- refactor hipStreamWaitEvent to streamline control-flow


[ROCm/hip commit: 39c18e5e5f]
2017-06-05 08:50:22 -05:00
Ben Sander a1bdd5f585 Update tests, add p2p coherency test.
[ROCm/hip commit: d5c1616324]
2017-06-03 17:11:34 -05:00
Ben Sander b3e01ed74f Add event controls for release fences.
Env var : HIP_EVENT_SYS_RELEASE
Event allocation flags : hipEventReleaseToDevice, hipEventReleaseToSystem
   (remove hipEventDisableSystemRelease)

Update test for new functionality.


[ROCm/hip commit: ec7102f461]
2017-05-27 16:02:34 -05:00
Ben Sander e24627aa80 Cleanup hipEvent. (Intermediate checkpoint)
Support hipEventDisableSystemRelease flag.
Update test.
Remove stray printf


[ROCm/hip commit: 620eb30691]
2017-05-27 16:02:34 -05:00
Ben Sander b7b7c7b7ac Remove HIP_NUM_KERNELS_INFLIGHT. (redundant with HCC controls)
[ROCm/hip commit: 578d430bb3]
2017-05-24 01:03:28 -05:00
Ben Sander 5b9ce41633 Add hipHostMallocCoherent, hipHostMallocNonCoherent
Provide per-allocation control over coherent/non-coherent mem.
These overrid the default HIP_COHERENT_HOST_ALLOC setting.


[ROCm/hip commit: 75f691ec2f]
2017-05-24 00:48:10 -05:00
Ben Sander 07865c3a02 Remove HIP_MAX_QUEUES (replaced with HCC_MAX_QUEUES)
[ROCm/hip commit: d0ef9d8462]
2017-05-23 23:48:01 -05:00
Ben Sander 97bdbe6590 Use accelerator_scope for create_marker and create_blocking_marker.
As optimization when system-scope is not needed.


[ROCm/hip commit: 2b253a48b6]
2017-05-23 23:15:45 -05:00
Ben Sander a55ce5bee4 Add initial HIP_SYNC_NULL_STREAM=0 mode.
This eliminates host-synchronization for null stream.  Instead, the
null-stream uses GPU-side events to wait for other streams.
Default is OFF pending additional testing.

Add enhanced null-stream test.

Also refine HIP_TRACE_API.


[ROCm/hip commit: 27877f8854]
2017-05-16 19:04:25 -05:00
Ben Sander 2cf05ad54b Add HIP_TRACE_API=4. Only display memory allocation/free apis.
[ROCm/hip commit: 0edab14139]
2017-05-16 19:04:25 -05:00
Aditya Atluri 62e5cda4af added gfx900 to hipDeviceProp_t
Change-Id: I49e7a32f218926fd55f1c94c5dc2366d6c8ac4ca


[ROCm/hip commit: a43149135e]
2017-05-12 21:43:34 -05:00
Ben Sander be423aa034 Remove old USE_ switches no longer needed.
[ROCm/hip commit: 0679831384]
2017-05-12 16:06:03 -05:00
Ben Sander b1b71c4c75 Add hipEventDisableSystemRelease flag.
[ROCm/hip commit: b306095ac2]
2017-05-12 16:06:03 -05:00
Ben Sander ff72a701b7 hipHostMalloc allocation are mapped to all devices by default.
Support hipHostMallocPortable flag.
Default flags are hipHostMallocPortable | hipHostMallocMapped.

Also:
-refactor tests to move addCount and addCountReverse into HipTest
namespace.
-test multi-GPU host memory.


[ROCm/hip commit: c3ccaa01e5]
2017-05-10 17:34:36 -05:00
Ben Sander 6f754878eb Tailor pointer info for src/dst before calling HCC copy routines.
HCC sometimes uses the srcPtrInfo or dstPtrInfo to determine the
pointer.  Make sure these use the actual pointer and not the base
of the allocation.


[ROCm/hip commit: 5a52b79782]
2017-04-24 22:30:54 -05:00
Ben Sander 58fd2f29ec Fix hip debug for case where copyAgent is null (host-to-host)
[ROCm/hip commit: 9e41e3c6e2]
2017-04-24 22:30:54 -05:00
sunway513 eaeecbd461 Refactor events and add initial event option for hipHccModuleLaunchKernel
- Change hipEvent_t to a class.
- Move event logic inside the class.
- Add _type to support Independent, StartCommand, StopCommand events.
  StartCommand returns start timestamp from events.

Change-Id: I4ddd694f2645a3ff7170c9111dc1d3e39931ca21


[ROCm/hip commit: cfa3155082]
2017-04-06 21:02:50 -05:00
Aditya Atluri ccf799c453 added new api hipHccModuleLaunchKernel
1. hipHccModuleLaunchKernel is same as hipModuleLaunchKernel with OpenCL workitem model
2. Added copy right
3. Fixed header naming

Change-Id: I6a7c35a3566e2f8d3f5056613e34193775d4b236


[ROCm/hip commit: b9091ba818]
2017-03-31 12:11:34 -05:00
Rahul Garg 1494cb9339 Fix for hipMemcpyFromSymbolAsync
Change-Id: I449c669c8f0ef041deaf0a1bc812a71b2f0cc5a6


[ROCm/hip commit: f649c225a7]
2017-03-24 10:30:33 +05:30
Rahul Garg aa59d4d580 Fix for hipMemcpyFromSymbol (sync)
Change-Id: I66afec5443ce904a63ced1fafece5144ca59393e


[ROCm/hip commit: 4395582810]
2017-03-21 23:48:04 +05:30
pensun 762090f564 Initial integration with Alex' Generic Grid Launch
Change-Id: I559afb80e9e39ec0d119bb3bf3b85ef9e448caf6


[ROCm/hip commit: 33c38de407]
2017-03-17 14:59:34 -05:00
Ben Sander a735ffa947 Update hipHostRegister debug and pointerTracker debug and notes
[ROCm/hip commit: 0a554f4dc1]
2017-03-11 09:18:27 -06:00
Aditya Atluri 6cbeeb8e59 added new field to hipDeviceProp_t structure gcnArch.
1. It is an integer containing gfx values 701, 801, 802, 803
2. On NV path, it is zero

Change-Id: I2b4c7f48981d0214d8c6b1905d2cc85b16203419


[ROCm/hip commit: f86f3b3b33]
2017-03-07 11:24:32 -06:00
Rahul Garg 6e13b64b35 Removed hsakmt headers
Change-Id: I4ffc95d5823489195ebc5638226b49ea2995f603


[ROCm/hip commit: c8e985f83c]
2017-03-06 22:37:05 +05:30
Rahul Garg 4dc60f9990 Context management related changes in HIP.
-
-Contexts across threads are listed under device
-Device reset cleans up all contexts and re-initializes _primaryCtx

Change-Id: Ie1cfbb26d43a8dc6869be3e6ebaf7344ce374643


[ROCm/hip commit: bddd6b73c0]
2017-02-27 15:24:17 +05:30
Aditya Atluri c6969c157a Added initial support for hipMemcpyFromSymbol. But not working!
Change-Id: I48d8c7de4ec9f85c6c942be995fb488a3931f5d7


[ROCm/hip commit: 2e245ae58c]
2017-02-23 11:29:06 -06:00
Aditya Atluri d24435ea9b added runtime api hipMemcpyFromSymbolAsync
Change-Id: Ibaf925faf0ba464dd0ed6c5ea74c224c2ce38889


[ROCm/hip commit: 639fd4dd5e]
2017-02-22 19:16:35 -06:00
Aditya Atluri afb38e15de fixed symbol memcpy issue
Change-Id: I89d7401be51d194bcbf771020ba66e3d3b6a18f8


[ROCm/hip commit: 2790e9a448]
2017-02-01 17:54:59 -06:00
Ben Sander bf3b6354ae Add HIP_FAIL_SOC.
Fail sub-optimal-copies rather than perform them slowly.
SOC occur on async copy of unpinned memory, or P2P copy between GPUs
that are not peers.


[ROCm/hip commit: 0409bf639c]
2017-01-25 21:53:17 -06:00
Ben Sander e129b09a6f Read HCC_OPT_FLUSH and optimize dispatch accordingly.
If HCC is in this mode, we can use less aggressive flushes in some
cases.


[ROCm/hip commit: 1635b8f43f]
2017-01-25 21:50:52 -06:00
Ben Sander 3be19a4ffa Move core env var processing to env.cpp
[ROCm/hip commit: 0dabdeb01f]
2017-01-23 22:34:41 -06:00
Ben Sander f9ecf383e3 Add debug tips to docs
[ROCm/hip commit: 96eac67929]
2017-01-23 22:34:41 -06:00
Ben Sander 7a402a7fb1 Add HIP_SYNC_HOST_ALLOC, HipReadEnv
[ROCm/hip commit: 927ac3d81c]
2017-01-19 23:55:24 -06:00
Ben Sander 5998ca2d85 Doc update - describe debug techniques
Also tweak sample to remove unneeded HIP_KERNEL_NAME.
Comment update


[ROCm/hip commit: 1f5d16afe7]
2017-01-19 12:40:45 -06:00
Aditya Atluri 5de29029cd changed copyright year from 2016 to 2017 in src directory
Change-Id: Idb97db509b2b4b1656b2df7a14a62ade38c9d574


[ROCm/hip commit: 73fcce26f9]
2017-01-11 18:05:41 -06:00
Ben Sander 1908d9504b Add HIP_MAX_QUEUES feature.
Includes some tricky manipulation of the locks for contexts and streams.
issue is that stealing a stream requires we lock the context to
walk the streams to find a victim.  To avoid deadlock, we can't
have a stream locked when we lock the context.  This implementation
releases the stream lock, then acquires the context and selects the
victim.
A more stable implemenation might be to copy the stream list
from a context so that a lock is not required to walk all streams.
Smart shared_ptr could be used to prevent the streams from being
deallocated during the walk.


[ROCm/hip commit: a3e0012567]
2017-01-09 21:02:56 -06:00
Ben Sander bbb1485a83 First pass at virtualized queue support.
Also updated stream debug messages to consistently use trace_helper.


[ROCm/hip commit: 93fbc9cf7b]
2017-01-09 21:02:53 -06:00
Ben Sander 72f6afab45 tolerate spaces in hip args
[ROCm/hip commit: 3a42a7642a]
2017-01-09 20:57:13 -06:00
Rahul Garg 2e9defbef8 Added state for hipDevice.
Change-Id: Idbc3c04cd054a01b634856a1e0a23ff172e991aa


[ROCm/hip commit: 5fb09879c7]
2017-01-09 23:54:01 +05:30
Ben Sander ec4f4a643d Support size_t in memset kernel.
Add disable for HSA_AMD_AGENT_INFO_MAX_WAVES_PER_CU
Remove one copy of completion_future in memset.


[ROCm/hip commit: c325c988b1]
2016-12-22 12:25:09 -06:00