CUDA全球内存,在哪里? [英] CUDA Global Memory, Where is it?
问题描述
我一直在搜索任何可以找到的文档,但我还没有遇到任何明确说明什么是全局内存。
我相信所分配的全局存储器在显卡本身的GDDR上,而不是与CPU共享的RAM,因为其中一个文档说明指针不能被主机侧取消引用。我是对吗?
全局内存是一个虚拟地址空间,可以映射到设备内存或页锁定(固定)主机存储器。后者需要CC> 1.0。
本地,常量,纹理和本地内存分配在全局内存中,但通过不同的地址空间和缓存访问。
在CC> 2.0时,通用地址空间允许将共享内存映射到全局地址空间;然而,共享内存总是驻留在每个SM片上存储器中。
I understand that in CUDA's memory hierachy, we have things like shared memory, texture memory, constant memory, registers and of course the global memory which we allocate using cudaMalloc().
I've been searching through whatever documentations I can find but I have yet to come across any that explicitly explains what is the global memory.
I believe that the global memory allocated is on the GDDR of graphics card itself and not the RAM that is shared with the CPU since one of the documentations did state that the pointer cannot be dereferenced by the host side. Am I right?
Global memory is a virtual address space that can be mapped to device memory (memory on the graphics card) or page-locked (pinned) host memory. The latter requires CC > 1.0.
Local, constant, texture, and local memory are allocated in global memory but accessed through different address spaces and caches.
On CC > 2.0 the generic address space allows mapping of shared memory into the global address space; however, shared memory always resides in per SM on-chip memory.
这篇关于CUDA全球内存,在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!