Pycharm use GUP server
Posted fangxiaoqi
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Pycharm use GUP server相关的知识,希望对你有一定的参考价值。
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的主要内容,如果未能解决你的问题,请参考以下文章
CentOS8安装pycharm报错Can't connect to X11 window server using ':0' as the value of the DIS(
[Vue + TS] Use Dependency Injection in Vue Using @Inject and @Provide Decorators with TypeScript(代码片
解决报错:在pycharm中使用os模块获取当前进程id,出现错误:AttributeError: module ‘os‘ has no attribute ‘getgid‘(图文并茂!!!)(代码片
error: ‘_beginthreadex‘ undeclared (first use in this function); did you mean ‘SDL_beginthread‘?(代码片
Flink producer attempted to use a producer id which is not currently assigned to its transaction(代码片
PyCharm出现TabError: inconsistent use of tabs and spaces in indentation最简单实用的解决办法