Information/example on Unified Virtual Addressing

2019-07-09 03:08发布

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?

标签: cuda gpu nvidia
1条回答
smile是对你的礼貌
2楼-- · 2019-07-09 04:01

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.

查看更多
登录 后发表回答