-
Notifications
You must be signed in to change notification settings - Fork 8
[WIP] generate test data for WebNN matmul tests of WPT #23
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
Conversation
| @@ -0,0 +1,17 @@ | |||
| # Introduction | |||
| These Node.js scripts `gen-<operation-name>.js` in this `tool` folder are used to gerenate / update test data which would be involved into test data JSON files for WebNN operations tests of web-platform-tests project. | |||
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.
generate
| * @param {String} precisionType | ||
| * @return {Array<Number>} | ||
| */ | ||
| function getPrecisionData(input, precisionType) { |
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.
Name sounds odd, because it sounds like it's getting information about the precision itself, rather than casting the data to a given precision. How about getDataCastToPrecision or even clearer castDataToPrecision?
| } else { | ||
| const targetDataInfo = inputsDataInfo[source]; | ||
| if (targetDataInfo.data !== undefined) { | ||
| const permutation = targetDataInfo.transpose; |
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.
Hmm, what is transpose used for? Advise a comment here.
| if (path.isAbsolute(filePath)) { | ||
| inputFile = filePath; | ||
| } else { | ||
| inputFile = |
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.
[minor] Unwrap line? (it's only 67 characters wide)
| // If found, it replaces it by a trio | ||
| if ( value instanceof Int8Array || | ||
| value instanceof Uint8Array || | ||
| value instanceof Uint16Array || |
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.
Int16Array is missing.
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.
WebNN doesn't have either uint16 or int16. https://webmachinelearning.github.io/webnn/#enumdef-mloperandtype So, should we remove Uint16Array?
|
Has this CR already been superseded by newer ones? |
Yes. This PR is earlier version, let me close it and will submit new version, thanks. |
@huningxin @fdwr PTAL, thanks.