Caliper icon indicating copy to clipboard operation
Caliper copied to clipboard

Is it possible to get a GPU memory high watermark?

Open balos1 opened this issue 3 years ago • 3 comments

... for CUDA and/or ROCm.

balos1 avatar Nov 02 '22 16:11 balos1

Currently, no. I'll look into it and see if we can record this. We have support for recording HWMs from Umpire if you're using that.

daboehme avatar Nov 02 '22 17:11 daboehme

@daboehme I think you'd have to use the C APIs of nvidia-smi/rocm-smi and poll the current memory usage (potentially in a background thread), keeping track of the max. I am not aware of of any API analogous to getrusage that would provide a straightforward way to get this.

jrmadsen avatar Nov 03 '22 01:11 jrmadsen

@daboehme I think you'd have to use the C APIs of nvidia-smi/rocm-smi and poll the current memory usage (potentially in a background thread), keeping track of the max. I am not aware of of any API analogous to getrusage that would provide a straightforward way to get this.

Yeah, that sounds like the way to go. Thanks!

daboehme avatar Nov 03 '22 02:11 daboehme