From a27af5dfd58e7b48cf3bd063fa2b4b51ed1e0277 Mon Sep 17 00:00:00 2001 From: Jordan Gong Date: Thu, 7 Jan 2021 14:34:37 +0800 Subject: Change device config and add enable multi-GPU computing 1. Add `disable_acc` switch for disabling accelerator. When it is off, system will automatically choosing accelerator. 2. Enable multi-GPU training using torch.nn.DataParallel --- utils/configuration.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'utils/configuration.py') diff --git a/utils/configuration.py b/utils/configuration.py index 3e98343..f3ae0b3 100644 --- a/utils/configuration.py +++ b/utils/configuration.py @@ -1,12 +1,10 @@ from typing import TypedDict, Optional, Union -import torch - from utils.dataset import ClipClasses, ClipConditions, ClipViews class SystemConfiguration(TypedDict): - device: torch.device + disable_acc: bool CUDA_VISIBLE_DEVICES: str save_dir: str -- cgit v1.2.3