Skip to content

Commit 47aecde

Browse files
miracle-sophgosophgo-yezx
authored andcommitted
fix vpss preprocessor device init.
Change-Id: Iee0e24d8e9f435845860eff36f223fd6686b4d5a Reviewed-on: https://gerrit-ai.sophgo.vip:8443/145239 Reviewed-by: 振兴 叶 <zhenxing.ye@sophgo.com>
1 parent cf89dfe commit 47aecde

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

include/framework/preprocess/vpss_preprocessor.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class VpssContext {
1717
};
1818
class VpssPreprocessor : public BasePreprocessor {
1919
public:
20-
VpssPreprocessor();
20+
VpssPreprocessor(int device = 0);
2121
~VpssPreprocessor();
2222

2323
std::shared_ptr<BaseImage> preprocess(

src/framework/preprocess/vpss_preprocessor.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ VpssContext* VpssContext::GetInstance() {
6464
return &instance;
6565
}
6666

67-
VpssPreprocessor::VpssPreprocessor() {
67+
VpssPreprocessor::VpssPreprocessor(int device) {
6868
group_id_ = -1;
69+
device_ = device;
6970
if (!init()) {
7071
throw std::runtime_error("VpssPreprocessor init failed!\n");
7172
LOGE("VpssPreprocessor init failed!\n");

0 commit comments

Comments
 (0)