diff options
Diffstat (limited to 'lib/oeqa/runtime/miutils/tests')
-rw-r--r-- | lib/oeqa/runtime/miutils/tests/dldt_inference_engine_test.py | 8 | ||||
-rw-r--r-- | lib/oeqa/runtime/miutils/tests/mkl_dnn_test.py | 12 |
2 files changed, 13 insertions, 7 deletions
diff --git a/lib/oeqa/runtime/miutils/tests/dldt_inference_engine_test.py b/lib/oeqa/runtime/miutils/tests/dldt_inference_engine_test.py index a44f9027..31bfb539 100644 --- a/lib/oeqa/runtime/miutils/tests/dldt_inference_engine_test.py +++ b/lib/oeqa/runtime/miutils/tests/dldt_inference_engine_test.py | |||
@@ -16,10 +16,18 @@ class DldtInferenceEngineTest(object): | |||
16 | self.target.run('mkdir -p %s' % self.work_dir) | 16 | self.target.run('mkdir -p %s' % self.work_dir) |
17 | self.target.copy_to(os.path.join(files_path, 'dldt-inference-engine', self.ie_input_files['ie_python_sample']), | 17 | self.target.copy_to(os.path.join(files_path, 'dldt-inference-engine', self.ie_input_files['ie_python_sample']), |
18 | self.work_dir) | 18 | self.work_dir) |
19 | python_cmd = 'from openvino.inference_engine import IENetwork, IECore; ie = IECore(); print(ie.available_devices)' | ||
20 | __, output = self.target.run('python3 -c "%s"' % python_cmd) | ||
21 | self.available_devices = output | ||
19 | 22 | ||
20 | def tear_down(self): | 23 | def tear_down(self): |
21 | self.target.run('rm -rf %s' % self.work_dir) | 24 | self.target.run('rm -rf %s' % self.work_dir) |
22 | 25 | ||
26 | def test_check_if_openvino_device_available(self, device): | ||
27 | if device not in self.available_devices: | ||
28 | return False, self.available_devices | ||
29 | return True, self.available_devices | ||
30 | |||
23 | def test_can_download_input_file(self, proxy_port): | 31 | def test_can_download_input_file(self, proxy_port): |
24 | return self.target.run('cd %s; wget %s -e https_proxy=%s' % | 32 | return self.target.run('cd %s; wget %s -e https_proxy=%s' % |
25 | (self.work_dir, | 33 | (self.work_dir, |
diff --git a/lib/oeqa/runtime/miutils/tests/mkl_dnn_test.py b/lib/oeqa/runtime/miutils/tests/mkl_dnn_test.py index 13afd1a4..869a4cbe 100644 --- a/lib/oeqa/runtime/miutils/tests/mkl_dnn_test.py +++ b/lib/oeqa/runtime/miutils/tests/mkl_dnn_test.py | |||
@@ -9,13 +9,13 @@ class MkldnnTest(object): | |||
9 | self.target.run('rm /tmp/%s' % self.mkldnn_target_test_filename) | 9 | self.target.run('rm /tmp/%s' % self.mkldnn_target_test_filename) |
10 | 10 | ||
11 | def test_mkldnn_can_compile_and_execute(self): | 11 | def test_mkldnn_can_compile_and_execute(self): |
12 | mkldnn_src_dir = '/usr/src/debug/mkl-dnn/' | 12 | mkldnn_src_dir = '/usr/src/debug/onednn/' |
13 | mkldnn_src_test_filename = 'api.c' | 13 | mkldnn_src_test_filename = 'api.c' |
14 | mkldnn_src_test_file = '' | 14 | mkldnn_src_test_file = '' |
15 | 15 | ||
16 | (status, output) = self.target.run('cd %s; find -name %s' % (mkldnn_src_dir, mkldnn_src_test_filename)) | 16 | (__, output) = self.target.run('cd %s; find -name %s' % (mkldnn_src_dir, mkldnn_src_test_filename)) |
17 | if status: | 17 | if 'No such file or directory' in output: |
18 | return status, output | 18 | return -1, output |
19 | 19 | ||
20 | mkldnn_src_test_file = os.path.join(mkldnn_src_dir, output) | 20 | mkldnn_src_test_file = os.path.join(mkldnn_src_dir, output) |
21 | (status, output) = self.target.run('gcc %s -o /tmp/%s -ldnnl' % (mkldnn_src_test_file, self.mkldnn_target_test_filename)) | 21 | (status, output) = self.target.run('gcc %s -o /tmp/%s -ldnnl' % (mkldnn_src_test_file, self.mkldnn_target_test_filename)) |
@@ -49,9 +49,7 @@ class MkldnnTest(object): | |||
49 | return self._run_mkldnn_benchdnn_test('./benchdnn --reorder --batch=inputs/reorder/test_reorder_bfloat16') | 49 | return self._run_mkldnn_benchdnn_test('./benchdnn --reorder --batch=inputs/reorder/test_reorder_bfloat16') |
50 | 50 | ||
51 | def test_mkldnn_rnn_api(self): | 51 | def test_mkldnn_rnn_api(self): |
52 | # test_rnn_inference was not yet ready and was expected to fail | 52 | return self._run_mkldnn_benchdnn_test('./benchdnn --rnn --batch=inputs/rnn/test_rnn_all') |
53 | # while waiting it to be ready, use test_rnn_small for now | ||
54 | return self._run_mkldnn_benchdnn_test('./benchdnn --rnn --batch=inputs/rnn/test_rnn_small') | ||
55 | 53 | ||
56 | def test_mkldnn_shuffle_api(self): | 54 | def test_mkldnn_shuffle_api(self): |
57 | return self._run_mkldnn_benchdnn_test('./benchdnn --shuffle --batch=inputs/shuffle/test_shuffle_bfloat16') \ No newline at end of file | 55 | return self._run_mkldnn_benchdnn_test('./benchdnn --shuffle --batch=inputs/shuffle/test_shuffle_bfloat16') \ No newline at end of file |