瀏覽代碼

Added warning if cuda is disabled, to avoid silent failure

Maxime Chevalier-Boisvert 7 年之前
父節點
當前提交
d4d83a9bf6
共有 1 個文件被更改,包括 3 次插入0 次删除
  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