Skip to content

Add NAPI-v9 support to tfjs-node-gpu package #8547

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

Merged
merged 3 commits into from
May 29, 2025

Conversation

gaikwadrahul8
Copy link
Contributor

Hi, Team
This PR adds NAPI-v9 support to the tfjs-node-gpu package.json configuration. I have added version 9 to the napi_versions array in tfjs-node-gpu/package.json and tested with Node.js v22.13.1 which uses NAPI-v9 verified that the package loads correctly after rebuilding with this change

Without this change a user with Node.js versions that use NAPI-v9 encounter an error when trying to load the package because the appropriate binary isn't available.

Here is error log :

Error: The specified module could not be found.
\\?\D:\Code\playground-ts-tensorflow\node_modules\.pnpm\@[email protected]\node_modules\@tensorflow\tfjs-node-gpu\lib\napi-v8\tfjs_binding.node

It will fix this issue :#8542

I would request you to please review this PR, if you've any feedback or suggestion please let me know that will be very helpful. Thank you for your consideration.

@mattsoulanille
Copy link
Member

Thanks! Can you also update it in the tfjs-node-gpu package here please?

@gaikwadrahul8
Copy link
Contributor Author

gaikwadrahul8 commented Apr 18, 2025

Hi, @mattsoulanille
I have updated the tfjs-node-gpu package. Could you please confirm if you would also like me to update the tfjs-node package or if there's another action required? Thank you.

@PrinOrange
Copy link

PrinOrange commented May 23, 2025

: (
I really need this merge...
Because I hit the bug...
And please also upgrade the tfjs-node as possible...
Thank you.

@gaikwadrahul8
Copy link
Contributor Author

Hi, @mattsoulanille
Our community users have been actively requesting NAPI-v9 support and this PR directly addresses that need. Merging it would greatly benefit users waiting for this compatibility. Could you please prioritize its review and merge? Your prompt attention to this would be highly valued. Thank you

@mattsoulanille mattsoulanille merged commit 0ef019b into master May 29, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants