-
Notifications
You must be signed in to change notification settings - Fork 47
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
Introduce MLConstantOperand #747
Conversation
<div class=internal-slots> | ||
{{MLConstantOperand}} has the following internal slots: | ||
<dl dfn-type=attribute dfn-for="MLConstantOperand"> | ||
: <dfn>\[[data]]</dfn> of type [=byte sequence=] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just thinking about how future spec text would specify the actual operation on tensor data... should this just be a list of numbers instead of a byte sequence? Otherwise every access to a tensor would have to invoke an algorithm to get the numbers, and that would need to reference "decoding" the byte sequence. Sure, that can be wrapped in helpers, but is there any benefit to holding the bytes here vs. just a list of numbers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good thinking. I agree that sounds nice :)
This is making me realize that I've never before had to specify anything touching the contents of an ArrayBufferView
... For the constant(descriptor, bufferView)
method, how do I get a [/list]
of numbers out of the bufferView
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not finding an example and I can't think of a place outside ECMAScript itself that would need to. You may have to write it yourself, using GetValueFromBuffer which get a copy of the bytes does.
Closing due to #668 (comment) |
Fixes #668
Preview | Diff