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

Add try for get_property #510

Merged

Conversation

wgzintel
Copy link
Contributor

@wgzintel wgzintel commented Jan 10, 2024

Add try to get_property to avoid throwing exceptions.
Running OV 2024.0.0-13874-eadb9cea806-refs/pull/21980/head will throw exception to get the property of GPU's 'CACHE_MODE' through compiled_model.get_property().

After adding try, the GPU properties are printed as follows:
GPU SUPPORTED_PROPERTIES:
OPTIMAL_NUMBER_OF_INFER_REQUESTS: 1
PERF_COUNT: False
PERFORMANCE_HINT: LATENCY
GPU_QUEUE_THROTTLE: Priority.MEDIUM
ENABLE_CPU_PINNING: False
MODEL_PRIORITY: Priority.MEDIUM
[error] Get property of 'CACHE_MODE' failed
CACHE_DIR:
NETWORK_NAME: main_graph
PERFORMANCE_HINT_NUM_REQUESTS: 0
EXECUTION_DEVICES: ['OCL_GPU.0']
COMPILATION_NUM_THREADS: 32
GPU_ENABLE_LOOP_UNROLLING: True
GPU_QUEUE_PRIORITY: Priority.MEDIUM
GPU_HOST_TASK_PRIORITY: Priority.MEDIUM
NUM_STREAMS: 1
GPU_DISABLE_WINOGRAD_CONVOLUTION: False
EXECUTION_MODE_HINT: ExecutionMode.PERFORMANCE
DEVICE_ID: 0
INFERENCE_PRECISION_HINT: <Type: 'float16'>

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@helena-intel helena-intel self-requested a review January 10, 2024 18:18
Copy link
Collaborator

@helena-intel helena-intel left a comment

Choose a reason for hiding this comment

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

This code definitely shouldn't throw an exception, thanks for adding the try/except!

Running OV 2024.0.0-13874-eadb9cea806-refs/pull/21980/head will throw exception to get the property of GPU's 'CACHE_MODE' through compiled_model.get_property().

Is there an OpenVINO ticket about that? It seems like a bug that the property is listed in supported_properties and then fails.

@wgzintel
Copy link
Contributor Author

wgzintel commented Jan 12, 2024

This code definitely shouldn't throw an exception, thanks for adding the try/except!

Running OV 2024.0.0-13874-eadb9cea806-refs/pull/21980/head will throw exception to get the property of GPU's 'CACHE_MODE' through compiled_model.get_property().

Is there an OpenVINO ticket about that? It seems like a bug that the property is listed in supported_properties and then fails.

@helena-intel Here is the ticket about the 'CACHE_MODE' bug, https://jira.devtools.intel.com/browse/CVS-129260

@echarlaix echarlaix merged commit 3f7551e into huggingface:main Jan 12, 2024
10 checks passed
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