Valgrind and CUDA: Are reported leaks real?

前端 未结 5 1036
庸人自扰
庸人自扰 2020-12-15 22:23

I have a very simple CUDA component in my application. Valgrind reports a lot of leaks and still-reachables, all related to the cudaMalloc calls.

Are these leaks rea

5条回答
  •  暖寄归人
    2020-12-15 23:13

    I wouldn't trust valgrind or any other leak detector (like VLD) with CUDA. I'm sure they weren't designed with GPU allocations in mind. I don't know whether Nvidia's Nsight has the capability these days (I haven't done GPU programming for almost 6 months now), but that's the best thing I used for CUDA debugging, and to be quite honest, it was buggy as hell.

    The code you've posted shouldn't create a leak.

提交回复
热议问题