Clean up disable.
Add USE_HCC_LOCK (disabled) Disable USE_PEER_TO_PEER.
This commit is contained in:
@@ -38,7 +38,10 @@ THE SOFTWARE.
|
||||
// Compile peer-to-peer support.
|
||||
// >= 2 : use HCC hc:accelerator::get_is_peer
|
||||
// >= 3 : use hc::am_memtracker_update_peers(...)
|
||||
#define USE_PEER_TO_PEER 3
|
||||
#define USE_PEER_TO_PEER 1
|
||||
|
||||
// Use new lock API in HCC:
|
||||
#define USE_HCC_LOCK 0
|
||||
|
||||
//#define INLINE static inline
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -160,14 +160,14 @@ make_hip_executable (hipSimpleAtomicsTest hipSimpleAtomicsTest.cpp)
|
||||
make_hip_executable (hipMathFunctionsHost hipMathFunctions.cpp hipSinglePrecisionMathHost.cpp hipDoublePrecisionMathHost.cpp)
|
||||
make_hip_executable (hipMathFunctionsDevice hipMathFunctions.cpp hipSinglePrecisionMathDevice.cpp hipDoublePrecisionMathDevice.cpp)
|
||||
make_hip_executable (hipIntrinsics hipMathFunctions.cpp hipSinglePrecisionIntrinsics.cpp hipDoublePrecisionIntrinsics.cpp hipIntegerIntrinsics.cpp)
|
||||
#TODO - re-enable. This uses the pointer add feature.
|
||||
make_hip_executable (hipPointerAttrib hipPointerAttrib.cpp)
|
||||
make_hip_executable (hipMultiThreadStreams1 hipMultiThreadStreams1.cpp)
|
||||
make_hip_executable (hipMultiThreadStreams2 hipMultiThreadStreams2.cpp)
|
||||
make_hip_executable (hipHostAlloc hipHostAlloc.cpp)
|
||||
make_hip_executable (hipStreamL5 hipStreamL5.cpp)
|
||||
make_hip_executable (hipHostGetFlags hipHostGetFlags.cpp)
|
||||
make_hip_executable (hipHostRegister hipHostRegister.cpp)
|
||||
#TODO - re-enable. This requires working hipHostRegister call, waiting on HCC feature.
|
||||
#make_hip_executable (hipHostRegister hipHostRegister.cpp)
|
||||
make_hip_executable (hipRandomMemcpyAsync hipRandomMemcpyAsync.cpp)
|
||||
make_hip_executable (hipMemoryAllocate hipMemoryAllocate.cpp)
|
||||
make_hip_executable (hipFuncSetDeviceFlags hipFuncSetDeviceFlags.cpp)
|
||||
|
||||
Reference in New Issue
Block a user