ggml : also check ggml_backend_is_cpu
This commit is contained in:
parent
cdb81d4ea1
commit
44c93c6746
1 changed files with 1 additions and 1 deletions
|
@ -703,7 +703,7 @@ ggml_backend_t ggml_backend_cpu_init(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ggml_backend_is_cpu(ggml_backend_t backend) {
|
bool ggml_backend_is_cpu(ggml_backend_t backend) {
|
||||||
return backend->iface.get_name == ggml_backend_cpu_name;
|
return backend && backend->iface.get_name == ggml_backend_cpu_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ggml_backend_cpu_set_n_threads(ggml_backend_t backend_cpu, int n_threads) {
|
void ggml_backend_cpu_set_n_threads(ggml_backend_t backend_cpu, int n_threads) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue