criu
criu copied to clipboard
criu: add support for --gpu-device-map
This option allows to specify a GPU device map that will be used during restore. The provided map must contain all checkpointed GPU devices in the format "oldUuid=newUuid,oldUuid=newUuid,..." that will be used to remap old devices to new devices.
In the following example all process checkpointed on $GPU_0 will be restored on $GPU_1:
i=0
for uuid in $(nvidia-smi --list-gpus | grep -oP 'UUID: \K[^)]+'); do
export GPU_$i=$uuid
i=$((i+1))
done
criu restore --gpu-device-map=$GPU_0=$GPU_1,$GPU_1=$GPU_0,$GPU_2=$GPU_2,$GPU_3=$GPU_3
Demo: https://youtu.be/8F6RAXb_GfU