Browse Source

Added warning if cuda is disabled, to avoid silent failure

Maxime Chevalier-Boisvert 7 years ago
parent
commit
d4d83a9bf6
1 changed files with 3 additions and 0 deletions
  1. 3 0
      pytorch-rl/arguments.py

+ 3 - 0
pytorch-rl/arguments.py

@@ -64,4 +64,7 @@ def get_args():
     args.cuda = not args.no_cuda and torch.cuda.is_available()
     args.vis = not args.no_vis
 
+    if not args.cuda:
+        print('*** WARNING: CUDA NOT ENABLED ***')
+
     return args