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

172 Коммитов

Автор SHA1 Сообщение Дата
Aditya Atluri 33f459c541 Signal Fix: The signals in a stream are re-used
1. Before, the signal pool is increased depending on the usage
2. After, a static number of signals are allocated to the pool
Only these are used by hip in a stream
3. If the signals required are more than the pool size, the
stream has to wait to make sure all the signals are available
4. Once they are available, the stream can use them
5. Removed HIP_NUM_SIGNALS_PER_STREAM because of redundancy with HIP_STREAM_SIGNALS
6. Increased signal count from 2 to 32.
Future Work: Dynamically increase the pool size depending on the number of
streams allocated by the application. And, null stream should have more signals

Change-Id: I6be36e084f26bb04766fabf776c7210aee0f9e91


[ROCm/clr commit: 9c7ee12822]
2016-07-28 23:01:35 -05:00
Ben Sander 381f67e067 Remove dead enqueueBarrier function.
Change-Id: Ib18fe6bd96ce24dbeb342961ddb5721f7d03f2b2


[ROCm/clr commit: f7ab82cb39]
2016-07-28 22:48:22 -05:00
Ben Sander a853d10446 Cleanup sync code.
Remove dead depFutures, enqueueBarrier call.
Rename some parms to reflect usage.
Add comments to better explain tricky parts of sync code.

Change-Id: I763296421d9c2b3b58fc8cef5f010b12ab49553c


[ROCm/clr commit: ef61aae878]
2016-07-27 18:31:11 -05:00
Aditya Atluri 96fe085832 Signal Fix: Added signal limit to allocSignal
1. Did not change the logic in allocSignal
2. Added guard to wait on signal limit

Change-Id: I78f29097e6a584b3c3d78319dac19869067bd1fe


[ROCm/clr commit: 1b2a24d0b8]
2016-07-27 13:48:49 -05:00
Aditya Atluri b99410bd07 Signal Fix: Moved kernel count to critical stream
1. Added environment variable HIP_NUM_KERNELS_INFLIGHT
2. Moved kernelcount variable inside stream critical section

Change-Id: I51d24d0a2a109467209170de117a6d02ba4e308e


[ROCm/clr commit: 7be196de48]
2016-07-26 17:09:27 -05:00
Aditya Atluri d8ea207f61 Signal Fix: Changed global signal count to per stream signal count
1. The number of kernels that can use signals are increased to 128
2. The kernel count is now specific to the stream

Change-Id: Ie6d1aa3f437aad8f08c3333fe48bd3f46e551e60


[ROCm/clr commit: 2e754d27dc]
2016-07-26 14:03:51 -05:00
Aditya Atluri bb363f9d63 removed redundant signal destroy
Change-Id: Icf0cd76b2620d34c87cfb6c7a83049087c0a0bc4


[ROCm/clr commit: 524127b4a4]
2016-07-26 13:35:35 -05:00
Aditya Atluri e207805f81 Added re-fix for memcpy kernel sync
1. The patch uses HIP signal pools to sync between copy and kernel commands
2. The hsa_signal_create is removed
3. Left the redundant enqueueBarrier method just in case

Change-Id: I3dff3e8ee57fff3cd49bec802ff735ed128e5ca1


[ROCm/clr commit: 0232e6bbb4]
2016-07-26 09:22:59 -05:00
Rahul Garg 7a70966cb1 D2H and H2D unpinned memory transfer support
Change-Id: If6d6c970f435e5d917d5cc6cddc2ee2918cd1c37

Conflicts:
	src/hip_hcc.cpp


[ROCm/clr commit: d11d65d401]
2016-07-25 14:36:07 +05:30
Aditya Atluri 776ea7a1f0 Partial fix async after kernel launch signal issue
Change-Id: Ib48d6564379160035bded9493b93663fba361710


[ROCm/clr commit: 1704006bed]
2016-07-23 14:54:20 -05:00
Maneesh Gupta 64d0ffb404 Replace calls to ihipInit with use of HIP_INIT_API macro
Change-Id: Iabf7df79f0238a8ddffea4607fe945df36642850


[ROCm/clr commit: b485470819]
2016-07-22 15:46:55 +05:30
Maneesh Gupta 68b1a199c4 Fix using ATP markers
Change-Id: If2d04f80b580237426c569737551e2001a8cd35a


[ROCm/clr commit: dffed956fb]
2016-07-21 16:02:51 +05:30
Aditya Atluri 2098afc04d added fix for signal overflow in kernels
Change-Id: Ie0b1f97f69b7d7b34e445f6f120472819be03a0e


[ROCm/clr commit: 77d7134619]
2016-07-19 13:51:44 -05:00
Fan Cao eb0db4e549 Replace GPU agent with CPU agent properly for memory async copy API
ihipStream_t::copySync use GPU agent in memory async copy API, even
if the src/dst memory does not belong to GPU, which cause the hsa
runtime to choose a slower copy engine.

SWDEV-95191

Change-Id: If3cab3d493c0c96ed63721cdcf28247a1193887c


[ROCm/clr commit: dc0a787984]
2016-06-30 18:23:29 +05:30
Maneesh Gupta 28915dd491 Merge branch 'amd-master' into amd-develop
[ROCm/clr commit: dca8fca8eb]
2016-06-24 21:13:11 +05:30
Rahul Garg 38987ce023 Included code to calculate value of maxThreadsPerMultiprocessor property
Change-Id: Ie7cad7442f36a7163e715048de5a309febc28664


[ROCm/clr commit: 226aa917e7]
2016-06-24 15:10:11 +05:30
Ben Sander 050430789c Grid-launch updates to 2.0 and cleanup of old.
_ Use fields from GRID_LAUNCH_20 structure
  (See USE_GRID_LAUNCH_20 define, currently set to 0)
  "1" will require HCC support.
- Remove old DISABLE_GRID_LAUNCH support.

Change-Id: I584ce648d217251789a6283cf27feb24cb7dc8d1


[ROCm/clr commit: e27b5cc927]
2016-06-21 23:24:38 -05:00
Maneesh Gupta a0006c5df0 default value of uninitialized dim3 elements should be 1
Change-Id: Idff38fac8dfca68f38f1714f8fdec64df2890a6a


[ROCm/clr commit: 2d50e4b9e0]
2016-06-20 10:13:46 +05:30
Aditya Atluri adace999e7 able to pass non-dim launch parm to kernel launch
Change-Id: I0411849a27efcba597a1a9aa08be179635e04988


[ROCm/clr commit: ffcfc95360]
2016-06-18 11:28:20 -05:00
Ben Sander c46b2e7450 NVCC improvements.
- Complete translation tables for cudaError <-> hipError_t.
- Remove some odd errors that were not correctly translated or not used.
- Add HIPCHECK_API to test infrastructure.  Used for negative testing
  an API ; if a mismatch occurs it shows the expected return error
  code.  Can also print a warning rather than error.
- Enable hipMemoryAllocate on NV system, and review error coded.
- Add hipErrorName to nvcc.

Change-Id: I680427dcf32a5796d5913cf9e7f3b4c6f6b91599

Conflicts:
	tests/src/CMakeLists.txt

Bug fixes and improved docs for hipFree and hipHostFree.

    - Passing NULL pointer initialized runtime and return hipSuccess
      (not an error like before).
    - add negative test for this. (hipMemoryAllocate, improved)
    - Match NVCC errors for invalid pointers, add to test.
    - Update hipFree and hipHostFree docs.
    - hipGetDevicePointer always set *devicePointer=NULL, even for
      invalid flags.
    - Gate shared memory usage on specific HCC work-week.

Change-Id: I533b4fd3280a3d6cdbf05eb768976f0c7506c012


[ROCm/clr commit: 6a2a140f34]
2016-06-16 06:13:51 +05:30
Ben Sander 41c57d1e00 Merge branch 'privatestaging' into grid_launch
[ROCm/clr commit: 20043d602e]
2016-05-02 18:38:20 -05:00
Aditya Atluri 8241a3dd75 changed to guard from hc.hpp
[ROCm/clr commit: ec8cedc70e]
2016-04-27 17:46:27 -05:00
bwicakso 4efcfdb83c Merge remote-tracking branch 'refs/remotes/origin/privatestaging' into kernel_synchronization
[ROCm/clr commit: 4aca1babe8]
2016-04-25 13:57:28 -05:00
Maneesh Gupta 03014e8a1d Merge branch 'release_0.84.00' into privatestaging
Conflicts:
	include/hcc_detail/hip_runtime.h
	src/hip_hcc.cpp


[ROCm/clr commit: 02e6fc27f4]
2016-04-22 10:55:58 +05:30
bwicakso 90fffbca82 Fix for kernel synchronization
The completion future of a particular kernel is lost if there are
multiple kernels in the stream. This can cause a racing condition where
the signal associated with the unreferenced completion_future might get
released by hcc runtime.


[ROCm/clr commit: 6773a64b22]
2016-04-20 15:51:39 -05:00
Aditya Atluri 7f21840dc8 added support pinned dma memcpy between host and device
[ROCm/clr commit: 620c5c64e6]
2016-04-20 14:21:22 -05:00
Aditya Atluri b857720440 added support for __ldg
[ROCm/clr commit: b493eac7e0]
2016-04-20 12:25:40 -05:00
Ben Sander 0f4bd3ad3a Fix hipDeviceReset synchronization
[ROCm/clr commit: ccf2c1c323]
2016-04-19 11:56:12 -05:00
Ben Sander 810f390cfe Set chicken bits to 0.
[ROCm/clr commit: b3c2d906db]
2016-04-19 11:56:12 -05:00
Ben Sander 10d42fa7cc Merge branch 'privatestaging' of https://github.com/AMDComputeLibraries/HIP-privatestaging into privatestaging
[ROCm/clr commit: 1ac93489b9]
2016-04-18 21:51:13 -05:00
Ben Sander 57a4505e77 Fixes for P2P and hipDeviceReset
- devicereset would lose track of default stream and thus subsequent
  synchronization calls might not actually sychronize.
- Also deviceReset now correctly frees streams.
- fix waits in P2P staging copy - first phase (Device0-to-Staging) must
  wait for second phase (Staging to Device1) to finish draining the
  buffer.


[ROCm/clr commit: 6abfa13c34]
2016-04-18 20:49:33 -05:00
Aditya Atluri 13e3aaa949 Update hip_hcc.cpp
[ROCm/clr commit: 40377fe5b1]
2016-04-18 11:36:51 -05:00
Ben Sander e92dbaeecd Move HIP_HCC define to CMake
[ROCm/clr commit: f9a31e28ad]
2016-04-17 07:40:04 -05:00
Ben Sander dd323f5e31 Merge branch 'privatestaging' into p2p
Conflicts:
	include/hcc_detail/hip_hcc.h
	src/hip_hcc.cpp


[ROCm/clr commit: 8d26dfcde3]
2016-04-17 06:46:52 -05:00
Aditya Atluri f0a9d95d55 Corrected Memcpydefault
[ROCm/clr commit: dc61929a3d]
2016-04-16 17:10:13 -05:00
Ben Sander 942509d66e P2P Update.
- add P2P staging buffer copy.
- If copy device does not have sufficient access permissions, fall back
  to staging buffer.
- improve docs for which copy device is used.


[ROCm/clr commit: c3bd85595d]
2016-04-16 10:18:56 -05:00
Ben Sander d3356ba99f Merge branch 'p2p' of https://github.com/AMDComputeLibraries/HIP-privatestaging into p2p
Conflicts:
	RELEASE.md
	include/hcc_detail/hip_hcc.h
	samples/1_Utils/hipInfo/hipInfo.cpp
	src/hip_hcc.cpp
	src/hip_peer.cpp


[ROCm/clr commit: 1cc0ea86a1]
2016-04-11 09:17:27 -05:00
Ben Sander 9bf70214f3 P2p checkpoint.
- set USE_PEER_TO_PEER=3 (requires HCC "am_memtracker_update_peers")
- when enabling peer, turn it on for previously allocated memory.
- hipDeviceCanAccessPeer is no longer self-ware (self does not qualify
  as a peer)
- device peerlist always includes self, so when we call allow_access
  we never remove self access.
- hipDeviceReset() removes old peer mappings.


[ROCm/clr commit: 5af4c901c6]
2016-04-11 12:52:18 -05:00
Ben Sander 76c49bbaf4 Clean up disable.
Add USE_HCC_LOCK (disabled)
Disable USE_PEER_TO_PEER.


[ROCm/clr commit: efffb0ed86]
2016-04-11 09:09:36 -05:00
Ben Sander 025938b1de P2p checkpoint.
- set USE_PEER_TO_PEER=3 (requires HCC "am_memtracker_update_peers")
- when enabling peer, turn it on for previously allocated memory.
- hipDeviceCanAccessPeer is no longer self-ware (self does not qualify
  as a peer)
- device peerlist always includes self, so when we call allow_access
  we never remove self access.
- hipDeviceReset() removes old peer mappings.


[ROCm/clr commit: 9e7efd7c65]
2016-04-11 07:58:59 -05:00
Ben Sander 25bcbca521 fix bugs in P2P implementation
- addPeers polarity reversed, would never add.
- check allow_access return value, pipe error to hipMalloc.


[ROCm/clr commit: 173cff4c1e]
2016-04-11 07:58:58 -05:00
Ben Sander 2890517a23 For P2P, use the peer list when allocating Device memory or pinned host.
Each new allocation is automatically mapped into the address space of
all enabled peers.


[ROCm/clr commit: 97772d6363]
2016-04-11 07:58:58 -05:00
Ben Sander 7eb8c10215 P2P checkpoint.
Maintain enabled peer tables for each device.


[ROCm/clr commit: e2d19d7f7a]
2016-04-11 07:58:58 -05:00
Ben Sander 1c84f4b5c6 Checkpoint initial peer2peer implementation.
[ROCm/clr commit: 4400875dda]
2016-04-11 07:58:58 -05:00
Ben Sander b6071f5eca fix bugs in P2P implementation
- addPeers polarity reversed, would never add.
- check allow_access return value, pipe error to hipMalloc.


[ROCm/clr commit: 7ca06d2fb1]
2016-04-09 04:11:31 -05:00
pensun 448b961328 clean up unused comments
[ROCm/clr commit: 45ed17ce2e]
2016-04-07 09:46:00 -05:00
Ben Sander e287933051 For P2P, use the peer list when allocating Device memory or pinned host.
Each new allocation is automatically mapped into the address space of
all enabled peers.


[ROCm/clr commit: 288682ccb3]
2016-04-06 16:44:31 -05:00
Ben Sander 6ccb0a5054 P2P checkpoint.
Maintain enabled peer tables for each device.


[ROCm/clr commit: 6a182ce788]
2016-04-06 15:50:47 -05:00
Ben Sander e195900a6e Checkpoint initial peer2peer implementation.
[ROCm/clr commit: db91890f53]
2016-04-06 15:50:47 -05:00
Ben Sander 36f2f683db Add runtime switch to control HIP_ATP_MARKER
Only generate the function strings if requested at
compile-time && runtime.


[ROCm/clr commit: e22925be22]
2016-03-29 17:27:30 -05:00