From ccaa81fa528cd1abeb70cfa30e6c1f4574c9798a Mon Sep 17 00:00:00 2001 From: Tianyu Liu Date: Tue, 10 Sep 2024 15:36:01 -0400 Subject: [PATCH] Intentionally leak static CUDA resources --- cpp/include/kvikio/posix_io.hpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/cpp/include/kvikio/posix_io.hpp b/cpp/include/kvikio/posix_io.hpp index 9e88a3e265..e596760314 100644 --- a/cpp/include/kvikio/posix_io.hpp +++ b/cpp/include/kvikio/posix_io.hpp @@ -42,16 +42,7 @@ class StreamsByThread { public: StreamsByThread() = default; - ~StreamsByThread() noexcept - { - for (auto& [_, stream] : _streams) { - try { - CUDA_DRIVER_TRY(cudaAPI::instance().StreamDestroy(stream)); - } catch (const CUfileException& e) { - std::cerr << e.what() << std::endl; - } - } - } + ~StreamsByThread() = default; static CUstream get(CUcontext ctx, std::thread::id thd_id) {