Explorar el Código

Added warning if cuda is disabled, to avoid silent failure

Maxime Chevalier-Boisvert hace 7 años
padre
commit
d4d83a9bf6
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  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