Skip to content

Tensors allocated on cache does not appear deallocation capable #84

Description

@jerinphilip

Assuming TensorAllocator is an attempt at implementing an equivalent of std::allocator.

Both tensors_ and cache_ in ExpressionGraph are TensorAllocators.

The cache_ allocates some tensors that are incapable of being deallocated from outside. cache_ is private to this class, and the missing free is a flaw(?).

if(!node->val()) {
if(node->memoize())
cache_->allocate(node->val(), node->shape(), node->value_type());
else
tensors_->allocate(node->val(), node->shape(), node->value_type());
}
}

I could not find a cache_->free(), tensors_ on the other hand are capable of being freed manually through external calls.

void free(const Tensor& tensor) { tensors_->free(tensor); }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions