Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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'>