-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Too many warnings #183
Too many warnings #183
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks - looks good, added comments for parenthesis but other than that looks good to merge
src/Sequence.cpp
Outdated
@@ -27,7 +27,8 @@ Sequence::~Sequence() | |||
{ | |||
KP_LOG_DEBUG("Kompute Sequence Destructor started"); | |||
|
|||
this->destroy(); | |||
if (this->mDevice) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add parenthesis to match style
src/Sequence.cpp
Outdated
@@ -81,7 +82,8 @@ void | |||
Sequence::clear() | |||
{ | |||
KP_LOG_DEBUG("Kompute Sequence calling clear"); | |||
this->end(); | |||
if (this->isRecording()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add parenthesis to match style
src/Tensor.cpp
Outdated
@@ -28,7 +28,8 @@ Tensor::~Tensor() | |||
KP_LOG_DEBUG("Kompute Tensor destructor started. Type: {}", | |||
this->tensorType()); | |||
|
|||
this->destroy(); | |||
if (this->mDevice) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add parenthesis to match style
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice - thanks
When a Manager is destroyed, the Manager manually destroys Tensors and Sequences. Then the Tensor and Sequence destructors kick in and want to destroy even more, but there is nothing left to destroy so a warning is issued for every Tensor and Sequence. This is very annoying in interactive Python, esp when having a lot of Tensors.
Also, for anonymous sequences
end()
is called too often and results in another warning.Added checks to avoid this.