Commit 95696f7a authored by Peter Eastman's avatar Peter Eastman
Browse files

Disabled peer-to-peer communication, since it currently makes things slower

parent b2ac07ad
......@@ -195,15 +195,16 @@ CudaPlatform::PlatformData::PlatformData(const System& system, const string& dev
// Determine whether peer-to-peer copying is supported, and enable it if so.
peerAccessSupported = true;
for (int i = 1; i < contexts.size(); i++) {
int canAccess;
cuDeviceCanAccessPeer(&canAccess, contexts[i]->getDevice(), contexts[0]->getDevice());
if (!canAccess) {
peerAccessSupported = false;
break;
}
}
peerAccessSupported = false; // Disable until I figure out why it usually makes things slower
// peerAccessSupported = true;
// for (int i = 1; i < contexts.size(); i++) {
// int canAccess;
// cuDeviceCanAccessPeer(&canAccess, contexts[i]->getDevice(), contexts[0]->getDevice());
// if (!canAccess) {
// peerAccessSupported = false;
// break;
// }
// }
if (peerAccessSupported) {
for (int i = 1; i < contexts.size(); i++) {
contexts[0]->setAsCurrent();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment