Don't call allow-access if allocating device's only peer is self.

Change-Id: Iac58e6c3e460675833f10b1e8b2e393de223654d
Этот коммит содержится в:
Ben Sander
2016-10-24 17:39:43 -05:00
родитель 346c519ace
Коммит 354091f357
+2 -1
Просмотреть файл
@@ -125,7 +125,8 @@ hipError_t hipMalloc(void** ptr, size_t sizeBytes)
hc::am_memtracker_update(*ptr, device->_deviceId, 0);
{
LockedAccessor_CtxCrit_t crit(ctx->criticalData());
if (crit->peerCnt()) {
// the peerCnt always stores self so make sure the trace actually
if (crit->peerCnt() > 1) {
hsa_amd_agents_allow_access(crit->peerCnt(), crit->peerAgents(), NULL, *ptr);
}
}