首页 > 其他 > 详细

Pycharm use GUP server

时间:2019-10-22 23:29:43      阅读:140      评论:0      收藏:0      [点我收藏+]

1、配置远程服务器信息

  Tools——Deployment——Configuration

  技术分享图片

  然后,点击加号Add一个远程服务信息。

  我这里命名为server1;Type选择SFTP;Host即ip地址,也就是服务器的地址;Port是端口号;User name即用户名;再输一下password,顺便save一下。

  技术分享图片

  Test一下Connection,然后自动生成一下Root path,OK。

  技术分享图片

 2、添加远程调试环境

  File——Settings——Project——Project Interpreter(解释器)

  技术分享图片

  Show all——加号——SSH Interpreter——Existing server configuration——server1——Next——Finish

  技术分享图片

  技术分享图片

   技术分享图片

3、Test

  新建一个项目文件,跑一下code。

import tensorflow as tf
a = tf.test.is_built_with_cuda()
b = tf.test.is_gpu_available(
    cuda_only=False,
    min_cuda_compute_capability=None
)
print(a)
print(b)

  结果:

ssh://root@111.44.254.166:43942/usr/bin/python -u /root/tmp/pycharm_project_928/test.py
2019-10-22 22:54:51.954587: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-10-22 22:54:52.058581: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:897] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-10-22 22:54:52.059029: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1392] Found device 0 with properties: 
name: GeForce RTX 2080 major: 7 minor: 5 memoryClockRate(GHz): 1.71
pciBusID: 0000:01:00.0
totalMemory: 7.77GiB freeMemory: 7.62GiB
2019-10-22 22:54:52.059044: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1471] Adding visible gpu devices: 0
2019-10-22 22:54:52.275783: I tensorflow/core/common_runtime/gpu/gpu_device.cc:952] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-10-22 22:54:52.275834: I tensorflow/core/common_runtime/gpu/gpu_device.cc:958]      0 
2019-10-22 22:54:52.275842: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] 0:   N 
2019-10-22 22:54:52.275968: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1084] Created TensorFlow device (/device:GPU:0 with 7342 MB memory) -> physical GPU (device: 0, name: GeForce RTX 2080, pci bus id: 0000:01:00.0, compute capability: 7.5)
True
True

Process finished with exit code 0

 

Pycharm use GUP server

原文:https://www.cnblogs.com/fangxiaoqi/p/11723294.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!