mirror of
https://github.com/ollama/ollama.git
synced 2026-04-26 18:55:53 +02:00
fix check_perfmon len
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
int check_perfmon(vk_handle_t* rh) {
|
||||
#ifdef __linux__
|
||||
cap_t caps;
|
||||
const cap_value_t cap_list[2] = {CAP_PERFMON};
|
||||
const cap_value_t cap_list[1] = {CAP_PERFMON};
|
||||
|
||||
if ((*rh->cap_get_bound)(CAP_SETFCAP) < 0)
|
||||
return -1;
|
||||
@@ -14,7 +14,7 @@ int check_perfmon(vk_handle_t* rh) {
|
||||
if (caps == NULL)
|
||||
return -1;
|
||||
|
||||
if ((*rh->cap_set_flag)(caps, CAP_EFFECTIVE, 2, cap_list, CAP_SET) == -1)
|
||||
if ((*rh->cap_set_flag)(caps, CAP_EFFECTIVE, 1, cap_list, CAP_SET) == -1)
|
||||
return -1;
|
||||
|
||||
if ((*rh->cap_set_proc)(caps) == -1)
|
||||
@@ -221,4 +221,4 @@ void vk_check_vram(vk_handle_t rh, int i, mem_info_t *resp) {
|
||||
|
||||
void vk_release(vk_handle_t rh) {
|
||||
(*rh.vkDestroyInstance)(rh.vk, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user