Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

Fix: function SetupNppContext did not Pop CUDA Context #564

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/TC/src/NppCommon.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "NppCommon.hpp"
#include "MemoryInterfaces.hpp"
#include <cstring>
#include <iostream>
#include <mutex>
Expand All @@ -12,7 +13,7 @@ void SetupNppContext(CUcontext context, CUstream stream,
memset(&nppCtx, 0, sizeof(nppCtx));

lock_guard<mutex> lock(gNppMutex);
cuCtxPushCurrent(context);
CudaCtxPush ctxPush(context);

CUdevice device;
auto res = cuCtxGetDevice(&device);
Expand Down