Open artyom-beilis opened 4 months ago
dlprimitives work only on contiguous tensors, if input isn't contiguous it is converted to one by calling
Tensor self_c = self.contiguous();
self_c
is promised to be contiguous, so self_c
should be used. It is a bug in my original code, I noticed it when I reviewed the code.
I fixed these and other errors in my pull request.
But the following line in my code confuses me. Will it cause a memory leak?
self = self.contigouos()
It seems that in modern C++ this should not cause problems. But I would like to hear your opinion as an expert.
self = self.contigouos()
Is incorrect indeed.
I'll describe in more details in pool request
What's the difference between self and self_c?