Skip to content

fix: explicit gpu deallocation - #5

Open
Krasner wants to merge 1 commit into
dev/node-jsfrom
fix/terminate
Open

fix: explicit gpu deallocation#5
Krasner wants to merge 1 commit into
dev/node-jsfrom
fix/terminate

Conversation

@Krasner

@Krasner Krasner commented Jun 22, 2026

Copy link
Copy Markdown
Owner

What was changed & why

Fixes: #

Changes

Testing & Verification

Additional Resources

@Krasner

Krasner commented Jun 22, 2026

Copy link
Copy Markdown
Owner Author

(Same comment as in Ryan-Millard#449)

@Ryan-Millard there is still some weird gpu deallocation issue with node js.
I think part of it is that the C++ code never explicitly deallocates the GPU - instead it relies on RAII to automatically clean up the GPU instance - which never happens on the JS side because of EMSCRIPTEN_KEEPALIVE

I put a PR review on my own branch: #5
Can you take a look and check if it makes sense. I've added a img2num::terminate() call that explicitly calls the GPU class destructor.

With this I think I reliably don't get any more gpu deallocation errors.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant