cuperiod.free_gpu_memory

cuperiod.free_gpu_memory()[source]

Return cupy’s cached device + pinned blocks to the driver. No-op off GPU.

A long-lived batch process allocates many variable-sized device arrays per light curve; cupy’s default pool retains freed blocks, so across thousands of light curves the pool can grow and fragment until a routine allocation stalls. Calling this between batch shards bounds pool growth — the GPU analogue of a fresh worker teardown. The cudaFree of cached blocks costs ~milliseconds.

Return type:

None