Commit ecff75dea5193a4c127c23b4a85b48d30ab8b7ef

Authored by Hu Chunming
1 parent 45e07c6d

删除aclrtSetDevice

src/ai_platform/MultiSourceProcess.cpp
... ... @@ -118,8 +118,6 @@ int CMultiSourceProcess::InitAlgorthim(tsl_aiplatform_param vptParam){
118 118 vparam.threshold = 0.4;
119 119 vparam.model_dir = models_dir;
120 120  
121   - aclrtSetDevice(m_devId);
122   -
123 121 int ret = vpt_process.init(vparam);
124 122 if (ret < 0){
125 123 return ret;
... ... @@ -706,7 +704,6 @@ bool CMultiSourceProcess::finish_task(const string taskID, const bool delete_sna
706 704 int CMultiSourceProcess::algorthim_process_thread(){
707 705 LOG_INFO("algorthim_process_thread start...");
708 706  
709   - ACL_CALL(aclrtSetDevice(m_devId), ACL_SUCCESS, 1);
710 707 aclrtContext ctx;
711 708 ACL_CALL(aclrtCreateContext(&ctx, m_devId), ACL_SUCCESS, 1);
712 709  
... ... @@ -762,9 +759,6 @@ int CMultiSourceProcess::algorthim_process_thread(){
762 759 }
763 760 }
764 761 }
765   -
766   -
767   -
768 762 }
769 763  
770 764 m_RgbDataList.pop_front();
... ... @@ -811,7 +805,6 @@ int CMultiSourceProcess::algorthim_process_thread(){
811 805 }
812 806  
813 807 aclrtDestroyContext(ctx);
814   - aclrtResetDevice(m_devId);
815 808 LOG_INFO("algorthim_process_thread exit.");
816 809  
817 810 return 0;
... ...