Commit Graph

161 Commits

Author SHA1 Message Date
Maneesh Gupta cfd8b8f0c4 Fix using ATP markers
Change-Id: If2d04f80b580237426c569737551e2001a8cd35a


[ROCm/hip commit: b23fad53cc]
2016-07-21 16:02:51 +05:30
Aditya Atluri 404fb868c3 added fix for signal overflow in kernels
Change-Id: Ie0b1f97f69b7d7b34e445f6f120472819be03a0e


[ROCm/hip commit: c8542007b5]
2016-07-19 13:51:44 -05:00
Fan Cao f46c981363 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/hip commit: 6a2bbbcb75]
2016-06-30 18:23:29 +05:30
Maneesh Gupta fed706a1d8 Merge branch 'amd-master' into amd-develop
[ROCm/hip commit: f4cc90472d]
2016-06-24 21:13:11 +05:30
Rahul Garg b77ff1168c Included code to calculate value of maxThreadsPerMultiprocessor property
Change-Id: Ie7cad7442f36a7163e715048de5a309febc28664


[ROCm/hip commit: 3029be78b8]
2016-06-24 15:10:11 +05:30
Ben Sander a771352253 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/hip commit: 9f29cc6989]
2016-06-21 23:24:38 -05:00
Maneesh Gupta b869655714 default value of uninitialized dim3 elements should be 1
Change-Id: Idff38fac8dfca68f38f1714f8fdec64df2890a6a


[ROCm/hip commit: 1a2db6e6e4]
2016-06-20 10:13:46 +05:30
Aditya Atluri 9a1bce640c able to pass non-dim launch parm to kernel launch
Change-Id: I0411849a27efcba597a1a9aa08be179635e04988


[ROCm/hip commit: 90cd67e0b5]
2016-06-18 11:28:20 -05:00
Ben Sander 0268c1e4e6 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/hip commit: 2ab19ca505]
2016-06-16 06:13:51 +05:30
Ben Sander 0d8b15274c Merge branch 'privatestaging' into grid_launch
[ROCm/hip commit: 89df2f4e2f]
2016-05-02 18:38:20 -05:00
Aditya Atluri fb0560651d changed to guard from hc.hpp
[ROCm/hip commit: cac8110a4f]
2016-04-27 17:46:27 -05:00
bwicakso 58e026519b Merge remote-tracking branch 'refs/remotes/origin/privatestaging' into kernel_synchronization
[ROCm/hip commit: f0974e5867]
2016-04-25 13:57:28 -05:00
Maneesh Gupta 90fa90295f Merge branch 'release_0.84.00' into privatestaging
Conflicts:
	include/hcc_detail/hip_runtime.h
	src/hip_hcc.cpp


[ROCm/hip commit: ffdf6ab23b]
2016-04-22 10:55:58 +05:30
bwicakso d24ba1ecbb 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/hip commit: df98fd8531]
2016-04-20 15:51:39 -05:00
Aditya Atluri 182ce03846 added support pinned dma memcpy between host and device
[ROCm/hip commit: f74b7a3636]
2016-04-20 14:21:22 -05:00
Aditya Atluri 15fc041fd6 added support for __ldg
[ROCm/hip commit: 805b268ad4]
2016-04-20 12:25:40 -05:00
Ben Sander 5858b85e8d Fix hipDeviceReset synchronization
[ROCm/hip commit: 453615ed57]
2016-04-19 11:56:12 -05:00
Ben Sander edda485753 Set chicken bits to 0.
[ROCm/hip commit: 8c97a258de]
2016-04-19 11:56:12 -05:00
Ben Sander f601813057 Merge branch 'privatestaging' of https://github.com/AMDComputeLibraries/HIP-privatestaging into privatestaging
[ROCm/hip commit: 22d5738f82]
2016-04-18 21:51:13 -05:00
Ben Sander 32f9d67741 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/hip commit: e020d68309]
2016-04-18 20:49:33 -05:00
Aditya Atluri 348e5be858 Update hip_hcc.cpp
[ROCm/hip commit: ea647727df]
2016-04-18 11:36:51 -05:00
Ben Sander 698ea7f30f Move HIP_HCC define to CMake
[ROCm/hip commit: 65abde6626]
2016-04-17 07:40:04 -05:00
Ben Sander 262b69f387 Merge branch 'privatestaging' into p2p
Conflicts:
	include/hcc_detail/hip_hcc.h
	src/hip_hcc.cpp


[ROCm/hip commit: 49cc5aec91]
2016-04-17 06:46:52 -05:00
Aditya Atluri 6cd86531b3 Corrected Memcpydefault
[ROCm/hip commit: 8dc1bdcbe6]
2016-04-16 17:10:13 -05:00
Ben Sander d4f449a95e 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/hip commit: dcabc9dbf7]
2016-04-16 10:18:56 -05:00
Ben Sander 5060403b2a 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/hip commit: 31dc13d2ec]
2016-04-11 09:17:27 -05:00
Ben Sander 7c92c9cc22 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/hip commit: 1f53c55d3e]
2016-04-11 12:52:18 -05:00
Ben Sander b174e8bba7 Clean up disable.
Add USE_HCC_LOCK (disabled)
Disable USE_PEER_TO_PEER.


[ROCm/hip commit: b0529e04f1]
2016-04-11 09:09:36 -05:00
Ben Sander c964e3c75a 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/hip commit: 83f0de7806]
2016-04-11 07:58:59 -05:00
Ben Sander 69a9feb1fb fix bugs in P2P implementation
- addPeers polarity reversed, would never add.
- check allow_access return value, pipe error to hipMalloc.


[ROCm/hip commit: fb31eaf07b]
2016-04-11 07:58:58 -05:00
Ben Sander 06e2dbd128 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/hip commit: 813b063888]
2016-04-11 07:58:58 -05:00
Ben Sander ac11c83d76 P2P checkpoint.
Maintain enabled peer tables for each device.


[ROCm/hip commit: f2aa470f7f]
2016-04-11 07:58:58 -05:00
Ben Sander 56d684e2fe Checkpoint initial peer2peer implementation.
[ROCm/hip commit: 69f2469cbb]
2016-04-11 07:58:58 -05:00
Ben Sander 70108729ba fix bugs in P2P implementation
- addPeers polarity reversed, would never add.
- check allow_access return value, pipe error to hipMalloc.


[ROCm/hip commit: 7886c9e3d9]
2016-04-09 04:11:31 -05:00
pensun bdef1bb4e8 clean up unused comments
[ROCm/hip commit: 4b2c5976ce]
2016-04-07 09:46:00 -05:00
Ben Sander 84b5016a79 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/hip commit: 41f7317fb5]
2016-04-06 16:44:31 -05:00
Ben Sander c5240bd079 P2P checkpoint.
Maintain enabled peer tables for each device.


[ROCm/hip commit: 36926e6233]
2016-04-06 15:50:47 -05:00
Ben Sander 8db4a6d46e Checkpoint initial peer2peer implementation.
[ROCm/hip commit: b02e9163ab]
2016-04-06 15:50:47 -05:00
Ben Sander 24f82925bb Add runtime switch to control HIP_ATP_MARKER
Only generate the function strings if requested at
compile-time && runtime.


[ROCm/hip commit: 740b730cac]
2016-03-29 17:27:30 -05:00
Ben Sander 630ef59d7b Tweak thread-safe implementation.
introduce LockedAccessor option so destructor does not unlock.
Allows locks to exist across function boundaries, required
for hipLaunchKernel macro which has several unusual requirements.
(including C comppatibility, must use variadic macro, more).


[ROCm/hip commit: 8635863724]
2016-03-28 21:41:47 -05:00
Ben Sander 9e3ac64c54 Stream thread-safe checkpoint.
Moving data structures to critical / protected section.


[ROCm/hip commit: 3f18bab2c7]
2016-03-28 09:46:40 -05:00
Ben Sander c9b5b99078 Stream thread-safe checkpoint.
[ROCm/hip commit: ec049e7f0b]
2016-03-28 04:22:20 -05:00
Ben Sander 6f88d31a1f Protect _stream_id as well.
- move lockedaccessor
- clean up device class.
- add simple ihipDevice constructor.


[ROCm/hip commit: 395e7eab96]
2016-03-26 11:45:25 -05:00
Ben Sander 141ccad414 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/hip commit: 530ab9434a]
2016-03-26 10:46:20 -05:00
pensun fa114274ac fix query of memoryClockRate and memoryBusWidth for both NV and HCC path
[ROCm/hip commit: 535de2ecc1]
2016-03-25 09:24:08 -05:00
Aditya Atluri 41037cad90 Added canMapMemory feature to device properties
[ROCm/hip commit: 95c96638aa]
2016-03-24 07:33:24 -05:00
Aditya Atluri 6aa83a8a32 added CR and hipsetdeviceflags func
[ROCm/hip commit: c5ec73736d]
2016-03-24 07:04:01 -05:00
Aditya Atluri 702672c3df Split files based on functionality and changed cmake file
[ROCm/hip commit: 794007c3e8]
2016-03-24 04:57:30 -05:00
Ben Sander edec342c20 Partition hip_hcc into sections
Separate files for different categories of HIP API.
Currently just #include into hip_hcc.cpp


[ROCm/hip commit: 655534b1ba]
2016-03-24 09:28:54 -05:00
Aditya Atluri e0c6809779 moved variables to headers
[ROCm/hip commit: 7920fd9a47]
2016-03-23 12:59:52 -05:00