From 857d1bb8c261e08ccf74328626d362c6c81de8c9 Mon Sep 17 00:00:00 2001 From: julee Date: Fri, 29 Mar 2024 09:29:28 +0000 Subject: [PATCH] Fix: function SetupNppContext did not Pop CUDA Context, causing the original cuda context not to be restored after the construction of the PySurfaceConverter object --- src/TC/src/NppCommon.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/TC/src/NppCommon.cpp b/src/TC/src/NppCommon.cpp index 3727ad79..ee08dc9d 100644 --- a/src/TC/src/NppCommon.cpp +++ b/src/TC/src/NppCommon.cpp @@ -1,4 +1,5 @@ #include "NppCommon.hpp" +#include "MemoryInterfaces.hpp" #include #include #include @@ -12,7 +13,7 @@ void SetupNppContext(CUcontext context, CUstream stream, memset(&nppCtx, 0, sizeof(nppCtx)); lock_guard lock(gNppMutex); - cuCtxPushCurrent(context); + CudaCtxPush ctxPush(context); CUdevice device; auto res = cuCtxGetDevice(&device);