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

[EcmaScript] 128-bit data type for import/export (SIMD) #1502

Open
unit-404 opened this issue Sep 12, 2023 · 3 comments
Open

[EcmaScript] 128-bit data type for import/export (SIMD) #1502

unit-404 opened this issue Sep 12, 2023 · 3 comments

Comments

@unit-404
Copy link

unit-404 commented Sep 12, 2023

For interop between WASM modules needs dedicated EcmaScript v128 data type in EcmaScript. Not Number or BigInt. There is probably needs sort of register reference, or exported 128-bit packed or bitfield value. I not means about SIMD in EcmaScript, but means about data type.

@dtig
Copy link
Member

dtig commented Sep 12, 2023

Could you provide more detail on what interop issues would be solved by having only the v128 data type exposed to JS? The reason v128 types are available in Wasm, is that we expect computations on v128 values to also happen only in Wasm.

@unit-404
Copy link
Author

When needs transfer v128 SIMD value between wasm modules, they can't share memory between of them. I mean, when getting pointer value, doesn't means memory itself. So needs specific data-type for transfering SIMD value between modules.

@tlively
Copy link
Member

tlively commented Oct 6, 2023

Even if the modules do not share a memory, JS should be able to read the vector data out of one module's memory and write it to the other module's memory. Doing a memory copy like this should be more efficient in the common case than passing v128 values one at a time from one module, out to JS, and back into another module.

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

No branches or pull requests

4 participants