General utilities¶
- The logic for which device to use. At the moment, this does not support multiple GPUs, but it should be pretty easy to add in if required.
find_device(training=False)
¶
Description: Find the device to use for the pipeline. If cuda is available, use it. If not, check if MPS is available and use it. If not, use CPU.
Source code in backend/modules/general_utils.py
9 10 11 12 13 14 15 16 17 18 19 |
|
load_config_and_device(config_file, training=False)
¶
Description: Load the config file and find the device to use for the pipeline.
Source code in backend/modules/general_utils.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
|