首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为什么Tensorflow显示可用内存少于GPU规格?

为什么Tensorflow显示可用内存少于GPU规格?
EN

Stack Overflow用户
提问于 2019-10-30 06:17:40
回答 1查看 853关注 0票数 1

此命令为GPU提供4614 MB内存。

但是RTX2060有6 6GB的内存。为什么它只显示4 4GB多一点?

代码语言:javascript
复制
>>> tf.test.is_built_with_cuda()
True
>>> tf.test.is_gpu_available(cuda_only=False,min_cuda_compute_capability=None)
2019-10-29 17:02:40.062465: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2019-10-29 17:02:40.072455: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library nvcuda.dll
2019-10-29 17:02:40.105489: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 0 with properties:
name: GeForce RTX 2060 major: 7 minor: 5 memoryClockRate(GHz): 1.2
pciBusID: 0000:01:00.0
2019-10-29 17:02:40.111138: I tensorflow/stream_executor/platform/default/dlopen_checker_stub.cc:25] GPU libraries are statically linked, skip dlopen check.
2019-10-29 17:02:40.117217: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1763] Adding visible gpu devices: 0
2019-10-29 17:02:44.865862: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1181] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-10-29 17:02:44.870341: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1187]      0
2019-10-29 17:02:44.872351: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1200] 0:   N
2019-10-29 17:02:44.876727: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1326] Created TensorFlow device (/device:GPU:0 with 4614 MB memory) -> physical GPU (device: 0, name: GeForce RTX 2060, pci bus id: 0000:01:00.0, compute capability: 7.5)
True
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-10-30 06:41:33

Tensorflow报告它能够在设备上使用的内存。因此,如果你有任何其他东西在使用图形处理器内存,TensorFlow报告的内存将低于总可用内存。

此外,一些操作系统只允许应用程序使用内存的某一部分,以确保它仍然能够使用设备(参见TensorFlow的GitHub:https://github.com/tensorflow/tensorflow/issues/22623上的此问题)

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/58616157

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档