-
Notifications
You must be signed in to change notification settings - Fork 48
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
Bug fix: Fix MLGraphBuilder.input()'s handling of scalars #575
Bug fix: Fix MLGraphBuilder.input()'s handling of scalars #575
Conversation
…achinelearning#502 MLOperandDescriptor was updated in c320472 to always have dimensions, defaulted to an empty list for scalars. That makes the current prose for input() incorrect. Issue webmachinelearning#502 already tracked correcting it, so let's simplify - just change the logic for "is a scalar?" and drop the bogus assert.
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.
👍 Ningxin said he'd be back next week if you can wait a little longer (I don't want to complete too many CR's without my editorial partner 😅), but LGTM.
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.
The fix of MLGraphBuilder.input() LGTM, thanks!
Just left a comment for check dimensions algorithm, I am fine we fix it in a separate PR.
At the risk of scope creep: Editors, what do you think of moving the definition of check dimensions either (1) into MLOperandDescriptor, adjacent to byte length, or (2) into Algorithms? With the PR as-is, putting it in with MLOperandDescriptor might be preferred |
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.
LGTM, thanks much!
LGTM thanks @fdwr ! |
SHA: 6e99b01 Reason: push, by fdwr Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
The latest change LGTM, thanks @fdwr !
MLOperandDescriptor was updated in c320472 to always have dimensions, defaulted to an empty list for scalars. That makes the current prose for input() incorrect. Issue #502 already tracked correcting it, so let's simplify - just change the logic for "is a scalar?" and drop the bogus assert. The "check dimensions" algorithm is streamlined, and constant()'s use is also simplified.
Fixes #502
Preview | Diff