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

28 Коммитов

Автор SHA1 Сообщение Дата
Ben Sander d9587ae2f0 Add isDefaultStream() accessor.
Fix code that checked for stream==nullptr after stream had been
resolved to a "true stream".


[ROCm/clr commit: b2b620c12b]
2017-05-26 13:46:48 -05:00
Ben Sander ae983e1b09 Remove HIP_MAX_QUEUES (replaced with HCC_MAX_QUEUES)
[ROCm/clr commit: d43d57d39c]
2017-05-23 23:48:01 -05:00
Ben Sander 4ac6ac9d1d 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/clr commit: 8bc6ee5932]
2017-05-16 19:04:25 -05:00
Aditya Atluri 3651cb672a 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/clr commit: 1cead6a4cd]
2017-03-31 12:11:34 -05:00
Aditya Atluri a86633f210 changed copyright year from 2016 to 2017 in src directory
Change-Id: Idb97db509b2b4b1656b2df7a14a62ade38c9d574


[ROCm/clr commit: e9ff23e5f9]
2017-01-11 18:05:41 -06:00
Ben Sander 13bf4c39cc 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/clr commit: b29fbf736d]
2017-01-09 21:02:56 -06:00
Ben Sander 82cf0397c5 First pass at virtualized queue support.
Also updated stream debug messages to consistently use trace_helper.


[ROCm/clr commit: c9f5fe34e6]
2017-01-09 21:02:53 -06:00
Ben Sander 9d22c4f727 tolerate spaces in hip args
[ROCm/clr commit: 49d1477b9d]
2017-01-09 20:57:13 -06:00
pensun b0a039cd5e Add workaround for hipStreamAddCallback function: call stream synchronize on host and then add execute the call back function
Change-Id: If361f8e053949904b19b9e09245d267f05e29f7b


[ROCm/clr commit: 7a0375854a]
2016-10-22 23:59:39 -05:00
Ben Sander d6ffcdb9b0 Move some internal headers from "include/hip/" to src.
Change-Id: I7041bd5c803d9318979f4a7c1d658445c614691e


[ROCm/clr commit: 403cdf93c3]
2016-10-18 22:27:16 -05:00
Maneesh Gupta 2655c96ab9 src/*: Update copyright header
Change-Id: I455f5d0d12fe9cb39a3ba873bd22b4c25ed07cbf


[ROCm/clr commit: 88d6cad3fb]
2016-10-15 22:55:22 +05:30
Ben Sander c348792a58 Don't save error status on ihip function.
[ROCm/clr commit: 3ea5aac9a3]
2016-10-05 12:18:42 -05:00
Maneesh Gupta 46feb7dcf2 Move include/* to include/hip/*
Change-Id: I7a7b2839b4df59c7a4c503550f99fdc9e45c0f54


[ROCm/clr commit: bbfc08f419]
2016-10-04 22:17:18 +05:30
Ben Sander 2f4c30ff79 Remove USE_AV_COPY, USE_PEER_TO_PEER fallback paths.
Change-Id: I9c20173e62029c4caebabc98784c6d7697758e4f


[ROCm/clr commit: 60f797cc5a]
2016-09-22 14:21:19 -05:00
Ben Sander c75953a822 Add hipStreamQuery
Change-Id: Ib0813b1065feba4fe9ae861d24cfc6f9c5f580be


[ROCm/clr commit: fd67689114]
2016-09-07 15:18:34 -05:00
Ben Sander b47c7dc8aa remove printf
Change-Id: I36510a7ff0425f05a6d0b9c65cda4397c9cc2d95


[ROCm/clr commit: 3c90766c70]
2016-09-02 17:50:31 -05:00
Ben Sander 589f28547e hipStreamWaitEvent update.
Add passed to hipStreamWaitEvent test.
Fix pointerAttrib test to work with new and old HCC versions.
Minor code touchup.

Change-Id: I139ba6ce9f6bf2b4bee89aebdec5981b4346ffc0


[ROCm/clr commit: 8e883ab666]
2016-09-02 09:46:59 -05:00
Ben Sander fe85edad3f Use create_blocking_marker for WaitEvent implementation
Change-Id: Ib3113f69a14e48b9fe0558d7b455148e478d8eed


[ROCm/clr commit: 9a99000a62]
2016-09-02 09:46:59 -05:00
Ben Sander 938933ca2f Refactor for stream->_av.
- move _av into stream critical section.  ( HCC accelerator_view is not
  thread-safe but HIP steram is. )
- Refactored many places in code that need to acquire critical section.
some were previously thread races, ie enqueueing marker.

-remove support for GRID_LAUNCH_VERSION < 20
-Enable USE_AV_COPY based on HCC work-week.
- Review hipModule docs, some calrity/editing.

Change-Id: I3ce7c25ece048c3504f55ecd4683e506bb1fc8b6


[ROCm/clr commit: 02f65a483c]
2016-09-02 09:46:59 -05:00
Ben Sander 3ee6e7f8ab Split ihipCtx_t into ihipCtx_t and ihipDevice_t .
Major change to existing code base.
    Ctx holds streams, enables peers, and flags.
    Device holds accelerator, hsa-agent, device props.

Add hipCtx_t.

Add peer APIs that accept hipCtx_t (in addition to deviceId)

Compiles and passes directed tests.

Change-Id: Iddab1eb9edbf90caad2ef5959c6b811d658197f1


[ROCm/clr commit: d09b19bb6c]
2016-08-08 11:55:57 -05:00
Ben Sander e5300e2b40 Change Device->Ctx
Change ihipDevice_t -> ihipCtx_t (new)
Change ihipGetTlsDefaultDevice->ihipGetTlsDefaultCtx
Some other changes from device->ctx where appropriate.

Change-Id: I5c4ae93b2fd42c6303aa23d748eb166b7431925d


[ROCm/clr commit: 0d16565061]
2016-08-07 21:47:12 -05:00
Ben Sander 96412bdea2 Stream thread-safe checkpoint.
Moving data structures to critical / protected section.


[ROCm/clr commit: 6cab7862ae]
2016-03-28 09:46:40 -05:00
Ben Sander ef1314a91c Improve debug print messages.
- Remove "call-to-call" for hipStreamCreate and hipEventCreate.
  These now call an internal functions rather than calling through
  hipStreamCreateWithFalgs and hipEventCreateWithFlags.

- Add HIP_INIT_API for more functions so they trace correctly.

- Use stream#DEVICE.STREAMID in debug messages via new specialization in
  tace_helper.


[ROCm/clr commit: 82f57ca610]
2016-03-26 12:35:04 -05:00
Ben Sander 0b0c55af04 Protect _stream_id as well.
- move lockedaccessor
- clean up device class.
- add simple ihipDevice constructor.


[ROCm/clr commit: c47b5b04ef]
2016-03-26 11:45:25 -05:00
Ben Sander e16e848d55 Make ihipDevice_t thread-safe.
Move critical data into separate class and protect with LockAccessor
wrapper class.

For device, the streams list is the critical data since it is modified when
streams are created or destroyed.   The streams list is accessed in
several places including when synchronizing across all streams on the
device (ie from the default stream).
Other device data is set once by the device cosntructor and is not critical
so

All functions which acquire the LockAccessor now named with "locked_" prefix.


[ROCm/clr commit: 4dd77c6612]
2016-03-26 10:46:20 -05:00
Aditya Atluri fba45193cd added CR and hipsetdeviceflags func
[ROCm/clr commit: eea49cb66b]
2016-03-24 07:04:01 -05:00
Aditya Atluri bd9979eda6 Split files based on functionality and changed cmake file
[ROCm/clr commit: 1c55019322]
2016-03-24 04:57:30 -05:00
Ben Sander 245d48de79 Partition hip_hcc into sections
Separate files for different categories of HIP API.
Currently just #include into hip_hcc.cpp


[ROCm/clr commit: e52c3d9fe0]
2016-03-24 09:28:54 -05:00