From 9e3fbff955e4c9f4f817a3f6ecf2dd665ec4fbe1 Mon Sep 17 00:00:00 2001 From: Brice Videau Date: Tue, 30 Jul 2024 15:41:20 -0500 Subject: [PATCH] Fix cuda atexit being called before ours. (#276) --- cuda/tracer_cuda_helpers.include.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cuda/tracer_cuda_helpers.include.c b/cuda/tracer_cuda_helpers.include.c index c18d1bac..2d84b087 100644 --- a/cuda/tracer_cuda_helpers.include.c +++ b/cuda/tracer_cuda_helpers.include.c @@ -532,6 +532,7 @@ static void _load_tracer(void) { _do_cleanup = 1; #ifndef THAPI_USE_DESTRUCTORS + CU_INIT_PTR(0); atexit(_lib_cleanup); #endif }