Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Add missing destructor #556

Merged
merged 2 commits into from
Jun 29, 2023
Merged

Add missing destructor #556

merged 2 commits into from
Jun 29, 2023

Conversation

kurapov-peter
Copy link
Contributor

Well... happens, I guess.

@@ -114,6 +114,10 @@ ze_command_list_handle_t L0CommandList::handle() const {

L0CommandList::~L0CommandList() {
// TODO: maybe return to pool
auto status = zeCommandListDestroy(handle_);
if (status) {
std::cerr << "Non-zero status for command list destructor" << std::endl;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not LOG(ERROR)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No particular reason, just to stay consistent.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. I still think moving from std::err to LOG(ERROR) in this file would be the right thing to do. In tests, ERROR log should be printed to stderr anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@kurapov-peter kurapov-peter merged commit 5858692 into main Jun 29, 2023
@kurapov-peter kurapov-peter deleted the pakurapo/mem-fix branch June 29, 2023 07:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Excessive memory consumption when run with GPU support enabled
2 participants