Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ShawnNew
Copy link

@ShawnNew ShawnNew commented Nov 1, 2024

No description provided.

@GreatV
Copy link
Collaborator

GreatV commented Nov 1, 2024

Please fix code style and update documentation.

@@ -133,7 +133,7 @@ if(WITH_MKL)
if (WIN32)
set(MKLDNN_LIB ${MKLDNN_PATH}/lib/mkldnn.lib)
else ()
set(MKLDNN_LIB ${MKLDNN_PATH}/lib/libmkldnn.so.0)
set(MKLDNN_LIB ${MKLDNN_PATH}/lib/libdnnl.so.3)
Copy link
Collaborator

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 ?

@@ -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.");
Copy link
Collaborator

Choose a reason for hiding this comment

The 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.

@@ -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.");
DEFINE_bool(use_tensorrt, false, "Whether use tensorrt.");
DEFINE_int32(gpu_id, 0, "Device id of GPU to execute.");
Copy link
Collaborator

Choose a reason for hiding this comment

The 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 ?

@@ -139,6 +139,8 @@ void StructureTableRecognizer::LoadModel(const std::string &model_dir) {
config.EnableTunedTensorRtDynamicShape("./trt_table_shape.txt", true);
}
}
} else if (this->use_gpu_) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be use_mlu_ ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants