[perf]hipMalloc perf optimization
Change-Id: I9cd1d29205cb0c9938d26bb8e336fc9fe8a262ed
[ROCm/hip commit: 718ac775f7]
Tá an tiomantas seo le fáil i:
tiomanta ag
Sarbojit Sarkar
tuismitheoir
e428310a56
tiomantas
d58970c94e
@@ -185,6 +185,11 @@ hipError_t hipDeviceDisablePeerAccess(int peerDeviceId) {
|
||||
if ((hipSuccess != canAccessPeer(&canAccess, deviceId, peerDeviceId)) || (canAccess == 0)) {
|
||||
HIP_RETURN(hipErrorInvalidDevice);
|
||||
}
|
||||
|
||||
amd::Device* device = g_devices[deviceId]->devices()[0];
|
||||
amd::Device* peer_device = g_devices[peerDeviceId]->devices()[0];
|
||||
peer_device->disableP2P(device);
|
||||
|
||||
HIP_RETURN(hip::getCurrentDevice()->DisablePeerAccess(peerDeviceId));
|
||||
}
|
||||
|
||||
@@ -198,6 +203,11 @@ hipError_t hipDeviceEnablePeerAccess(int peerDeviceId, unsigned int flags) {
|
||||
if ((hipSuccess != canAccessPeer(&canAccess, deviceId, peerDeviceId)) || (canAccess == 0)) {
|
||||
HIP_RETURN(hipErrorInvalidDevice);
|
||||
}
|
||||
|
||||
amd::Device* device = g_devices[deviceId]->asContext()->devices()[0];
|
||||
amd::Device* peer_device = g_devices[peerDeviceId]->asContext()->devices()[0];
|
||||
peer_device->enableP2P(device);
|
||||
|
||||
HIP_RETURN(hip::getCurrentDevice()->EnablePeerAccess(peerDeviceId));
|
||||
}
|
||||
|
||||
|
||||
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir