Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
fb9cdfa7
Commit
fb9cdfa7
authored
May 18, 2024
by
Daniel Hiltgen
Browse files
Fix server.cpp for the new cuda build macros
parent
efac4886
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
llm/ext_server/server.cpp
llm/ext_server/server.cpp
+7
-7
No files found.
llm/ext_server/server.cpp
View file @
fb9cdfa7
...
@@ -2335,9 +2335,9 @@ static void server_params_parse(int argc, char **argv, server_params &sparams, g
...
@@ -2335,9 +2335,9 @@ static void server_params_parse(int argc, char **argv, server_params &sparams, g
invalid_param
=
true
;
invalid_param
=
true
;
break
;
break
;
}
}
#ifndef GGML_USE_CU
BLAS
#ifndef GGML_USE_CU
DA
fprintf
(
stderr
,
"warning: llama.cpp was compiled without
cuBLAS
. Setting the split mode has no effect.
\n
"
);
fprintf
(
stderr
,
"warning: llama.cpp was compiled without
CUDA
. Setting the split mode has no effect.
\n
"
);
#endif // GGML_USE_CU
BLAS
#endif // GGML_USE_CU
DA
}
}
else
if
(
arg
==
"--tensor-split"
||
arg
==
"-ts"
)
else
if
(
arg
==
"--tensor-split"
||
arg
==
"-ts"
)
{
{
...
@@ -2346,7 +2346,7 @@ static void server_params_parse(int argc, char **argv, server_params &sparams, g
...
@@ -2346,7 +2346,7 @@ static void server_params_parse(int argc, char **argv, server_params &sparams, g
invalid_param
=
true
;
invalid_param
=
true
;
break
;
break
;
}
}
#if defined(GGML_USE_CU
BLAS
) || defined(GGML_USE_SYCL)
#if defined(GGML_USE_CU
DA
) || defined(GGML_USE_SYCL)
std
::
string
arg_next
=
argv
[
i
];
std
::
string
arg_next
=
argv
[
i
];
// split string by , and /
// split string by , and /
...
@@ -2367,8 +2367,8 @@ static void server_params_parse(int argc, char **argv, server_params &sparams, g
...
@@ -2367,8 +2367,8 @@ static void server_params_parse(int argc, char **argv, server_params &sparams, g
}
}
}
}
#else
#else
LOG_WARNING
(
"llama.cpp was compiled without
cuBLAS
. It is not possible to set a tensor split.
\n
"
,
{});
LOG_WARNING
(
"llama.cpp was compiled without
CUDA
. It is not possible to set a tensor split.
\n
"
,
{});
#endif // GGML_USE_CU
BLAS
#endif // GGML_USE_CU
DA
}
}
else
if
(
arg
==
"--main-gpu"
||
arg
==
"-mg"
)
else
if
(
arg
==
"--main-gpu"
||
arg
==
"-mg"
)
{
{
...
@@ -2377,7 +2377,7 @@ static void server_params_parse(int argc, char **argv, server_params &sparams, g
...
@@ -2377,7 +2377,7 @@ static void server_params_parse(int argc, char **argv, server_params &sparams, g
invalid_param
=
true
;
invalid_param
=
true
;
break
;
break
;
}
}
#if defined(GGML_USE_CU
BLAS
) || defined(GGML_USE_SYCL)
#if defined(GGML_USE_CU
DA
) || defined(GGML_USE_SYCL)
params
.
main_gpu
=
std
::
stoi
(
argv
[
i
]);
params
.
main_gpu
=
std
::
stoi
(
argv
[
i
]);
#else
#else
LOG_WARNING
(
"llama.cpp was compiled without cuBLAS. It is not possible to set a main GPU."
,
{});
LOG_WARNING
(
"llama.cpp was compiled without cuBLAS. It is not possible to set a main GPU."
,
{});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment