-
Notifications
You must be signed in to change notification settings - Fork 25
[refactor-parsing] New parsing procedure #132
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
Draft
lukamac
wants to merge
80
commits into
pulp-platform:refactor-parsing
Choose a base branch
from
lukamac:parser-refactor-procedure
base: refactor-parsing
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[refactor-parsing] New parsing procedure #132
lukamac
wants to merge
80
commits into
pulp-platform:refactor-parsing
from
lukamac:parser-refactor-procedure
Conversation
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
…r to parseNode from parseNodeCtxt
…rqs add and mul tensors
NetworkDeployerWrapper should call from the _innerObject
I'm suspecting some interaction between the new parse function and all the other deployers.
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.
In this PR we go one step further in the parsing refactor crusade. The next step was to refactor the parsing procedure which can be seen in the 1d953bd commit.
Note: This PR needs both #131 and #118 so a large portion of changes is from those PRs. If you want to see the changes introduced by this PR, look from the above-mentioned commit forward.
Other big change introduced by this PR is the move of the computeShapes function from the
ONNXLayerclass to templates. The reasoning is that some templates might implement specialized kernels for specific tensor shapes. For example, we already have implementations of theMuloperator that work with 2 equally shaped tensors or with a tensor and a scalar (tensor of size(1,)) and those 2 cases require different shape alignment. Previously we used the same computeShapes implementation which just blindly broadcasted the scalar value to a tensor of the same shape as the first operand.I am still deciding on what exactly should be the job of this method because for now we have assumed that if the shape given by the
computeShapescan be broadcasted, that it can be executed, but that does not necessarily hold true.The solution might be to just require shape checks during (current) parseNode (which some templates actually do: PULPTallGemm and PULPMatrixVec).
Added
Changed
computeShapesmethod from ONNXLayer to NodeTemplate and renamed toalignShapesFixed
PR Merge Checklist
develcommit and pointing todevel.CHANGELOG.mdfile has been updated.alignShapesresponsibilities and usage