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.
Este cometimento está contido em:
Ben Sander cometeu 2016-04-06 16:44:31 -05:00
1 ascendente 36926e6233
cometimento 41f7317fb5
6 ficheiros modificados
+59 -38

Não existem ficheiros que correspondam à sua pesquisa

+5 -1
Ver ficheiro
@@ -35,6 +35,10 @@ THE SOFTWARE.
//Use the new HCC accelerator_view::copy instead of am_copy
#define USE_AV_COPY 0
// Compile peer-to-peer support.
// 2= use upcoming HCC APIs.
#define USE_PEER_TO_PEER 1
//#define INLINE static inline
//---
@@ -523,7 +527,7 @@ public:
bool removePeer(ihipDevice_t *peer);
uint32_t peerCnt() const { return _peerCnt; };
uint32_t peerAgents() const { return _peerAgents; };
hsa_agent_t *peerAgents() const { return _peerAgents; };
private:
+7 -4
Ver ficheiro
@@ -919,19 +919,22 @@ hipError_t hipDeviceCanAccessPeer (int* canAccessPeer, int deviceId, int peerDev
*
* @param [in] peerDeviceId
*
* TODO:cudaErrorPeerAccessNotEnabled and cudaErrorInvalidDevice error not supported in HIP, return hipErrorUnknown
* Returns #hipSuccess, #hipErrorUnknown
* Returns #hipSuccess, #hipErrorPeerAccessNotEnabled
*/
hipError_t hipDeviceDisablePeerAccess (int peerDeviceId);
/**
* @brief Enable direct access from current device's virtual address space to memory allocations physically located on a peer device.
*
* Memory which already allocated on peer device will be mapped into the address space of the current device. In addition, all
* future memory allocations on peerDeviceId will be mapped into the address space of the current device when the memory is allocated.
* The peer memory remains accessible from the current device until a call to hipDeviceDisablePeerAccess or @hipDeviceReset.
*
*
* @param [in] peerDeviceId
* @param [in] flags
*
* TODO:cudaErrorInvalidDevice error not supported in HIP, return hipErrorUnknown
* Returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue, #hipErrorUnknown
* Returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue, #hipErrorPeerAccessAlreadyEnabled
*/
hipError_t hipDeviceEnablePeerAccess (int peerDeviceId, unsigned int flags);