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

Change-Id: Iac58e6c3e460675833f10b1e8b2e393de223654d
Ta zmiana jest zawarta w:
%! (template.HTML=Ben Sander)złożyło 2016-10-27 23:09:31 -05:00
1 rodzic 7d69e858a5
złożenie f8b356dce8
Plik 1 zmieniony
+2 -1
+2 -1
Wyświetl plik
@@ -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);
}
}