Information/example on Unified Virtual Addressing (UVA) in CUDA

痞子三分冷 提交于 2019-12-24 01:43:30

问题


I'm trying to understand the concept of Unified Virtual Addressing (UVA) in CUDA. I have two questions:

  1. Is there any sample (psudo)code available that demonstrates this concept?

  2. I read in the CUDA C Programming Guide that UVA can be used only with 64 bit operating systems. Why it is so?


回答1:


A unified virtual address space combines the pointer (values) and allocation mappings used in device code with the pointer (values) and allocation mappings used in host code into a single unified space.

1-Is there any sample (psudo)code available that demonstrate this concept?

One example of how this may be used is in the usage of the cudaMemcpyDefault transfer kind specifier, in place of cudaMemcpyDeviceToHost or cudaMemcpyHostToDevice in cudaMemcpy operations.

2-Also I read in the programming guide that it is associated only with 64 bit operating system. Why it is so?

A 32 bit machine has a maximum addressable space of 4 Gigabytes. In modern GPUs (with perhaps multiple gigabytes of memory) and modern PCs (with perhaps multiple gigabytes of memory and I/O space) this is not conveniently enough space to have both the host and device memory spaces defined in it.



来源:https://stackoverflow.com/questions/19186998/information-example-on-unified-virtual-addressing-uva-in-cuda

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!