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 ...@@ -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. // Determine whether peer-to-peer copying is supported, and enable it if so.
peerAccessSupported = true; peerAccessSupported = false; // Disable until I figure out why it usually makes things slower
for (int i = 1; i < contexts.size(); i++) { // peerAccessSupported = true;
int canAccess; // for (int i = 1; i < contexts.size(); i++) {
cuDeviceCanAccessPeer(&canAccess, contexts[i]->getDevice(), contexts[0]->getDevice()); // int canAccess;
if (!canAccess) { // cuDeviceCanAccessPeer(&canAccess, contexts[i]->getDevice(), contexts[0]->getDevice());
peerAccessSupported = false; // if (!canAccess) {
break; // peerAccessSupported = false;
} // break;
} // }
// }
if (peerAccessSupported) { if (peerAccessSupported) {
for (int i = 1; i < contexts.size(); i++) { for (int i = 1; i < contexts.size(); i++) {
contexts[0]->setAsCurrent(); 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