Skip to content

Commit ce08a91

Browse files
add python test case
1 parent 6f50bb9 commit ce08a91

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/bindings/python/tests/test_runtime/test_compiled_model.py

+13
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from openvino import ConstOutput
2222

2323
import openvino.properties as props
24+
import openvino.properties.hint as hints
2425

2526

2627
def test_get_property(device):
@@ -327,3 +328,15 @@ def test_memory_release(device):
327328
# Release memory and perform inference again
328329
compiled_model.release_memory()
329330
request.infer({0: input_tensor, 1: input_tensor})
331+
332+
def test_set_property_set_type():
333+
model = get_relu_model([1, 3, 32, 32])
334+
core = Core()
335+
set_model = set()
336+
set_model.add(hints.ModelDistributionPolicy.TENSOR_PARALLEL)
337+
core.set_property("CPU", {hints.model_distribution_policy: set_model})
338+
core.compile_model(model, "CPU")
339+
out_set_model = core.get_property("CPU", hints.model_distribution_policy)
340+
assert len(out_set_model) > 0
341+
for item in out_set_model:
342+
assert item == hints.ModelDistributionPolicy.TENSOR_PARALLEL

0 commit comments

Comments
 (0)