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,6 +191,7 @@ int VPTProcess::process(vector<DeviceMemory*> vec_gpuMem, | ||
191 | /* 算法句柄 资源释放 */ | 191 | /* 算法句柄 资源释放 */ |
192 | void VPTProcess::release(){ | 192 | void VPTProcess::release(){ |
193 | if (m_det_handle){ | 193 | if (m_det_handle){ |
194 | + aclrtSetCurrentContext(m_algorthim_ctx); | ||
194 | vpt_release(&m_det_handle); | 195 | vpt_release(&m_det_handle); |
195 | m_det_handle = NULL; | 196 | m_det_handle = NULL; |
196 | } | 197 | } |
src/ai_engine_module/VPTProcess.h
@@ -13,8 +13,6 @@ | @@ -13,8 +13,6 @@ | ||
13 | #include "sort/Sort.h" | 13 | #include "sort/Sort.h" |
14 | #include "acl/acl.h" | 14 | #include "acl/acl.h" |
15 | #include "acl/ops/acl_dvpp.h" | 15 | #include "acl/ops/acl_dvpp.h" |
16 | -#include "../util/vpc_util.h" | ||
17 | -#include "../util/JpegUtil.h" | ||
18 | 16 | ||
19 | #include "ai_engine_header.h" | 17 | #include "ai_engine_header.h" |
20 | 18 | ||
@@ -78,7 +76,6 @@ public: | @@ -78,7 +76,6 @@ public: | ||
78 | private: | 76 | private: |
79 | int m_devId; | 77 | int m_devId; |
80 | aclrtContext m_algorthim_ctx; | 78 | aclrtContext m_algorthim_ctx; |
81 | - JpegUtil jpegUtil; | ||
82 | void* m_det_handle{nullptr}; | 79 | void* m_det_handle{nullptr}; |
83 | float threshold{0.6}; | 80 | float threshold{0.6}; |
84 | int m_max_batchsize; | 81 | int m_max_batchsize; |