如何使用来自 tensorflow python 库的 CUDA 固定内存 [英] how to use CUDA Pinned memory from tensorflow python library
本文介绍了如何使用来自 tensorflow python 库的 CUDA 固定内存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我目前正在研究在 GPU 上运行 tensorflow.我正在阅读有关 CUDA 固定内存的信息.
I am currently looking into running tensorflow on GPU. I was reading about CUDA pinned memory.
我在使用 tensorflow python 库时无论如何都找不到设置它.知道怎么做吗?
I was not able to find anyway to set this when using tensorflow python library. Any idea how it can be done?
推荐答案
它自动用于 CPU 和 GPU 之间的任何 memcpy.如果您想要更复杂的功能,您可以编写一个明确使用它们的内核.
It's automatically used for any memcpy between CPU and GPU. If you want more sophisticated functionalities, you can write a kernel that explicitly uses them.
这篇关于如何使用来自 tensorflow python 库的 CUDA 固定内存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文