我有一个具有 2Gb 内存的 GTX570,当我尝试通过一个 cudamalloc 调用分配比大约 804Mb 更多的内存时,我遇到了麻烦。有人知道为什么会这样吗?这是我的第一个电话,所以我怀疑它是碎片化的。
没问题:
Memory avaliable: Free: 2336116736, Total: 2684026880
requesting 804913152 bytes
no error
Memory avaliable: Free: 1531199488, Total: 2684026880
requesting 804913152 bytes
no error
Memory avaliable: Free: 726286336, Total: 2684026880
问题:
Memory avaliable: Free: 2327601152, Total: 2684026880
requesting 805306368 bytes
out of memory
Memory avaliable: Free: 2327597056, Total: 2684026880
requesting 805306368 bytes
out of memory
Memory avaliable: Free: 2327597056, Total: 2684026880