mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-09-20 10:35:10 +02:00
Don't fail on AMD llama_cpp_python_hijack.py
check if hip is compiled already and if so dont consider loading cuda but used the compiled llama.cpp with hip
This commit is contained in:
parent
d011040f43
commit
aa2de06680
1 changed files with 7 additions and 2 deletions
|
@ -1,9 +1,9 @@
|
|||
import importlib
|
||||
import platform
|
||||
import torch
|
||||
|
||||
from typing import Sequence
|
||||
|
||||
from tqdm import tqdm
|
||||
|
||||
from modules import shared
|
||||
from modules.cache_utils import process_llamacpp_cache
|
||||
|
||||
|
@ -22,6 +22,11 @@ def llama_cpp_lib():
|
|||
lib_names = [
|
||||
(None, 'llama_cpp')
|
||||
]
|
||||
elif torch.version.hip:
|
||||
lib_names = [
|
||||
('cpu', 'llama_cpp'),
|
||||
(None, 'llama_cpp')
|
||||
]
|
||||
else:
|
||||
lib_names = [
|
||||
('cpu', 'llama_cpp'),
|
||||
|
|
Loading…
Reference in a new issue