openvino/tests/model_hub_tests/tensorflow
Anastasiia Pnevskaia 432ea63e0c
[TF FE] Fixed memory sharing for HF models. (#23318)
### Details:
 There were two problems with memory sharing, which affected HF models. 
`value()` method of class `ResourceVariable` copies value of variable in
some cases. This results in sharing of memory with a copied value, which
is deallocated when `GraphIterator` finishes its work.
Replaced `value()` with `read_value_no_copy()` which should not copy
value in any case.

Another problem is that original model inference moves weights to new
location which leads to corruption of shared memory in OV model.
So the original model should be inferred after the OV inference to
prevent any changes in original model.

### Tickets:
 - 134787, 134408

---------

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2024-03-15 08:46:20 +00:00
..
model_lists [TF FE] Fixed memory sharing for HF models. (#23318) 2024-03-15 08:46:20 +00:00
conftest.py copyright year update (#23370) 2024-03-14 09:37:02 +00:00
requirements.txt [TF FE] Test TF Hugging Face models (#22970) 2024-02-26 12:41:09 +00:00
test_tf_convert_model.py [TF FE] Fixed comparison method in TF Hugging Face tests for case when output structure is not the same as in FW (#23269) 2024-03-14 12:50:54 +00:00
test_tf_hub_api_notebooks.py copyright year update (#23370) 2024-03-14 09:37:02 +00:00
utils.py [TF FE] Fixed comparison method in TF Hugging Face tests for case when output structure is not the same as in FW (#23269) 2024-03-14 12:50:54 +00:00