mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-11 01:24:36 +00:00
if gpuid is specified, force specific order
This commit is contained in:
parent
7e95b80211
commit
2f04f848e1
1 changed files with 4 additions and 0 deletions
|
@ -425,15 +425,19 @@ def set_backend_props(inputs):
|
|||
|
||||
if not args.tensor_split:
|
||||
if (args.usecublas and "0" in args.usecublas):
|
||||
os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
|
||||
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
|
||||
os.environ["HIP_VISIBLE_DEVICES"] = "0"
|
||||
elif (args.usecublas and "1" in args.usecublas):
|
||||
os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
|
||||
os.environ["CUDA_VISIBLE_DEVICES"] = "1"
|
||||
os.environ["HIP_VISIBLE_DEVICES"] = "1"
|
||||
elif (args.usecublas and "2" in args.usecublas):
|
||||
os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
|
||||
os.environ["CUDA_VISIBLE_DEVICES"] = "2"
|
||||
os.environ["HIP_VISIBLE_DEVICES"] = "2"
|
||||
elif (args.usecublas and "3" in args.usecublas):
|
||||
os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
|
||||
os.environ["CUDA_VISIBLE_DEVICES"] = "3"
|
||||
os.environ["HIP_VISIBLE_DEVICES"] = "3"
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue