Commit 00a2cb1c8646dfa8c6131f8d7bcefc46c2b92e9b
1 parent
1fa39585
修复vpt释放会报错的问题
Showing
2 changed files
with
1 additions
and
3 deletions
src/ai_engine_module/VPTProcess.cpp
... | ... | @@ -191,6 +191,7 @@ int VPTProcess::process(vector<DeviceMemory*> vec_gpuMem, |
191 | 191 | /* 算法句柄 资源释放 */ |
192 | 192 | void VPTProcess::release(){ |
193 | 193 | if (m_det_handle){ |
194 | + aclrtSetCurrentContext(m_algorthim_ctx); | |
194 | 195 | vpt_release(&m_det_handle); |
195 | 196 | m_det_handle = NULL; |
196 | 197 | } | ... | ... |
src/ai_engine_module/VPTProcess.h
... | ... | @@ -13,8 +13,6 @@ |
13 | 13 | #include "sort/Sort.h" |
14 | 14 | #include "acl/acl.h" |
15 | 15 | #include "acl/ops/acl_dvpp.h" |
16 | -#include "../util/vpc_util.h" | |
17 | -#include "../util/JpegUtil.h" | |
18 | 16 | |
19 | 17 | #include "ai_engine_header.h" |
20 | 18 | |
... | ... | @@ -78,7 +76,6 @@ public: |
78 | 76 | private: |
79 | 77 | int m_devId; |
80 | 78 | aclrtContext m_algorthim_ctx; |
81 | - JpegUtil jpegUtil; | |
82 | 79 | void* m_det_handle{nullptr}; |
83 | 80 | float threshold{0.6}; |
84 | 81 | int m_max_batchsize; | ... | ... |