关于CUDA混乱统一的虚拟内存 [英] Confusion about CUDA unified virtual memory

查看:1005
本文介绍了关于CUDA混乱统一的虚拟内存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有统一的虚拟内存有些混乱。

I have some confusion about unified virtual memory.

链接背后的文档(的http://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#unified-virtual-address-space)说,这时候可以使用...

The documentation behind the link (http://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#unified-virtual-address-space) says it can be used when...

当应用程序被运行作为一个64位的过程中,一个单一的地址空间用于在主机和计算能力2.0以及更高的所有设备。

When the application is run as a 64-bit process, a single address space is used for the host and all the devices of compute capability 2.0 and higher.

但这个链接(的http:// docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#um-requirements )说,它需要:

But this link (http://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#um-requirements) says it needs:

与SM架构3.0或更高版本(开普勒类或更新版本)一个GPU

a GPU with SM architecture 3.0 or higher (Kepler class or newer)

此外,第一个链接说,我可以使用 cudaHostAlloc 。第二个,然后使用 cudaMallocManaged

Furthermore, the first link says that I can use cudaHostAlloc. The second one then uses cudaMallocManaged.

是否有这种统一一词的2个不同的东西或文档只是有点语无伦次?

Are there 2 different things between this 'Unified' term or is the documentation just a bit incoherent?

推荐答案

您指的是统一的虚拟地址空间是不一样的统一的内存,因为CUDA 6.0和架构3.0或更高版本这是介绍并省去了从主机明确的数据传输设备

You are refering to Unified Virtual Address Space which is not the same as Unified memory which was introduced since CUDA 6.0 and for architecture 3.0 or higher and eliminates the need for explicit data transfer from host to device

<一个href=\"http://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#um-unified-memory-programming-hd\"相对=nofollow>统一存储

统一MEMORY2

您还可以查看:

<一个href=\"http://stackoverflow.com/questions/19186998/information-example-on-unified-virtual-addressing-uva-in-cuda\">here ,<一个href=\"http://stackoverflow.com/questions/14891610/detection-if-a-pointer-is-pointing-in-the-device-or-host-in-cuda/14908262#14908262\">and这里

这篇关于关于CUDA混乱统一的虚拟内存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆