Skip to content

Merge main -> google - #5902

Merged
copybara-service[bot] merged 24 commits into
iree-org:googlefrom
not-jenni:main-to-google
May 14, 2021
Merged

copybara-service[bot] merged 24 commits into
iree-org:googlefrom
not-jenni:main-to-google

Conversation

@not-jenni

@not-jenni not-jenni commented May 14, 2021 •

Copy link
Copy Markdown
Contributor

benvanik and others added 22 commits May 13, 2021 13:32
We can always add a fixed amount if needed for performance.
Generalizing some aspects of the VM to better support arbitrary code.
…ice/update (iree-org#5883)

This fully generalizes the lowering of subtensor/subtensor_insert to
flow.dispatch.slice/update and also accounts for the case where
dynamic values of the offsets/sizes result in host-roundtripping.

Fixes iree-org#5876
* a0623c8 Re-apply changes to replace cuda_headers by cuda directory (iree-org#5891)
* 60819e6 Merge pull request iree-org#5878 from not-jenni:main-to-google
* 2789f73 Synchronize submodules with LLVM at llvm/llvm-project@b7a11274f90f
)

`ConvertToGPUPass` is a sink for lowering away all Linalg ops
in the SPIR-V pipeline: it can distribute a Linalg op to both
global invocation IDs (if just having one-level distribution) or
local invocation IDs (if having two-level distribution). 

This is mostly historical; now we have more proper layering
in the pipeline where we perform the first-level tiling and
distribution at flow level and the second/third level at
`TileAndVectorizeInOneWorkgroupPass`, the functionality
in `ConvertToGPUPass` is overlapping with that, although
in a complementary way: the tiling in the former pass does
not handle the cases where we cannot do imperfect tiling;
it requires perfectly tiled cases, as we are assuming number
of processors equal to number of iterations to avoid generating
`scf.for` loop from the start. `ConvertToGPUPass` is more
generic and can handle all cases.  This is all opaque and
complicated. 

This commit relaxes the `TileAndVectorizeInOneWorkgroupPass`
to not assume the number of processors equal to the number
of iterations. Now we just tile and cyclically distribute using
`scf.for` loops. This causes issues for perfectly tiled cases
as we need to canonicalize the `affine.min` and one-trip
`scf.for` away to expose static sizes for further vectorization.
That can be done by pulling in additional canonicalization
patterns.

Also in order to utilize `TileAndVectorizeInOneWorkgroupPass`
for the second/third level tiling we need to have the corresponding
scheme in launch configuration for them. This commit also
adds the default second/third level tiling for all now supported
Linalg ops: no tiling on subgroup and tiling to 1 for invocations.
This at the same time helps to clean up a bunch of unwieldy
templated configurations for different ops..

Together, the above migrates the invocation tiling logic
in `ConvertToGPUPass` to their proper places. This is the
first step as reining in `ConvertToGPUPass` and launch
configurations.
* More pre-factoring for native ABI swap.

* Some vm_test rework.
* Swap away from vmla.
* Implement non-reflection invocations.
* Handle scalar int/float arguments.
* Handle tensor<i1>.

* Add dylib to default driver.
…vc. (iree-org#5896)

1+MB strings crash msvc; this switches to byte arrays which while
generating larger .c files is much better supported for large blobs of
data.
@google-cla

google-cla Bot commented May 14, 2021

Copy link
Copy Markdown

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@google-cla google-cla Bot added the cla: no label May 14, 2021
…ee-org#5814)" (iree-org#5905)

This reverts commit d7b3bb9
because it causes numeric issues on internal tests.
@google-cla

google-cla Bot commented May 14, 2021

Copy link
Copy Markdown

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@google-cla google-cla Bot removed the cla: yes label May 14, 2021
@google-cla google-cla Bot added the cla: no label May 14, 2021
@copybara-service
copybara-service Bot merged commit c6b019c into iree-org:google May 14, 2021
@not-jenni not-jenni mentioned this pull request May 14, 2021
not-jenni added a commit that referenced this pull request May 15, 2021
* c6b019c Merge pull request #5902 from not-jenni:main-to-google
* 8af432b Synchronize submodules with LLVM at llvm/llvm-project@e51ef7f0706a
* c7dcd95 Integrate LLVM at llvm/llvm-project@e51ef7f0706a
* b4afeaf Integrate LLVM at llvm/llvm-project@c82a0ae70e28
* 560c45d Integrate LLVM at llvm/llvm-project@7c57a9bd7d4c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants