Yaofu3 commited on
Commit
c3fc5ce
1 Parent(s): 5f34a5c

Fix default device for model and input (#17)

Browse files

- fix:change cuda explicitly to cuda:0 (da43b75034402cdd16c71995d1b75a1b9b0525eb)

Files changed (1) hide show
  1. src/backend/envs.py +1 -1
src/backend/envs.py CHANGED
@@ -63,4 +63,4 @@ EVAL_REQUESTS_PATH_BACKEND = os.path.join(CACHE_PATH, "eval-queue-bk")
63
  EVAL_REQUESTS_PATH_BACKEND_SYNC = os.path.join(CACHE_PATH, "eval-queue-bk-sync")
64
  EVAL_RESULTS_PATH_BACKEND = os.path.join(CACHE_PATH, "eval-results-bk")
65
 
66
- DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
 
63
  EVAL_REQUESTS_PATH_BACKEND_SYNC = os.path.join(CACHE_PATH, "eval-queue-bk-sync")
64
  EVAL_RESULTS_PATH_BACKEND = os.path.join(CACHE_PATH, "eval-results-bk")
65
 
66
+ DEVICE = "cuda:0" if torch.cuda.is_available() else "cpu"