Add set_property without param device name. (#12354)
* Add get_property without device_name param. Signed-off-by: xipingya <xiping.yan@intel.com> * update * fix build error Signed-off-by: Yan, Xiping <xiping.yan@intel.com> * update test case for set/get property tbb Signed-off-by: Yan, Xiping <xiping.yan@intel.com> * Remove test_p, don't need parameter(deviceName). Signed-off-by: Yan, Xiping <xiping.yan@intel.com> * Add get_property for python API. Currently I don't know how to add relevant test case. Signed-off-by: Yan, Xiping <xiping.yan@intel.com> * Don't need this function. Signed-off-by: Yan, Xiping <xiping.yan@intel.com> * Remove return ov::Any, replace with throw a description. Signed-off-by: Yan, Xiping <xiping.yan@intel.com> * Add throw unsupported test for get_property without param deviceName. Signed-off-by: Yan, Xiping <xiping.yan@intel.com> * Add python test case for get_property. Test usage: $ python -m pytest ../src/bindings/python/tests/test_runtime/test_properties.py Signed-off-by: Yan, Xiping <xiping.yan@intel.com> * change == to is Signed-off-by: Yan, Xiping <xiping.yan@intel.com>
This commit is contained in:
@@ -79,6 +79,10 @@ def test_properties_core(properties_to_set):
|
||||
core = Core()
|
||||
core.set_property(properties_to_set)
|
||||
|
||||
# RW properties without device name
|
||||
assert core.get_property(properties.cache_dir()) == "./"
|
||||
assert core.get_property(properties.force_tbb_terminate()) is False
|
||||
|
||||
# RW properties
|
||||
assert core.get_property("CPU", properties.enable_profiling()) is True
|
||||
assert core.get_property("CPU", properties.cache_dir()) == "./"
|
||||
|
||||
Reference in New Issue
Block a user