Closed texadactyl closed 2 years ago
Source to modify:
New utils.py function:
def attach_gpu_device(new_id):
""" On demand, switch to GPU ID new_id.
"""
try:
cp.cuda.Device(new_id).use()
logger.info("attach_gpu_device: Using device ID ({})".format(new_id))
except:
cur_id = cp.cuda.Device().id
logger.error("attach_gpu_device: cp.cuda.Device({}).use() FAILED!".format(new_id))
logger.warning("attach_gpu_device: Will continue to use current device ID ({})".format(cur_id))
Cloning what turbo_seti does would be fine.
In
find_doppler/kernels/__init__.py
the gpu_id is a parameter. Not exactly the same but roughly: