mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-10 17:14:36 +00:00
try to set cuda pcie order first thing
This commit is contained in:
parent
a8d33ebb0d
commit
e0a7694328
1 changed files with 6 additions and 2 deletions
|
@ -8,10 +8,14 @@
|
||||||
# editing tools, save formats, memory, world info, author's note, characters,
|
# editing tools, save formats, memory, world info, author's note, characters,
|
||||||
# scenarios and everything Kobold and KoboldAI Lite have to offer.
|
# scenarios and everything Kobold and KoboldAI Lite have to offer.
|
||||||
|
|
||||||
|
import os
|
||||||
|
try:
|
||||||
|
os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" # try set GPU to PCI order first thing
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
import copy
|
import copy
|
||||||
import ctypes
|
import ctypes
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
import os
|
|
||||||
import math
|
import math
|
||||||
import re
|
import re
|
||||||
import argparse
|
import argparse
|
||||||
|
@ -574,7 +578,7 @@ def set_backend_props(inputs):
|
||||||
inputs.kcpp_main_gpu = args.maingpu
|
inputs.kcpp_main_gpu = args.maingpu
|
||||||
|
|
||||||
if args.usecublas:
|
if args.usecublas:
|
||||||
os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
|
os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
|
||||||
if not args.tensor_split:
|
if not args.tensor_split:
|
||||||
if (args.usecublas and "0" in args.usecublas):
|
if (args.usecublas and "0" in args.usecublas):
|
||||||
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
|
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue