Skip to content

Commit

Permalink
cuda: Fix return value from CHECKPOINT_DEVICES hook so that dump's fa…
Browse files Browse the repository at this point in the history
…il 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 <[email protected]>
  • Loading branch information
jesus-ramos committed Dec 10, 2024
1 parent 058572e commit c3ffe66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/cuda/cuda_plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit c3ffe66

Please sign in to comment.