mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-26 03:14:35 +00:00
CUDA: fix peer access logic (#3231)
This commit is contained in:
parent
111163e246
commit
ee66942d7e
@ -6286,8 +6286,9 @@ void ggml_cuda_set_peer_access(const int n_tokens) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
int canAccessPeer;
|
int can_access_peer;
|
||||||
CUDA_CHECK(cudaDeviceCanAccessPeer(&canAccessPeer, id, id_other));
|
CUDA_CHECK(cudaDeviceCanAccessPeer(&can_access_peer, id, id_other));
|
||||||
|
if (can_access_peer) {
|
||||||
if (enable_peer_access) {
|
if (enable_peer_access) {
|
||||||
CUDA_CHECK(cudaDeviceEnablePeerAccess(id_other, 0));
|
CUDA_CHECK(cudaDeviceEnablePeerAccess(id_other, 0));
|
||||||
} else {
|
} else {
|
||||||
@ -6295,6 +6296,7 @@ void ggml_cuda_set_peer_access(const int n_tokens) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif // NDEBUG
|
#endif // NDEBUG
|
||||||
|
|
||||||
peer_access_enabled = enable_peer_access;
|
peer_access_enabled = enable_peer_access;
|
||||||
|
Loading…
Reference in New Issue
Block a user