Update aux device to depend on primary device

This commit is contained in:
somebody
2023-07-03 19:36:31 -05:00
parent 6f7e6422ef
commit bce1a907e5
4 changed files with 16 additions and 14 deletions

View File

@@ -650,17 +650,6 @@ class UIProgressBarFile(object):
def flush(self):
pass
def get_auxilary_device():
"""Get device auxilary tensors like inputs should be stored on."""
# NOTE: TPU isn't a torch device, so TPU stuff gets sent to CPU.
if koboldai_vars.hascuda and koboldai_vars.usegpu:
return koboldai_vars.gpu_device
elif koboldai_vars.hascuda:
# TODO: Primary device
return "cuda"
return "cpu"
#==================================================================#
# Strips submitted text from the text returned by the AI
#==================================================================#