GPU occupier
GPU resource management and memory occupancy utilities.
This module provides utilities for managing GPU resources during training, including methods to reserve GPU memory and ensure consistent GPU availability for model training.
GPUOccupier()
Manages a parallel process to keep the GPU busy when it is idle.
Source code in mlir_rl_artifact/utils/gpu_occupier.py
__ctx
instance-attribute
Multiprocessing context.
__gpu_needed_event
instance-attribute
Event that is set when the GPU is needed.
__stop_event
instance-attribute
Event that is set when the process should stop.
__process
instance-attribute
Process that keeps the GPU busy.
gpu_needed()
Context manager that signals that the GPU is needed.