From 49c1bd03fce57d268923646cd89d2ace67b6b366 Mon Sep 17 00:00:00 2001 From: Tianyu Liu Date: Wed, 11 Sep 2024 14:36:14 -0400 Subject: [PATCH] Add more clarifying comments --- cpp/include/kvikio/posix_io.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpp/include/kvikio/posix_io.hpp b/cpp/include/kvikio/posix_io.hpp index 26e103212a..9a28e06eec 100644 --- a/cpp/include/kvikio/posix_io.hpp +++ b/cpp/include/kvikio/posix_io.hpp @@ -47,6 +47,8 @@ class StreamsByThread { // (e.g. CUstream) with static storage duration, but instead let them leak // on program termination. This is to prevent undefined behavior in CUDA. See // + // This also prevents crash (segmentation fault) if clients call + // cuDevicePrimaryCtxReset() or cudaDeviceReset() before program termination. ~StreamsByThread() = default; static CUstream get(CUcontext ctx, std::thread::id thd_id)