Repository navigation
Re-commit Tile and distribute linalg.generic in DispatchLinalgOnTensors - #5172
Merged
Merged
Conversation
antiagainst
approved these changes
Mar 19, 2021
antiagainst
left a comment
Member
There was a problem hiding this comment.
LGTM; I just have a few comments about comments. :) Please rebase and make sure tests pass before landing.
|
|
||
| for (size_t dim = 0; dim < numTiledLoops; ++dim) { | ||
| useTileSizes[(isConvOp ? numParallelDims : numTiledLoops) - dim - 1] = | ||
| useTileSizes[numParallelDims - dim - 1] = |
Member
There was a problem hiding this comment.
The comment in the above can be deleted now?
| ShapedType outputShape = op.getOutputShapedType(0); | ||
|
|
||
| SmallVector<int64_t, 4> sizes; | ||
| // When Vectororization is not enabled the convertToGPU pass assumes that that |
Member
There was a problem hiding this comment.
This comment is misplaced? From what I can see the following code is for the case where vectorization is enabled and we want to set a larger tile size for it.
Member
There was a problem hiding this comment.
Actually I would suggest renaming sizes into candidateTileSizes to make it clear. And the comment in the old commit can be helpful here too:
// Use the first tile size that can divide the shape. If the shape is not
// aligned on any of the tile sizes pick the smallest tile of one element per
// thread.
:)
| size_t numLoops = getNumOuterParallelLoops(op); | ||
| ts.resize(numLoops, 1); | ||
| ts.back() = lowerTs; | ||
| tileSizes.emplace_back(ts); |
Member
There was a problem hiding this comment.
Some comment will be clear. This is already super opaque.
L346 ... // For workgroup level
L347 ... // For subgroup level
L349 ... // For invocation level
Recommit 156f0bb after fixing the problem with vectorization. Skip vectorization for single element tiles to avoid problem with vector<1> not supported in SPIR-V conversion.
ThomasRaoux
force-pushed
the
elementwise
branch
from
March 19, 2021 15:53
cd06a1a to
44c0b42
Compare
Merged
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.
Recommit 156f0bb after fixing the
problem with vectorization. Skip vectorization for single element tiles
to avoid problem with vector<1> not supported in SPIR-V conversion.
Also add a test to exercise vectorization path.