Skip to content

Commit

Permalink
fix ShmSetUp error
Browse files Browse the repository at this point in the history
Signed-off-by: daquexian <[email protected]>
  • Loading branch information
daquexian committed Mar 8, 2023
1 parent 4cf27fa commit 0279c6e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion oneflow/core/eager/tensor_storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ TensorStorage::TensorStorage(bool is_allocated_in_vm)
last_used_stream_(NullOpt),
is_allocated_in_vm_(is_allocated_in_vm) {}

void TensorStorage::Release() {
TensorStorage::~TensorStorage() {
for (const auto& hook : storage_delete_hooks_) { hook(); }
}

void TensorStorage::Release() {
non_pod_allocator_.reset();
blob_dptr_.reset();
}
Expand Down
2 changes: 1 addition & 1 deletion oneflow/core/eager/tensor_storage.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class TensorStorage {
explicit TensorStorage(bool is_allocated_in_vm);
OF_DISALLOW_COPY_AND_MOVE(TensorStorage);

virtual ~TensorStorage() = default;
virtual ~TensorStorage();

bool is_allocated_in_vm() const { return is_allocated_in_vm_; }

Expand Down

0 comments on commit 0279c6e

Please sign in to comment.