TensorMemoryBlob: sync data handle on alloc call (#19149)

This commit is contained in:
Maksim Kutakov 2023-08-14 11:22:11 +02:00 committed by GitHub
parent 44a90dc874
commit 4996d1f034
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -516,6 +516,10 @@ public:
void setShape(const ie::SizeVector& dims) override {
tensor->set_shape(dims);
ie::TBlob<T>::getTensorDesc().setDims(dims);
allocate();
}
void allocate() noexcept override {
if (ie::TBlob<T>::buffer() != tensor->data()) {
ie::TBlob<T>::_allocator =
ie::details::make_pre_allocator(static_cast<T*>(tensor->data()), tensor->get_byte_size());

View File

@ -93,6 +93,7 @@ protected:
void update() {
m_proxyMemMngr->setMemMngr(currentMemMngr());
m_blob->allocate(); // WA: update handle
}
private: