From 6d1da6148298e772e8ebabd613f68eccdb214a9e Mon Sep 17 00:00:00 2001 From: Jesus Ramos Date: Tue, 10 Dec 2024 12:11:57 -0800 Subject: [PATCH] cuda: Fix return value from CHECKPOINT_DEVICES hook so that dump's fail properly cuda-checkpoint returns the positive CUDA error code when it runs into an issue and passing that along as the return value would cause errors to get ignored Signed-off-by: Jesus Ramos --- plugins/cuda/cuda_plugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/cuda/cuda_plugin.c b/plugins/cuda/cuda_plugin.c index 7764cf3c75..e78828b189 100644 --- a/plugins/cuda/cuda_plugin.c +++ b/plugins/cuda/cuda_plugin.c @@ -402,7 +402,7 @@ int cuda_plugin_checkpoint_devices(int pid) interrupt: int_ret = interrupt_restore_thread(restore_tid, &save_sigset); - return status != 0 ? status : int_ret; + return status != 0 ? -1 : int_ret; } CR_PLUGIN_REGISTER_HOOK(CR_PLUGIN_HOOK__CHECKPOINT_DEVICES, cuda_plugin_checkpoint_devices);