CUDA-context consume more GPU memory in ChildProcess(start by execl) than in ParentProcess(eg. 186MB more than 108MB) Why?

CUDA-context consume more GPU memory in ChildProcess(start by execl) than in ParentProcess(eg. 186MB more than 108MB) Why?

The amount of device memory the cuda context requires is unspecified and can differ between GPUs.

1 Like

and depends on versions of CUDA and driver?

Like any other internal implementation artifact, yes.

thanks! but why CUDA-context consume more GPU memory in ChildProcess(start by execl) than in ParentProcess ?
////////////////////////////////////////////////////

Parent Process (initializes CUDA), this only mainProcess consume 108MB GPU memory.

////////////////////////////////////////////////////

Parent Process
|
child process1 (initializes CUDA), this childProcess(by fork, execl) consume 186MB GPU memory.

why?

Note the “internal” designation. Companies, in any kind of business, are not in the habit of telegraphing internal design details to the world. For software, programmers get to rely on whatever is promised in the documentation, modulo documentation bugs. Everything else is a design artifact that can change at any time without notice.

How many experiments have you run to conclude that this is always the case? The amount of memory used by any kind of complex software stack is often a function of a largish number of configuration parameters. Until these experiments provide comprehensive data, I guess the strongest statement we can make at this time is that the above statement holds in one particular software context, on one particular operating system, with one particular CUDA version, with one particular GPU.

1 Like

yes, but i want to predict the GPU memory size of my CUDA app before it start.
there seems no document about the GPU memory size consumed by CUDA-device itself.
Anyway, and curious that why only CUDA-context consumed much more GPU memory size when using CUDA only in ChildProcess than only in PrarentProcess.

Thanks!