[POT] Throw exception for IRv10 (#10345)
* [POT] Throw exception for IRv10 * Update reference models * Updated AC framework name from dldt to openvino
This commit is contained in:
parent
29883a152a
commit
be6a3c34f1
@ -140,7 +140,6 @@ def build_graph_for_node(model, input_name, input_shape, node, remove_bias=False
|
|||||||
nodes.append((result_name, 'Result', {}))
|
nodes.append((result_name, 'Result', {}))
|
||||||
edges.append((node.name, result_name, {'out': 0, 'in': 0}))
|
edges.append((node.name, result_name, {'out': 0, 'in': 0}))
|
||||||
graph = build_graph(*make_copy_graph_attrs(model, input_name, input_shape), nodes, edges)
|
graph = build_graph(*make_copy_graph_attrs(model, input_name, input_shape), nodes, edges)
|
||||||
graph.ir_v10 = True
|
|
||||||
|
|
||||||
# Add the neccessary attribute to the new graph
|
# Add the neccessary attribute to the new graph
|
||||||
src_node = get_node_by_name(graph, node.name)
|
src_node = get_node_by_name(graph, node.name)
|
||||||
|
@ -47,11 +47,17 @@ def load_graph(model_config, target_device='ANY'):
|
|||||||
raise RuntimeError('Input model bin should link to an existing file. Please, provide a correct path.')
|
raise RuntimeError('Input model bin should link to an existing file. Please, provide a correct path.')
|
||||||
|
|
||||||
graph_from_ir, meta_data = stdout_redirect(restore_graph_from_ir, xml_path, bin_path)
|
graph_from_ir, meta_data = stdout_redirect(restore_graph_from_ir, xml_path, bin_path)
|
||||||
|
|
||||||
|
if graph_from_ir.graph['ir_version'] == 10:
|
||||||
|
raise AssertionError(
|
||||||
|
'POT does not support version 10 of IR.'
|
||||||
|
'Please convert the model with the newer version of OpenVINO '
|
||||||
|
'or use the POT from OpenVINO 2021.4.2 to work with version 10 of IR.')
|
||||||
|
|
||||||
orig_graph_from_ir, meta_data = stdout_redirect(restore_graph_from_ir, model_config.model, model_config.weights)
|
orig_graph_from_ir, meta_data = stdout_redirect(restore_graph_from_ir, model_config.model, model_config.weights)
|
||||||
|
|
||||||
meta_data['quantization_parameters'] = model_config.quantization_info
|
meta_data['quantization_parameters'] = model_config.quantization_info
|
||||||
graph_from_ir.meta_data = meta_data
|
graph_from_ir.meta_data = meta_data
|
||||||
graph_from_ir.ir_v10 = True
|
|
||||||
graph_from_ir.graph['cmd_params'] = orig_graph_from_ir.graph['cmd_params']
|
graph_from_ir.graph['cmd_params'] = orig_graph_from_ir.graph['cmd_params']
|
||||||
remove_converts(graph_from_ir)
|
remove_converts(graph_from_ir)
|
||||||
model_preprocessing(graph_from_ir)
|
model_preprocessing(graph_from_ir)
|
||||||
|
@ -67,6 +67,12 @@ class CompressedModel:
|
|||||||
ge.add_fullname_for_nodes(model['model'])
|
ge.add_fullname_for_nodes(model['model'])
|
||||||
|
|
||||||
def _from_graph(self, graph):
|
def _from_graph(self, graph):
|
||||||
|
if graph.graph['ir_version'] == 10:
|
||||||
|
raise AssertionError(
|
||||||
|
'POT does not support version 10 of IR.'
|
||||||
|
'Please convert the model with the newer version of OpenVINO '
|
||||||
|
'or use the POT from OpenVINO 2021.4.2 to work with version 10 of IR.')
|
||||||
|
|
||||||
ge.add_fullname_for_nodes(graph)
|
ge.add_fullname_for_nodes(graph)
|
||||||
self._models.append({'model': graph})
|
self._models.append({'model': graph})
|
||||||
self._is_cascade = False
|
self._is_cascade = False
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:8e8c8e6ba81cc8fc66217e1408677175b0a094c34c071835c06412495d536256
|
|
||||||
size 2130036
|
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:7ed7eef3415ccb1cd1b8606bdb8348e124979bb78b02e50badda92aa2cd3dc4d
|
oid sha256:aa2be3155a781cdd99871f8c677f429d37df4921385a2bd7568116cec0634291
|
||||||
size 222
|
size 152
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:43d82f63bfea7d3ae9d641169b9693596199d78171e94b918e09497a4f08a012
|
|
||||||
size 34
|
|
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:70bd9834efa16e7ffa4ab52594b57bb4f813e4cf6b5f01d62117ebe6d8f22711
|
||||||
|
size 2131972
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:5d678641136d8356fca47d4db4f39cb98e59426a9e1113754811d9e12e47463a
|
|
||||||
size 17387
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:0af1173b44db9f52b9878032b87679cc16521ec0c21fc413228e0854da4efed0
|
|
||||||
size 526864
|
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:de67711db3e1fb404a8b61be29954ab5b336d76b8cf7d3c5c98f7b9faab7c6e4
|
oid sha256:ffd87d843342dfcf87dc75ccf0d39acd929906e042a5960e155ff8208a3359c0
|
||||||
size 283
|
size 224
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:0a24413580157bb51a374150ff5597a362663794f394a925d906492a6cc61f4d
|
||||||
|
size 533495
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:eafca25515ecb19d073a96fbaa234c5c9004bf9646419bb1d3f9c0faa25c19c2
|
|
||||||
size 12739
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:97d00430e1ea79257307daf825cfb01a68631a6cd4af2fdb7126ef526d40a660
|
|
||||||
size 22360
|
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:54e12e3df889dff95bfbe949a8e98facdfd5464bb746686ecc7b48d0da78e154
|
oid sha256:91b323d1ac69cbf8ee95f26aea9dcb06e6ea31144d62cdf317f50d8c9242d112
|
||||||
size 202
|
size 146
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:43d82f63bfea7d3ae9d641169b9693596199d78171e94b918e09497a4f08a012
|
|
||||||
size 34
|
|
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:3ef0c63af492bd90c0ff94bacf8f3e0098a29fd10ae3692c1624e14d3c2af671
|
||||||
|
size 50014
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:f3dcb45d8f69aa643c3e8038b92fdee885418d17d052470b9ef921039a8c3822
|
|
||||||
size 10919
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:97d00430e1ea79257307daf825cfb01a68631a6cd4af2fdb7126ef526d40a660
|
|
||||||
size 22360
|
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:58d6366c3dbb3c1a0f4f9c5ce8c4569260a0d65e355dc0d16b8aec3432a72d7a
|
oid sha256:8ca2fc29a319b713835d770b26946193070f1ab9184a16c6305a924fd683c3d2
|
||||||
size 217
|
size 157
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:43d82f63bfea7d3ae9d641169b9693596199d78171e94b918e09497a4f08a012
|
|
||||||
size 34
|
|
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:d1baa52871e25d66ef96d7f8c67160d8816e682c36158f6f2215ef1a8b473351
|
||||||
|
size 50044
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:b816b8316b12511fa5a1b46e637179c86677b9b2b8608b671e6fa7c10c68484e
|
|
||||||
size 11207
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:97d00430e1ea79257307daf825cfb01a68631a6cd4af2fdb7126ef526d40a660
|
|
||||||
size 22360
|
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:b1e0e6b4866c66ee6040110408d8e717f4b253948a623f45b8c427a175f18e62
|
oid sha256:766bf125717626f9323d131d2211070af3d7441732a5310e2967423022d6d219
|
||||||
size 217
|
size 158
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:43d82f63bfea7d3ae9d641169b9693596199d78171e94b918e09497a4f08a012
|
|
||||||
size 34
|
|
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:8c42ae51f569a3a8d1c1dce033d28cb67e0b6e8ba9d4f8438a30d84ace8f7c8e
|
||||||
|
size 50044
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:7e3c4e8d1a0d0a3569dc97c4f6f4660e46c73dd6cfd528f47a710fbc47937bcb
|
|
||||||
size 11207
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:ace081823ddd5a2ae4741bda386b0013b0b1efca14e118524fc707f8291fa7ab
|
|
||||||
size 23883
|
|
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:a2449650f0d479bf81a686e7900476a11b83f75b6bc83aa34e93bb2f5d7d6f30
|
||||||
|
size 30174
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:5ed7c8ba0078d053ca7408709468b5f8450c8c4236938bc4107911f969a6f1ed
|
|
||||||
size 23441
|
|
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:5fb5d18a52e41360f9c08f0f0eb7afa61a430894c155cc5518e237b19ae0354b
|
||||||
|
size 39507
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:06e73b5dd12cb09cc38d83aa2757c2246a0c3eee7617090fa95279a21f6b8200
|
|
||||||
size 17827
|
|
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:2d6250d7a15280ce7d258571df2f1d80735ce9db4e8cfd11f8ba72ba947e73b4
|
||||||
|
size 19090
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:e1065ced05c475134a24bb26787bdba70e4a2ec832bf9a4d6ac51be8dad90140
|
|
||||||
size 19748
|
|
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:85225fcec14786e0b828ce00700f0a165155d5d9c48fb4dc37741a68f139e60f
|
||||||
|
size 21062
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:123c3275fd1509d9382cb98e7e08add8bf2a0c4f240f557a65b261629fcfc7ae
|
|
||||||
size 19748
|
|
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:ed05b306ac1e47007cedcd670c9882127c70d89e5e18b2689358ceb94b41cfe1
|
||||||
|
size 21062
|
@ -25,7 +25,7 @@ TEST_MODELS = [
|
|||||||
('densenet121_example', 'pytorch', 'ANY'),
|
('densenet121_example', 'pytorch', 'ANY'),
|
||||||
('multiple_out_ports_net', 'tf', 'ANY'),
|
('multiple_out_ports_net', 'tf', 'ANY'),
|
||||||
# ('lstm_example', 'pytorch', 'GNA'),
|
# ('lstm_example', 'pytorch', 'GNA'),
|
||||||
('multiple_outputs_net_example', 'dldt', 'GNA'),
|
#('multiple_outputs_net_example', 'tf', 'GNA'),
|
||||||
('resnet_example', 'pytorch', 'CPU_SPR'),
|
('resnet_example', 'pytorch', 'CPU_SPR'),
|
||||||
#('tensor_iterator_example', 'tf', 'ANY'),
|
#('tensor_iterator_example', 'tf', 'ANY'),
|
||||||
]
|
]
|
||||||
@ -210,10 +210,10 @@ TEST_MODELS_WITH_PATTERNS = [
|
|||||||
('efficientnet_b0_example', 'pytorch'),
|
('efficientnet_b0_example', 'pytorch'),
|
||||||
('mobilenet_v3_small_example', 'pytorch'),
|
('mobilenet_v3_small_example', 'pytorch'),
|
||||||
# ('image-retrieval-0001', 'dldt'),
|
# ('image-retrieval-0001', 'dldt'),
|
||||||
('scaleshift_fuse', 'dldt'),
|
('scaleshift_fuse', 'pytorch'),
|
||||||
('scaleshift_no_fuse_1', 'dldt'),
|
('scaleshift_no_fuse_1', 'pytorch'),
|
||||||
('scaleshift_no_fuse_2', 'dldt'),
|
('scaleshift_no_fuse_2', 'pytorch'),
|
||||||
('matmul_divide_const', 'dldt')
|
('matmul_divide_const', 'tf')
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ def download_engine_config(model_name):
|
|||||||
engine_conf_.network_info = model_.network_info
|
engine_conf_.network_info = model_.network_info
|
||||||
|
|
||||||
for launcher in model_.launchers:
|
for launcher in model_.launchers:
|
||||||
if launcher.framework == 'dlsdk':
|
if launcher.framework == 'openvino':
|
||||||
engine_conf_.launchers = list()
|
engine_conf_.launchers = list()
|
||||||
engine_launcher = {'framework': launcher.framework}
|
engine_launcher = {'framework': launcher.framework}
|
||||||
if launcher.adapter:
|
if launcher.adapter:
|
||||||
|
Loading…
Reference in New Issue
Block a user