Clean up disable.
Add USE_HCC_LOCK (disabled) Disable USE_PEER_TO_PEER.
This commit is contained in:
@@ -454,13 +454,9 @@ void ihipDevice_t::locked_reset()
|
||||
crit->streams().clear();
|
||||
|
||||
|
||||
|
||||
#if USE_PEER_TO_PEER>=2
|
||||
// This resest peer list to just me:
|
||||
crit->resetPeers(this);
|
||||
|
||||
#endif
|
||||
|
||||
// Reset and release all memory stored in the tracker:
|
||||
// Reset will remove peer mapping so don't need to do this explicitly.
|
||||
am_memtracker_reset(_acc);
|
||||
|
||||
@@ -246,7 +246,11 @@ hipError_t hipHostRegister(void *hostPtr, size_t sizeBytes, unsigned int flags)
|
||||
}
|
||||
if(device){
|
||||
if(flags == hipHostRegisterDefault){
|
||||
#if USE_HCC_LOCK
|
||||
am_status_t am_status = hc::am_memtracker_host_memory_lock(device->_acc, hostPtr, sizeBytes);
|
||||
#else
|
||||
am_status_t am_status = AM_ERROR_MISC;
|
||||
#endif
|
||||
// hsa_status_t hsa_status = hsa_amd_memory_lock(hostPtr, sizeBytes, &device->_hsa_agent, 1, &srcPtr);
|
||||
if(am_status == AM_SUCCESS){
|
||||
hip_status = hipSuccess;
|
||||
|
||||
@@ -63,7 +63,6 @@ hipError_t hipDeviceDisablePeerAccess (int peerDeviceId)
|
||||
HIP_INIT_API(peerDeviceId);
|
||||
|
||||
hipError_t err = hipSuccess;
|
||||
#if USE_PEER_TO_PEER
|
||||
|
||||
auto thisDevice = ihipGetTlsDefaultDevice();
|
||||
auto peerDevice = ihipGetDevice(peerDeviceId);
|
||||
@@ -92,7 +91,6 @@ hipError_t hipDeviceDisablePeerAccess (int peerDeviceId)
|
||||
} else {
|
||||
err = hipErrorInvalidDevice;
|
||||
}
|
||||
#endif
|
||||
|
||||
return ihipLogStatus(err);
|
||||
};
|
||||
@@ -105,7 +103,6 @@ hipError_t hipDeviceEnablePeerAccess (int peerDeviceId, unsigned int flags)
|
||||
HIP_INIT_API(peerDeviceId, flags);
|
||||
|
||||
hipError_t err = hipSuccess;
|
||||
#if USE_PEER_TO_PEER
|
||||
if (flags != 0) {
|
||||
err = hipErrorInvalidValue;
|
||||
} else {
|
||||
@@ -125,7 +122,6 @@ hipError_t hipDeviceEnablePeerAccess (int peerDeviceId, unsigned int flags)
|
||||
err = hipErrorInvalidDevice;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return ihipLogStatus(err);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user