Repository navigation
Bug fix: Fix MLGraphBuilder.input()'s handling of scalars - #575
Merged
fdwr merged 9 commits intoFeb 21, 2024
Merged
Conversation
fdwr
reviewed
Feb 17, 2024
fdwr
approved these changes
Feb 17, 2024
fdwr
left a comment
Collaborator
There was a problem hiding this comment.
馃憤 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.
huningxin
approved these changes
Feb 18, 2024
huningxin
left a comment
Contributor
There was a problem hiding this comment.
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.
Contributor
Author
|
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 |
fdwr
approved these changes
Feb 21, 2024
Contributor
Author
|
LGTM thanks @fdwr ! |
github-actions Bot
added a commit
that referenced
this pull request
Feb 21, 2024
SHA: 6e99b01 Reason: push, by fdwr Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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