Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
CUdeviceptr deviceInputA = new CUdeviceptr(); cuMemAlloc(deviceInputA, size * Sizeof.DOUBLE); cuMemcpyHtoD(deviceInputA, Pointer.to(inputfingerprint), size * Sizeof.DOUBLE); cuMemFree(deviceInputA);
这里 cuMemFree 没有释放 GPU 内存。
终于,这个问题得到了解决。我有一个 2D 输出数组,并且没有在 GPU 上释放数组的内部指针。因此 GPU 内存没有被释放。释放后,它正在释放 GPU 内存。 cuMemFree 在 JCuda 中工作得非常好。