We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 111163e commit ee66942Copy full SHA for ee66942
ggml-cuda.cu
@@ -6286,12 +6286,14 @@ void ggml_cuda_set_peer_access(const int n_tokens) {
6286
continue;
6287
}
6288
6289
- int canAccessPeer;
6290
- CUDA_CHECK(cudaDeviceCanAccessPeer(&canAccessPeer, id, id_other));
6291
- if (enable_peer_access) {
6292
- CUDA_CHECK(cudaDeviceEnablePeerAccess(id_other, 0));
6293
- } else {
6294
- CUDA_CHECK(cudaDeviceDisablePeerAccess(id_other));
+ int can_access_peer;
+ CUDA_CHECK(cudaDeviceCanAccessPeer(&can_access_peer, id, id_other));
+ if (can_access_peer) {
+ if (enable_peer_access) {
+ CUDA_CHECK(cudaDeviceEnablePeerAccess(id_other, 0));
+ } else {
6295
+ CUDA_CHECK(cudaDeviceDisablePeerAccess(id_other));
6296
+ }
6297
6298
6299
0 commit comments