Repository navigation
[vulkan] Support multiple dispatch from one dispatch region - #1816
Merged
Merged
Conversation
benvanik
reviewed
May 6, 2020
|
|
||
| /// Attribute on a module op to denote the scheduling order of entry points. | ||
| /// The attribute value is expected to be an array of entry point name strings. | ||
| inline llvm::StringRef getEntryPointScheduleAttrName() { |
Collaborator
There was a problem hiding this comment.
I thought there was a decision not to do this and just use strings?
Member
There was a problem hiding this comment.
You mean not have this helper function but just directly embedding the string at call sites? I don't think there was a decision made on that? But I might miss something. This attribute name is used across a wide range so having a symbol that compilers can check is better imo.
copybara-service
Bot
force-pushed
the
test_308522336
branch
from
May 7, 2020 22:24
eeef119 to
7684c0c
Compare
copybara-service
Bot
force-pushed
the
test_308522336
branch
3 times, most recently
from
May 19, 2020 12:57
994fa90 to
9933050
Compare
This commit extends the Vulkan backend to support launching multiple kernels originated from the same dispatch region in sequence. The SPIR-V CodeGen pipeline incorporates the pass to split kernels if there are multiple Linalg ops. If multiple kernels are created, a special attribute `spv.entry_point_schedule`, is attached to the module to indicate the scheduling of entry points. Then the Vulkan backend queries this attribute and dispatches entry points as scheduled. This commit also updates various HLO to Linalg on buffers conversion to emit a linalg.fill op to zero the output buffers ahead of performing the real computation. PiperOrigin-RevId: 312264954
copybara-service
Bot
force-pushed
the
test_308522336
branch
from
May 19, 2020 13:12
9933050 to
6f30e72
Compare
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.
[vulkan] Support multiple dispatch from one dispatch region
This commit extends the Vulkan backend to support launching
multiple kernels originated from the same dispatch region
in sequence.
The SPIR-V CodeGen pipeline incorporates the pass to split
kernels if there are multiple Linalg ops. If multiple kernels
are created, a special attribute
spv.entry_point_schedule,is attached to the module to indicate the scheduling of entry
points. Then the Vulkan backend queries this attribute and
dispatches entry points as scheduled.
This commit also updates various HLO to Linalg on buffers
conversion to emit a linalg.fill op to zero the output buffers
ahead of performing the real computation.