-
Notifications
You must be signed in to change notification settings - Fork 7.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MLU] add ppocr c++ inference support. #14143
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ | |
|
||
// common args | ||
DEFINE_bool(use_gpu, false, "Infering with GPU or CPU."); | ||
DEFINE_bool(use_mlu, false, "Infering with MLU or CPU."); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please include more informative message here, as MLU is not a well known abbreviation yet. |
||
DEFINE_bool(use_tensorrt, false, "Whether use tensorrt."); | ||
DEFINE_int32(gpu_id, 0, "Device id of GPU to execute."); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. from the implementation, gpu_id will also be used to specify MLU ID, when being combined with use_mlu, correct ? |
||
DEFINE_int32(gpu_mem, 4000, "GPU id when infering with GPU."); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -139,6 +139,8 @@ void StructureTableRecognizer::LoadModel(const std::string &model_dir) { | |
config.EnableTunedTensorRtDynamicShape("./trt_table_shape.txt", true); | ||
} | ||
} | ||
} else if (this->use_gpu_) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should be |
||
config.EnableCustomDevice("mlu", this->gpu_id_); | ||
} else { | ||
config.DisableGpu(); | ||
if (this->use_mkldnn_) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is onednn related config, any reason for chaning this lib name ?