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

Precision issue fix #512

Merged
merged 1 commit into from
Dec 10, 2024
Merged

Conversation

jatinwadhwa921
Copy link

Precision issue fix

@@ -144,7 +144,7 @@ void BasicBackend::PopulateConfigValue(ov::AnyMap& device_config) {
device_config.emplace(ov::hint::inference_precision("f32"));
}
if (global_context_.precision_str.find("ACCURACY") != std::string::npos &&
global_context_.device_type == "GPU") {
global_context_.device_type.find("GPU") != std::string::npos) {
Copy link

Choose a reason for hiding this comment

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

U should also check for GPU.0 and GPU.1

Choose a reason for hiding this comment

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

this change LGTM. it should handle any '.x' values after 'GPU' (GPU, GPU.0, GPU.1)..

Our current logic would fail for OV 2025.0.
@jatinwadhwa921 can you also please update line 148 to:

if (((OPENVINO_VERSION_MAJOR == 2024) && (OPENVINO_VERSION_MINOR > 1)) || (OPENVINO_VERSION_MAJOR > 2024))

Copy link
Author

Choose a reason for hiding this comment

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

fixed

Choose a reason for hiding this comment

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

LGTM

@jatinwadhwa921 jatinwadhwa921 force-pushed the jatin/precision_issue_fix branch from da4a8fc to c557a94 Compare December 9, 2024 04:50
@@ -144,7 +144,7 @@ void BasicBackend::PopulateConfigValue(ov::AnyMap& device_config) {
device_config.emplace(ov::hint::inference_precision("f32"));
}
if (global_context_.precision_str.find("ACCURACY") != std::string::npos &&
global_context_.device_type == "GPU") {
global_context_.device_type.find("GPU") != std::string::npos) {

Choose a reason for hiding this comment

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

LGTM

@sfatimar sfatimar merged commit 27ecba9 into ovep-develop-lnl-1.4 Dec 10, 2024
7 of 17 checks passed
global_context_.device_type == "GPU") {
if (global_context_.OpenVINO_Version.at(0) >= 2024 && global_context_.OpenVINO_Version.at(1) >= 1) {
global_context_.device_type.find("GPU") != std::string::npos) {
if (((OPENVINO_VERSION_MAJOR == 2024) && (OPENVINO_VERSION_MINOR > 1)) || (OPENVINO_VERSION_MAJOR > 2024)) {

Choose a reason for hiding this comment

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

@jatinwadhwa921
I think we should not be using "OPENVINO_VERSION_MAJOR" etc. to check the version
Instead use :
"global_context_.OpenVINO_Version.at(0)" etc.
I think the former is a macro available at compile time and we will get warnings during build because the condition evaluates to a constant.
I just built it with this change and got the following build failure on this line (since warnings are treated as errors)

"warning C4127: conditional expression is constant"

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.

5 participants