【问题标题】:How to free the GPU memory in JCuda as free function provided in JCuda is not releasing the GPU memory in real time applications?如何释放 JCuda 中的 GPU 内存,因为 JCuda 中提供的免费功能不会在实时应用程序中释放 GPU 内存?
【发布时间】:2014-01-08 15:50:36
【问题描述】:
CUdeviceptr deviceInputA = new CUdeviceptr();
cuMemAlloc(deviceInputA, size * Sizeof.DOUBLE);
cuMemcpyHtoD(deviceInputA, Pointer.to(inputfingerprint), size * Sizeof.DOUBLE);

cuMemFree(deviceInputA);

这里 cuMemFree 没有释放 GPU 内存。

【问题讨论】:

    标签: gpu nvidia jcuda


    【解决方案1】:

    终于,这个问题解决了。我有一个 2D 输出数组,并且没有在 GPU 上释放数组的内部指针。因此 GPU 内存没有被释放。 释放后,它正在释放 GPU 内存。
    cuMemFree 在 JCuda 中运行良好。

    【讨论】:

      猜你喜欢
      • 2017-04-23
      • 2022-01-27
      • 2018-09-07
      • 2016-01-01
      • 2019-02-10
      • 2010-09-26
      • 1970-01-01
      • 2019-12-05
      • 1970-01-01
      相关资源
      最近更新 更多