mirror of
https://github.com/ikawrakow/ik_llama.cpp.git
synced 2026-04-30 11:21:56 +00:00
Make split mode graph work with vision enabled (#1392)
This commit is contained in:
@@ -512,8 +512,9 @@ ggml_backend_cuda_context::ggml_backend_cuda_context(int device) :
|
|||||||
auto info = const_cast<ggml_cuda_device_info*>(&ggml_cuda_info());
|
auto info = const_cast<ggml_cuda_device_info*>(&ggml_cuda_info());
|
||||||
if (info->all_ctx[device]) {
|
if (info->all_ctx[device]) {
|
||||||
GGML_CUDA_LOG_WARN("%s: a context for device %d already exists?\n", __func__, device);
|
GGML_CUDA_LOG_WARN("%s: a context for device %d already exists?\n", __func__, device);
|
||||||
|
} else{
|
||||||
|
info->all_ctx[device] = this;
|
||||||
}
|
}
|
||||||
info->all_ctx[device] = this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ggml_backend_cuda_context::~ggml_backend_cuda_context() {
|
ggml_backend_cuda_context::~ggml_backend_cuda_context() {
|
||||||
@@ -527,9 +528,6 @@ ggml_backend_cuda_context::~ggml_backend_cuda_context() {
|
|||||||
std::unique_lock<std::mutex> lock(ggml_cuda_lock);
|
std::unique_lock<std::mutex> lock(ggml_cuda_lock);
|
||||||
ggml_cuda_lock_cv.wait(lock, []{ return ggml_cuda_lock_counter == 0; });
|
ggml_cuda_lock_cv.wait(lock, []{ return ggml_cuda_lock_counter == 0; });
|
||||||
|
|
||||||
auto info = const_cast<ggml_cuda_device_info*>(&ggml_cuda_info());
|
|
||||||
info->all_ctx[this->device] = nullptr;
|
|
||||||
|
|
||||||
if (copy_event != nullptr) {
|
if (copy_event != nullptr) {
|
||||||
CUDA_CHECK(cudaEventDestroy(copy_event));
|
CUDA_CHECK(cudaEventDestroy(copy_event));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user