Skip to content
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

Implement IDL Float16Array #52416

Open
annevk opened this issue Apr 8, 2024 · 4 comments
Open

Implement IDL Float16Array #52416

annevk opened this issue Apr 8, 2024 · 4 comments
Labels
v8 engine Issues and PRs related to the V8 dependency. web-standards Issues and PRs related to Web APIs

Comments

@annevk
Copy link

annevk commented Apr 8, 2024

As per whatwg/webidl#1398.

@targos
Copy link
Member

targos commented Apr 8, 2024

Does it mean it's not going to be implemented by the JS engine?

@annevk
Copy link
Author

annevk commented Apr 8, 2024

Bindings are typically not implemented in the JS engine I think? Otherwise it would not make a whole lot of sense for Node to ask for implementer bugs to be filed when Web IDL gets changed.

@VoltrexKeyva VoltrexKeyva added the web-standards Issues and PRs related to Web APIs label Apr 8, 2024
@aduh95
Copy link
Contributor

aduh95 commented Apr 8, 2024

If/when https://github.com/tc39/proposal-float16array is implemented by V8, it will be available for Node.js without any effort (expect upgrading the vendored V8 version) from us.

EDIT: V8 has already started implementation work: https://chromium-review.googlesource.com/c/v8/v8/+/5082566

@bakkot
Copy link
Contributor

bakkot commented Apr 8, 2024

There's various places in Node which do something for every typed array, like the isXArray methods and napi_create_typedarray, and those will need to be updated. The WebIDL changes probably don't require anything because in practice those aren't implemented by listing every TA type, despite that being how they're specified.

@daeyeon daeyeon added the v8 engine Issues and PRs related to the V8 dependency. label Apr 9, 2024
ashvardanian added a commit to ashvardanian/SimSIMD that referenced this issue Nov 3, 2024
NodeJS type system doesn't define `float16`,
so we don't currently have a way of detecting
such arrays.

In Python bindings we allow passing an additional
string parameter together with `uint16` arrays to
override the logical type for the missing `bfloat16`.
In JS, for now, it's wiser to wait for the NAPI to
define the missing `napi_typedarray_type` value.

nodejs/node#55574 (comment)
nodejs/node#52416 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v8 engine Issues and PRs related to the V8 dependency. web-standards Issues and PRs related to Web APIs
Projects
None yet
Development

No branches or pull requests

6 participants