openvino/tests/model_hub_tests
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
..
models_hub_common [TF FE] Fixed memory sharing for HF models. (#23318) 2024-03-15 08:46:20 +00:00
performance_tests copyright year update (#23370) 2024-03-14 09:37:02 +00:00
pytorch copyright year update (#23370) 2024-03-14 09:37:02 +00:00
tensorflow [TF FE] Fixed memory sharing for HF models. (#23318) 2024-03-15 08:46:20 +00:00
CMakeLists.txt copyright year update (#23370) 2024-03-14 09:37:02 +00:00